Generate AgentOS media with Zapier
Create an image or video from a new campaign record, keep track of the asynchronous job, and deliver only a completed asset.
On this page
Before you start1. Create the credential connection2. Prepare the template once3. Submit from the first Zap4. Use a separate status-check Zap5. Add Buffer only after the file is readyKeep the automation boundedBefore you start
Prepare a saved AgentOS template and its complete inputs. For example, your approved campaign record might contain a template ID, an inputs object, a caption, and a unique business event ID. Those are fields in your own source table, not fixed AgentOS template fields.
You need API by Zapier access and a personal AgentOS API key from Settings → API key. API by Zapier is currently a paid beta feature. Prefer its credential connection over a plaintext key in a Webhooks step. Zapier API options
1. Create the credential connection
In Zapier Apps, add an API by Zapier connection:
Authentication type: Static Headers (API key)
Header name: Authorization
Header value: Bearer YOUR_AGENTOS_KEY
Domain filter: api.bsquarerealty.com
Test URL:
https://api.bsquarerealty.com/v1/workflow-api/media/templates?medium=poster&limit=1
Enter the real secret only in the connection form. The API request steps should reuse the connection, not contain another copy of the key. Connection instructions
2. Prepare the template once
List templates with GET /v1/workflow-api/media/templates?medium=poster, then fetch the
selected template with GET /v1/workflow-api/media/templates/TEMPLATE_ID?medium=poster.
Read body.inputSchema and map every required value from your approved source.
For video, use medium=video in both reads. Narrated video needs complete narration and
the selected visuals; the generation endpoint does not accept a free-form instruction such as “make
a video about this listing” in place of template inputs.
Copy this prompt into your connected assistant if you need help preparing the payload:
Prepare, but do not execute, an AgentOS media API request for template [TEMPLATE ID]. Read its current input schema. Map the following approved campaign fields to its real input names: [FIELDS AND VALUES]. Return valid JSON with action, medium, templateId, inputs, and requestKey. List anything missing. Do not invent asset IDs, listing facts, or narration. Do not include an API key.
3. Submit from the first Zap
Use your chosen source trigger, then add API by Zapier → API Request:
Method: POST
URL: https://api.bsquarerealty.com/v1/workflow-api/media/generate
Content-Type: application/json
The body has this structure. Fill the selected template's real inputs before running:
{
"action": "start",
"medium": "video",
"templateId": "VIDEO_TEMPLATE_ID",
"inputs": {},
"outputFormat": "mp4",
"requestKey": "campaign-SOURCE_EVENT_ID-video-v1"
}
For a poster, use medium: "poster" and omit outputFormat. Keep the same
key and body if the same submission needs recovery.
Save operation.operationId, medium, source event ID, request key, and current state in
your job table. A 202 response does not mean the media is ready.
4. Use a separate status-check Zap
Video generation can outlast a single delay. A reliable pattern is a scheduled second Zap that reads pending rows from your job table and checks each saved operation:
GET https://api.bsquarerealty.com/v1/workflow-api/media/operations/OPERATION_ID?medium=video
The job table is storage you configure in Zapier or another connected app; AgentOS does not create it for you.
- Leave
queuedandrunningjobs pending for the next check. -
For
succeeded, select the returned video artifact, or the image artifact for a poster. - Mark
failedandcanceledjobs for attention. -
Stop automatic resubmission for
unknownoutcomes and investigate the same operation.
Store the downstream result ID after successful delivery and exclude completed rows from later checks. If a downstream send times out, inspect its result before repeating it. An AgentOS request key does not deduplicate a separate Buffer or email action.
For a low-volume trial, Delay followed by a GET and success filter can work. A fixed delay alone cannot guarantee completion, and filtering out a still-running job does not arrange another check. Zapier delay behavior
5. Add Buffer only after the file is ready
Buffer's Zapier integration accepts image and video media through direct file links. Use a stable, publicly reachable URL for the approved output, select the intended Buffer channel, and inspect the action's publishing mode before testing. For multiple channels, configure and verify the separate channel destinations. Buffer's Zapier guide
AgentOS download links may expire. For queued publication, copy the asset to approved public media storage first. Do not expose private client data or unapproved listing media merely to make a URL work.
Keep the automation bounded
AgentOS currently permits 5 submissions per minute, 100 per 24 hours, and 60 reads/reviews per
minute per account. Honor Retry-After on 429. Space checks and submissions
across all Zaps using the same key. Treat POST tests as real generation requests and Buffer tests as
potentially real external writes.
Verification: AgentOS route and schema review plus current official Zapier and
Buffer documentation. This guide is a configuration recipe, not an imported or end-to-end tested
Zap. The API key routes do not provide a per-render callback URL parameter; use status reads rather
than inventing a webhookUrl field.
