B Square Realty home
API integrations

Send AgentOS images and videos to Buffer

Use AgentOS to generate the asset, then use Buffer to prepare or schedule the social post. These are separate services with separate authorization and success states.

3 min readAPI recipe
On this page Before you start1. Read the finished AgentOS output2. Give Buffer a stable media URL3. Create a draft first4. Verify, then scheduleWhat this setup does not do automatically

Before you start

Have a completed AgentOS operation, an approved caption, a supported connected Buffer channel, and permission to share the media with Buffer and the public audience. For direct API use, obtain a Buffer API key through its current Settings → API controls and store it separately from the AgentOS key. Account permissions and API access apply. Buffer API access

The current AgentOS workflow catalog does not expose a native Buffer action. Use n8n or Zapier between the services, or implement the verified HTTP calls in your own backend.

1. Read the finished AgentOS output

Use your AgentOS credential to read the existing operation:

Example
GET https://api.bsquarerealty.com/v1/workflow-api/media/operations/OPERATION_ID?medium=poster
Authorization: Bearer YOUR_AGENTOS_KEY

Use medium=video for a video operation. Continue only when operation.status is succeeded. Select the correct entry in operation.artifacts, checking its kind, MIME type, dimensions, and any expiresAt value.

Do not send an AgentOS operation ID, an internal asset reference, or a template preview URL as the Buffer media URL.

2. Give Buffer a stable media URL

Download the approved final artifact while its link is valid, then upload it to media storage you are authorized to publish from. Use the direct HTTPS file URL. Check that it loads without an account login and that the host permits automated access.

Buffer's current API retrieves media from a public URL and requires it to remain reachable through publication. Its documentation explicitly warns against expiring signed links for scheduled posts. A private share page or a temporary AgentOS download link is not a dependable long-term queue asset. Buffer media hosting requirements

Publishing an asset to public storage is itself a sharing decision. Use only media cleared for that audience. Keep API keys and personal client information out of the file, path, caption, and URL.

3. Create a draft first

For a no-code route, connect Buffer in Zapier and use the action options currently offered for your channel. Choose a draft or review mode if available. Do not assume an action named “Add to Buffer” is a harmless preview.

For direct API use, Buffer currently accepts GraphQL requests at https://api.buffer.com with its own Bearer credential. The example below combines Buffer's documented image-post and draft options. Replace the channel, caption, and media URL with approved values.

Example
mutation PrepareCampaignDraft {
  createPost(input: {
    channelId: "YOUR_VERIFIED_BUFFER_CHANNEL_ID"
    text: "YOUR_APPROVED_CAPTION"
    schedulingType: automatic
    mode: addToQueue
    saveToDraft: true
    assets: [{
      image: { url: "https://YOUR_PUBLIC_MEDIA_HOST/approved-poster.jpg" }
    }]
  }) {
    ... on PostActionSuccess {
      post { id text }
    }
    ... on MutationError {
      message
    }
  }
}

Send that mutation as the JSON request's query value:

Example
POST https://api.buffer.com
Authorization: Bearer YOUR_BUFFER_KEY
Content-Type: application/json

In n8n, use a separate HTTP Request credential scoped to Buffer. In Zapier, use the authorized Buffer connection or a separate API by Zapier connection for api.buffer.com. Never send the AgentOS key to Buffer.

For a video, replace the image asset with a video asset containing the approved MP4's stable public URL. Keep saveToDraft: true while reviewing. Buffer's supported content types and automatic-publishing capabilities vary by social channel. Image request, video request, draft behavior

4. Verify, then schedule

Inspect GraphQL's response, including any top-level errors and MutationError. Record the returned Buffer post ID, then open the draft in Buffer and verify the channel, media, caption, and publishing options. HTTP 200 alone is not proof that the mutation succeeded.

Once approved, schedule the existing draft in Buffer. Creating a draft does not publish it, and creating a queued post does not prove that the social network later accepted it. Confirm the final publishing result in Buffer.

If the response is lost, look for the original post before repeating createPost; AgentOS's requestKey does not carry over to Buffer.

What this setup does not do automatically

The AgentOS API key routes do not upload media to your hosting provider, create Buffer credentials, select a social channel, or publish a post. Configure each step deliberately. If your Buffer account lacks the needed channel permission, stop at the approved file and caption instead of switching destinations.

Verification: AgentOS source and Buffer's current official API documentation were reviewed on November 9, 2026. No Buffer credential, storage upload, draft creation, or live publication was tested in this review.