Shopify Flow automation: start an AI product video

Shopify Flow automation can start an AI product video: a Send HTTP request action posts each new product to a video API, keyed so retries can't repeat.

5 min readSume
All posts

Shopify Flow automation means a trigger, such as a product being created, starts a workflow of conditions and actions inside your store. To start an AI product video from Flow, add a Send HTTP request action that POSTs the new product's photo and title to a video API, with an idempotency key built from the product ID so Flow's retries can't start a second render.

Shopify's behavior below comes from the Shopify Help Center pages listed under Sources, read on 2026-09-28. The video side is a Sume Format run, from Create a run and Runs and results. Sume has no official connector for Flow: this is a plain HTTPS call.

How does Shopify Flow automation work?

Flow watches your store for events and runs a sequence of actions in response. It is a free app on the Basic, Grow, Advanced, and Plus plans, but Send HTTP request is only available on Plus, Advanced, or Grow. That action is the one that reaches a service outside Shopify, so a video workflow needs one of those plans.

A product video workflow uses four building blocks from Shopify's own lists:

From Shopify's Triggers and Actions pages, read 2026-09-28.
Flow pieceKindRole in a video workflow
Product createdTriggerStarts the workflow for each new product.
Product status updatedTriggerStarts it when a draft goes live instead.
Send HTTP requestActionPOSTs the product to the video API.
Add product tagsActionMarks the product as sent, for your own filters.

How do I send a product to a video API from Flow?

Configure the Send HTTP request action with these fields. The example calls the catalog Format sume-product-commercial (Sume Product Commercial), whose description names “ecommerce hero videos” and “product teasers”. Any key carrying formats:write may call a catalog Format; service-account keys cannot create Format runs.

  • Store the API key as a Flow secret (Flow > Settings) and reference it as a Liquid variable. Shopify says secret values are never visible in the Flow interface and are redacted from run logs. Sume's own rule is the same: keep keys on trusted servers, never in frontend JavaScript.
  • Build the Idempotency-Key from {{ product.legacyResourceId }}, the product ID Flow's variable docs use, plus a version you bump only when you want a new video.
  • Replace PRODUCT_IMAGE_URL with the product image variable from the field's Add a variable list. attachments takes up to 30 public HTTPS images.
  • Point communication.webhook_url at an endpoint you host. The next sections explain why.
Method:  POST
URL:     https://api.sume.com/v1/formats/sume/sume-product-commercial/runs
Headers: Authorization: Bearer {{secrets.sume_api_key}}
         Content-Type: application/json
         Idempotency-Key: shopify-{{ product.legacyResourceId }}-video-v1
Body:
{
  "input": { "product_title": {{ product.title | json }} },
  "attachments": [
    { "type": "input_image", "image_url": "PRODUCT_IMAGE_URL" }
  ],
  "generation_spend_cap_usd": 20,
  "communication": { "webhook_url": "https://example.com/hooks/sume" }
}

What happens when Flow retries the request?

Flow waits at most 30 seconds for a response code. With no response, it closes the connection and retries later. For a 4XX, or for a 5XX or 429, you choose Retry (for up to 24 hours), Fail, or Ignore. Any 2XX or 3XX counts as success.

Retries are why the key matters. The same Idempotency-Key with the same body returns 200 with the original run and idempotency_hit: true: no second run, no second charge. So the body must be byte-for-byte stable, which means only product fields that don't change between retries. A different body under the same key answers 409 idempotency_conflict and nothing runs. Two copies arriving at the same moment get one run and one 409 idempotency_key_in_use, which is retryable. After a create that failed with 402 or 503, the key is released, so a retry with it can succeed.

Set the server-error branch to Retry. A 403 insufficient_scope means the key lacks formats:write, which no retry fixes, so a Fail branch shows it in the run log sooner.

Where does the finished video go?

Not back into Flow. The create answers at once with a receipt, but the run itself takes minutes, far longer than Flow's 30-second wait. Sume POSTs one signed format.run.terminal delivery to communication.webhook_url when the run completes or fails. A completed run carries primary_output_url, a durable media.sume.com URL that doesn't expire and is public to anyone holding it.

Your endpoint verifies the signature, then attaches the video to the product. That receiver is the same one a custom app needs, covered step by step in Shopify product video with products/create webhooks. To keep the video and its review status beside the product instead of in the gallery, see Shopify product metafields for video.

What can't this Flow automation do?

Know these limits before you build it:

  • It doesn't run on the Basic plan: Send HTTP request needs Grow, Advanced, or Plus.
  • It doesn't receive the video: the finished run goes to a URL you host.
  • It doesn't hide a key typed as plain text into the Headers or Body fields. Use a Flow secret, which Shopify redacts from run logs.
  • It doesn't pick video models for you: a Format run's image, video, and audio models are chosen by the Format's tools.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume