Fan out one Sume clip to three platforms: one webhook, three task keys

Receive one job.completed webhook per Sume job, then enqueue a task per platform. Key each task by job id plus platform so a retry never double-posts.

5 min readSume
All posts

One Sume job produces one job.completed webhook, so fan out on your side: verify and dedupe the delivery by job_id, then enqueue one publish task per platform with a key of job_id:platform. A retried webhook then creates no new tasks, and a failed platform retries alone.

Sume tells receivers to use job_id as the idempotency key, because it retries non-2xx responses up to 10 attempts.

What is the task layout?

One row per platform keeps retries independent.

Task keys for a three-platform fan-out (read 2026-10-05)
Task keyPlatform stepRetried when
job_1:youtubeYouTube uploadOnly that upload fails
job_1:tiktokTikTok init and uploadOnly that post fails
job_1:instagramInstagram Reel container and publishOnly that publish fails

How do I enqueue idempotently?

The sample expands one completed event into three keyed tasks and ignores a repeat.

PLATFORMS = ["youtube", "tiktok", "instagram"]
tasks = {}


def on_event(event: dict) -> int:
    if event.get("event") != "job.completed":
        return 0
    job_id = event["job_id"]
    added = 0
    for platform in PLATFORMS:
        key = f"{job_id}:{platform}"
        if key not in tasks:
            tasks[key] = "queued"
            added += 1
    return added


if __name__ == "__main__":
    evt = {"event": "job.completed", "job_id": "job_1"}
    print(on_event(evt), on_event(evt))

What must the receiver do first?

Verify the sume-v1 signature on the raw body, return a fast 2xx after storing the event, and treat an unknown event type as 204, not an error, so a new event never starts a retry storm (Verifying webhooks).

Sources

Related posts

More in Developers

All Developers posts

Written by Sume