Meta automation API for Instagram and Facebook
With the Meta automation API, a flow reacts to Instagram and Facebook comments, incoming messages, and taps on buttons or quick replies. You set its conditions and actions through the API or in the dashboard, and every execution is logged for review.
Last updated: October 2026
Official APIsDirect engineer support
// 1. Create the flow as a draft: POST /api/v1/automations// 2. Run the saved draft once on a real conversation:{ "input": { "conversationId": "conv_123", "text": "price" }}// 3. Make the draft live: POST /api/v1/automations/flow_123/publish// 4. List runs: GET /api/v1/automations/flow_123/executions?teamId=team_123// 5. Read one run and its steps: GET /api/v1/automation-executions/exec_123- customers
- 17,242+
- connected accounts
- 1.09m+
- uptime
- 99.881%
- Trustpilot
- 4.8 / 5
One flow model: a trigger, then conditions and actions
Event triggers
A flow starts on a comment, an incoming DM, a quick-reply tap, or a button tap.
Response steps
Conditions decide whether the run continues. Actions send a message, a private reply, or a public reply to the comment.
Drafts and execution logs
Edits stay in a draft until you publish them, and the execution history shows how each step went.
Create, test, and publish a Meta automation
- 01
Create a draft flow
Send one trigger and its steps to bundle.social. The new flow is a draft and does not run until you publish it. - 02
Test the saved draft
A test runs the draft steps once on a real conversation or comment. It sends real messages and counts as a run. - 03
Publish and read executions
Publishing makes the draft the live version. Every run then records its version, input, step results, and errors.
Example
Flows that carry account and conversation context
Every flow already knows which account and team it belongs to, so you don’t have to pass that context yourself when a comment or DM arrives.
On Instagram and Facebook, a bundle.social flow has the same shape: one trigger and up to 100 steps. The trigger names the platform, the connected account, and the event, which is a comment on a post, an incoming DM, a quick-reply tap, or a button tap. Steps run top to bottom. If a condition step does not match, the run stops and does not use the account’s monthly run budget. Each flow listens on one account, so running the same automation on an Instagram account and a Facebook Page takes two flows.
Flows are versioned. When you save a change it goes into a draft, and the published version keeps answering events in the meantime. Publishing validates the draft, makes it the live version, and sets the flow to active. Every execution records the version that handled it, so you can trace a reply back to the version that sent it.
Test runs are not a sandbox. A test takes the saved draft, skips keyword matching and delays, and runs the steps on a real conversation or comment. Messages really go out and the run counts toward the monthly budget, so test in a conversation with a second account of your own.
Runs do not send their own webhook. To follow them, read a flow’s execution history, filtered by status, account, conversation, or comment, and open a single run to see its steps. A run waiting on a delay shows as queued, and a skipped run carries an error code with the reason.
Example: create, test, publish, and monitor a flow
Instagram and Facebook flows use the same endpoints. This request tests a saved draft on a real conversation before it goes live. Swap in your own IDs for the samples.
The test call returns the finished execution even if a step failed, so check its status and error. For comment flows, pass a fetchedCommentId instead of a conversationId. If the draft is not ready, publishing returns 400 and lists the validation problems.
POST /api/v1/automations/flow_123/testRead about testing and execution logs
Getting started
Build flows visually or define them through the API
Supported accounts and limits
- This page is about Instagram and Facebook. TikTok comment automation runs under its own platform scope.
- A comment flow covers one post or every post on the account, including posts published outside bundle.social.
- Which actions a flow can use depends on the platform, the trigger, and the account and its permissions.
- There is no webhook for automation runs. Read the results through the API or the dashboard.
- bundle.social keeps messages and execution logs for 30 days. Store the runs you need longer in your own system.
- Data retention policy
FAQ
Questions developers ask before building
Which platforms does Meta Automation API cover?
What can trigger a flow?
Do edits go live as soon as I change a flow?
Can I test a flow before publishing?
Can I monitor executions from my backend?
/api/v1/automations/:id/executions with filters such as status=FAILED, and read one run with GET /api/v1/automation-executions/:id. Messages that flows send still arrive as normal conversation.message.created webhook events.Which plans include DMs and automations?
How long are messages and automation logs kept?
Build Meta automations into your product
Save a draft, run it once on a conversation you own, then publish.Message and automation allowances on paid plans are counted per connected account.