Skip to content

feat(activepieces): Zenrows piece rendered from the shared text - #5

Closed
imoital wants to merge 15 commits into
feat/openaifrom
feat/activepieces
Closed

imoital wants to merge 15 commits into
feat/openaifrom
feat/activepieces

Conversation

@imoital

@imoital imoital commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Zenrows piece for Activepieces, the repo's first code host: platforms/activepieces/ renders to dist/activepieces/, the piece exactly as it would sit in their packages/pieces/community/zenrows. Stacked on #2 for the host-owned scripts/ folder; GitHub retargets it to main when #2 merges.

Four actions behind an API-key connection: Scrape URL (Markdown, HTML, text or a screenshot; 5 options, Adaptive Stealth Mode on by default), Extract Structured Data (CSS selectors or Automatic, which returns the parsed data), Get Account Usage, and Activepieces' standard Custom API Call for everything else.

Kept lean on purpose. The API validates option combinations and explains every error, so the piece doesn't repeat that. Error messages carry the API's code and reason, plus a hint for the two credit codes, whose wording comes from shared/text/ (the same facts the skills state).

Checked three ways:

  • scripts/check.sh, run by CI: their lint and TypeScript build, inside an Activepieces checkout pinned in vars.yaml.
  • scripts/smoke.sh, run by hand with an API key: every action against the live API, plus a wrong key and a protected page that must be rejected with their code. 10 of 10 on 12 Nov. It found two bugs that are fixed here.
  • npm run render -- --check, npm run validate, npm test.

Not in this PR: publishing. Activepieces has paused outside PRs since July, so the channel (our own npm package, or their repo once they agree) is GTM's call, tracked on the Linear ticket. The logo is served from this repo until they host it. A manual pass in their UI (AP_DEV_PIECES=zenrows) is the last step before publishing. The api: declaration for #10's spec check comes with the next merge of main.

shared/text/<name>.md holds one fact in plain text. A skill inlines it with
{{< name}}; code uses {{text:name}}, a quoted string literal. using-zenrows
and extract-structured-data now take AUTH004, AUTH014, AUTH006 and REQS007's
page_not_recognised from there; every plugin renders byte-identically.
Validate fails on a snippet with markdown, more than one line, or no user.

kind: code in vars.yaml makes a host whose output is code for another
project: it ships only its own files, with {{...}} filled in .ts/.js too, no
skills, LICENSE, assets or plugin.json, keeps its README out of dist, needs
no release-please entry yet, and may keep a scripts/check.sh.
platforms/activepieces is the piece as it sits in activepieces'
packages/pieces/community/zenrows, rendered to dist/activepieces. Its AUTH004,
AUTH014, AUTH006 and page_not_recognised hints use the shared facts, and
REQS007 now gives the hint for its reason (domain_not_prepared,
page_not_recognised, domain_not_enabled), read from "reason" or, until the
API sends it, the title. scripts/check.sh lints, builds and tests the
rendered piece inside activepieces at the pinned commit, and a path-filtered
workflow runs it.
# Conflicts:
#	CONTRIBUTING.md
#	scripts/lib.mjs
#	scripts/validate.mjs
Drop the option-combination checks and their tests (the API validates and explains), the Extract-refusal parsing and most error hints, and six power-user options on Scrape URL (Custom API Call covers them). The error message keeps the API's code and reason, plus the credit hints from shared/text.
Scrape URL asks for the page as text, so a JSON page isn't parsed into an object. Extract's automatic method returns the parsed data, not the { html, parsed } envelope. Found by a live run of each action.
# Conflicts:
#	CONTRIBUTING.md
#	scripts/validate.mjs
smoke.sh asks for the API key, builds the piece in the activepieces checkout and runs smoke.ts: the four actions on real pages, plus a wrong key and a protected page that must be rejected with their code. Not in CI; it spends credits.
@imoital
imoital requested a review from tedi-z November 12, 2026 17:53
@imoital

imoital commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Replaced by #12: the same piece, now stacked on #11 instead of #2, so its diff is only Activepieces.

@imoital imoital closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant