Airtable automation video generation API: a video per record

Use an Airtable Run a script action to call POST /v1/videos with a callback_url, then catch Sume's webhook in a second automation and save the URL.

5 min readSume
All posts

To make an AI video for each Airtable record, use two automations: a Run a script action that sends the record's prompt to POST /v1/videos with a callback_url, and a When webhook received trigger that catches Sume's job webhook, re-reads the job with your key, and writes the video URL back to the record.

Sume has no Airtable integration, and Airtable automations have no generic HTTP action, so both halves are plain fetch calls inside Run a script. The Sume facts come from the Video Generation and Webhooks docs, and the Airtable facts from its help center and scripting reference, all read on 2026-09-27.

How do I start a video from an Airtable record?

Automation A starts on a record trigger, such as When a record matches conditions. Its Run a script action takes recordId and prompt as input variables and the API key as a secret, which the script reads with the `input.secret` function. Once a script references a secret, only users who can access that secret can edit it.

An Update record action after the script saves jobId into a Sume job field on the triggering record.

  • POST /v1/videos answers 202 immediately with the job id; the video is not in that response. Don't poll in the script: Airtable's fetch times out after 30 seconds, and video generation typically takes 30 seconds to several minutes.
  • Idempotency-Key makes a rerun safe, because a replay returns the original job. Build it from the record id and a version you bump when you want a new video.
  • callback_url must be HTTPS. Sume rejects localhost, private-network, and non-HTTPS webhook URLs.
// Input variables: recordId, prompt. Secret: SUME_API_KEY.
const { recordId, prompt } = input.config();
const WEBHOOK_URL = "PASTE_AUTOMATION_B_WEBHOOK_URL";
const res = await fetch("https://api.sume.com/v1/videos", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + input.secret("SUME_API_KEY"),
    "Content-Type": "application/json",
    "Idempotency-Key": "airtable-" + recordId + "-v1",
  },
  body: JSON.stringify({
    model: "sume/auto",
    prompt: prompt,
    aspect_ratio: "9:16",
    duration: 5,
    callback_url: WEBHOOK_URL,
  }),
});
const text = await res.text();
if (!res.ok) throw new Error(res.status + " " + text);
output.set("jobId", JSON.parse(text).id);

How does the finished video get back into the record?

Automation B starts on When webhook received. Sume POSTs a job webhook when the job reaches a terminal state; event is job.completed, job.failed, or job.canceled, and the body carries job_id. Setting up the trigger takes a successful example request, so send it one body shaped like Sume's documented job payload. Sume's Send test won't do: its webhook.test body has no job_id.

The script below re-reads the job and outputs the video URL. The result route nests the artifacts under data.result, as the API reference shows. Then Find records (Sume job equals the webhook's job_id, as a dynamic condition) and Update record write videoUrl into a URL field.

  • GET /v1/jobs/{id}/result answers only for completed jobs. Anything else is 409 job_not_completed, so the script throws and the run history shows why.
  • Store the media.sume.com artifact URL, not unsigned_urls[0] from GET /v1/videos/{id}. That one points at /v1/videos/{id}/content, which the docs call with your API key.
// Input variable: jobId (the webhook body's job_id). Secret: SUME_API_KEY.
const { jobId } = input.config();
const res = await fetch("https://api.sume.com/v1/jobs/" + encodeURIComponent(jobId) + "/result", {
  method: "GET",
  headers: { Authorization: "Bearer " + input.secret("SUME_API_KEY") },
});
const text = await res.text();
if (!res.ok) throw new Error(res.status + " " + text);
const artifacts = JSON.parse(text).data.result.artifacts;
output.set("videoUrl", artifacts.find((a) => a.type === "video").url);

Why re-read the job instead of trusting the webhook?

Airtable does not support signature verification on the webhook trigger, and anyone who has the trigger URL can start the automation. Sume signs the raw body of each delivery and sends x-sume-webhook-signature, an HMAC-SHA256 over <timestamp>.<raw_body>, but Airtable cannot check it. Reading the result with your key means the URL you store always comes from Sume's API, never from the request body.

Deliveries can repeat. Sume makes up to 10 attempts per job webhook, and its docs say to treat job_id as your idempotency key. Writing the same URL to the same record twice is harmless.

What are the limits?

Airtable's limits cover each script run and the webhook trigger; Sume's cover each job webhook.

  • Each webhook that starts a run counts toward your plan's automation run limits, and Run a script is not available on Team plan trials.
  • Point Airtable at job webhooks from POST /v1/videos, not Format-run webhooks. A run webhook carries the full run receipt, inline up to 1 MiB, which can exceed the 100 kb cap.
  • For the media URL rules on both sides, see Video API media inputs and outputs.
From Airtable's Run a script and When webhook received articles and Sume's Webhooks page, read 2026-09-27.
LimitValue
Run a script: script timeout30 s, temporarily 120 s
Run a script: fetch timeout30 s
Run a script: fetch requests per run50
When webhook received: methodPOST only
When webhook received: payload100 kb per request
When webhook received: rate5 requests per second
Sume job webhook: attemptsUp to 10, 30 s apart by default
Sume job webhook: timeout10 s per attempt

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume