How idempotency works
When you include anIdempotency-Key header in a workflow trigger request, fsckmsft records the key alongside the resulting run ID. If another request arrives with the same key within the 24-hour retention window, fsckmsft returns the original run’s response immediately — without starting a new run. The second (and any subsequent) request is treated as a duplicate, not an error: you receive an HTTP 200 response with the original run details and an X-Idempotent-Replayed: true header.
Trigger a workflow with an idempotency key
Send aPOST request to the workflow trigger endpoint and include the Idempotency-Key header. Use any unique string as the key — a UUID, a content hash of the event payload, or the event ID from your source system all work well.
Idempotency-Key returns:
The
Idempotency-Key value is case-sensitive and scoped to your workspace — keys from different workspaces never collide. Keys are limited to 255 characters. If you omit the header entirely, fsckmsft always starts a new run.Key retention window
Idempotency keys are retained for 24 hours from the time the first request is received. After the retention window expires, the key is removed from fsckmsft’s records. A new request with that same key will be treated as a fresh trigger and start a new run. Design your key generation strategy with this window in mind:- For event-driven integrations, use the upstream event’s own unique ID (e.g.,
evt_stripe_ch_xxx,gh_push_sha_abc). Event IDs from source systems are already unique and stable. - For scheduled or batch processes that may run again within 24 hours, incorporate a timestamp or sequence number into the key so that legitimate re-runs use a different key.
Example use case: webhook retry safety
A payment provider sends apayment.succeeded webhook to your fsckmsft workflow trigger endpoint. If your server returns a 5xx response (perhaps briefly during a deployment), the payment provider retries the webhook up to three times over the next hour.
Without idempotency, each retry starts a new workflow run — potentially issuing three duplicate receipts and three duplicate license activations.
With idempotency:
- Your webhook handler reads the event ID from the provider’s payload:
"id": "evt_1OtV4z2eZvKYlo2C3BXGKQ8". - It forwards the event to fsckmsft with
Idempotency-Key: evt_1OtV4z2eZvKYlo2C3BXGKQ8. - The first delivery starts the run; the two retries receive
idempotent_replayed: trueand no additional runs are created.
FAQ
Does idempotency apply to event-based and scheduled triggers, not just API triggers?
Does idempotency apply to event-based and scheduled triggers, not just API triggers?
No. Idempotency keys apply only to API-triggered workflows (via the
/trigger endpoint). Event-based and scheduled triggers managed entirely within fsckmsft use internal deduplication mechanisms that you do not need to configure manually.What if I send a different payload with the same idempotency key?
What if I send a different payload with the same idempotency key?
fsckmsft ignores the new payload and returns the response from the original run. The key lookup takes precedence over the request body. If you need to trigger the workflow with different data, use a new, unique idempotency key.
Can I see which runs were deduplicated?
Can I see which runs were deduplicated?
Yes. Open the workflow’s run history in Automation → Workflows → [workflow name] → Runs. Deduplicated requests appear as
Replayed entries alongside their original run, making it easy to audit deduplication activity.