Skip to content
Agentmart
Submit a tool

fetching-data-via-pieces

Use when you need records from an external system the organization has a connection for — pulling past examples for an eval set, checking what a connection…

Skill by Katch-AI

IndexedMIT
Write a review

Chalk Labs

Need help deploying fetching-data-via-pieces?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/katch-ai-fetching-data-via-pieces

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when you need records from an external system the organization has a connection for — pulling past examples for an eval set, checking what a connection returns, any ad-hoc read through a piece action (Salesforce, Gmail, JIRA, HubSpot…).

Use cases: data, marketing, sales

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/fetching-data-via-pieces

What's inside

Skill name
fetching-data-via-pieces
Description
Use when you need records from an external system the organization has a connection for — pulling past examples for an eval set, checking what a connection returns, any ad-hoc read through a piece action (Salesforce, Gmail, JIRA, HubSpot…).
License
MIT
Instructions
29 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • example-ingestions.md · references/
  • pagination-patterns.md · references/

SKILL.md (first lines)

# Fetching data via pieces

Read records by running one piece action on the agent's scratch flow. Every call takes `agent_id`; the calls below omit it. Step JSON and run shapes: the `activepieces` skill.

## The loop

1. `get_agent` → `scratchActivepiecesFlowId`, the `flow_id` below. `get_activepieces_flow(flow_id)` → `versionId`, the draft you sample.
2. Build the step: `list_activepieces_connections(piece_name)` → the connection's `externalId`; `get_activepieces_piece(piece_name, action: "<action>")` → `version` and `actions[<action>].props` (never guess prop names); `get_activepieces_piece_options(…)` for a dropdown's values.
3. `apply_activepieces_flow_operation(flow_id, "ADD_ACTION", request)`: one `PIECE` step named `inv_<uuid>` with `parentStep: "trigger"`, the action's props in `settings.input` plus `auth: "{{connections['<externalId>']}}"`, and one `{"type": "MANUAL"}` `propertySettings` entry per input key. An unknown `parentStep` still answers 200; check the step is in the returned tree.
4. `sample_activepieces_step(flow_version_id, step_name)` → a run id. Poll `get_activepieces_flow_run(flow_run_id)` until `SUCCEEDED`, `FAILED`, `TIMEOUT` or `STOPPED`, then read `steps.inv_<uuid>.output` (`.errorMessage` on failure). An output over 512KB comes back as `{fileId, size, url}`: fetch the `url` directly.
5. `apply_activepieces_flow_operation(flow_id, "DELETE_ACTION", {"names": ["inv_<uuid>"]})`, also after a failure, and re-fetch the flow to confirm it is gone.

Side effects fire: sample read actions only (list, search, query, get). The scratch flow is one draft, so sample one step at a time, never from parallel subagents. Sampling runs are `TESTING` and never appear in `list_activepieces_flow_runs`.

Make the first sample a handful of rows: it confirms the connection, the account and the field names before you commit to a dataset shape. On a runtime 401 the user reauthorizes the connection in the dashboard.

## Pagination

One sample per page: `UPDATE_ACTION` the same step with its full action body (the call replaces the whole action) and the next offset, cursor or row window in `input`, sample, read, repeat. Stop on an empty page or once you have the count the eval set needs. Per-piece props and ceilings (Salesforce's 2 000-row `OFFSET`; Airtable and HubSpot return one page only): `references/pagination-patterns.md`. A labeled pull with an 80/20 split, a two-source join, and a connection check: `references/example-ingestions.md`.

## Keep the rows out of your context

Run the loop in a subagent if your harness has one: it writes each page's output to a local file and returns a summary (row count, fields, two or three examples). Otherwise keep each step's `input` tight (page size, field list) and write every output to a file as you go.

## Limits

Only pieces with a list, search, query or get action work. Labeling and joining happen in your own code over the saved files. If no piece action can read what you need, or the source has no labels and no join can derive them, tell the user.

From Katch-AI/hegl-plugin, MIT.

More from Katch-AI/hegl-plugin

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 3, 2026 (27 days ago)
Last release
Oct 23, 2026 (7 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Katch-AI

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get fetching-data-via-pieces running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying fetching-data-via-pieces?

CallGet help
Cite this page

fetching-data-via-pieces skill. Agent Mart. https://agentmart.dev/skills/katch-ai-fetching-data-via-pieces (last updated 2026-10-24)