Activepieces subflow retried: keep Sume jobs from billing twice
A retried Activepieces subflow can re-run your Sume submit. Derive the Idempotency-Key from a stable input, not the attempt, so a retry returns the same job.

If an Activepieces subflow crashes and is retried, the step that creates your Sume job can run again. Send the same Idempotency-Key on every attempt, built from something stable such as your record id, and Sume returns the original job instead of billing a second one.
The Activepieces fact is from its release notes; Sume behavior from Jobs and results and Errors and credits, read 2026-09-30.
What changed in Activepieces?
Release 0.92.0 (2026-09-24) lists "keep the calling flow waiting when a subflow crashes and is retried" (#15642). So a retried subflow is an expected path, and any paid call inside it needs to be safe to repeat.
What key should the submit step use?
The docs say to reuse the same key only for the same operation and payload, and not to retry unsafe submit requests without an Idempotency-Key. Derive it from the input that defines the work, not from a run id or attempt counter that changes on retry.
| Key source | Same on retry? | Result |
|---|---|---|
| Your record id plus operation name | Yes | Original job returned |
| Hash of the request payload | Yes | Original job returned |
| Run id or attempt number | No | A new paid job per retry |
| Random value per step run | No | A new paid job per retry |
What does a safe submit look like?
curl -X POST https://api.sume.com/v1/video-captions \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: captions-order-4812" \
-d '{"video_url":"https://example.com/clean.mp4"}'What about the webhook side?
Retries also duplicate deliveries on your side. The docs say receivers must treat job_id as the idempotency key, so a flow that handles job.completed should skip a job_id it has already processed. For the equivalent pattern in another tool see n8n retry on fail.
Sources
Related posts
More in Developers
- Activepieces sync webhook 408 at 30 seconds: use Sume async
An Activepieces /sync webhook returns 408 when no response arrives in 30 seconds. Call Sume in async mode, which answers 202 with a job id at once.
- Can an AI agent debug a failed webhook on Sume over MCP?
Over MCP an agent can read job status, events and delivery status to see why a webhook did not arrive. Redeliver is a REST call that needs jobs:write.
- Agent loops on Sume: tool calls spend writes, polls spend reads
An MCP tool call spends the write budget once for the run it creates; a jobs_status poll spends none. Reads have their own, much larger budget.
- AI SDK isLoopFinished vs the 20-step cap for Sume video jobs
ToolLoopAgent stops after 20 steps by default. How many jobs_wait calls a Sume video render needs, and the per-call guards to keep if you lift the cap.
Written by Sume