Instagram auto reply API for comments and DMs
The Instagram auto reply API answers comments, incoming DMs, and taps on quick replies or buttons, based on rules you define. Set the trigger and the response through the API or in the dashboard, and check the execution history to see what each run did.
Last updated: November 2026
Official APIsDirect engineer support
{ "teamId": "team_123", "name": "Pricing question", "platformScope": "INSTAGRAM", "definition": { "trigger": { "type": "DM_RECEIVED", "platform": "INSTAGRAM", "socialAccountId": "sa_instagram_1", "keywords": [ "price", "pricing" ], "actionDelaySeconds": 3 }, "steps": [ { "type": "SEND_MESSAGE", "message": { "text": "Happy to help. Which plan are you looking at?", "quickReplies": [ { "id": "qr-starter", "label": "Starter", "payload": "PLAN_STARTER" }, { "id": "qr-pro", "label": "Pro", "payload": "PLAN_PRO" }, { "id": "qr-person", "label": "Talk to a person", "payload": "HUMAN" } ] } } ] }}- customers
- 17,242+
- connected accounts
- 1.09m+
- uptime
- 99.881%
- Trustpilot
- 4.8 / 5
Different replies for different Instagram events
Comment rules
A comment flow watches one post for your keywords and answers in public, in private, or both.
Message and payload rules
Incoming DMs can start a message flow, and so can taps on quick replies and buttons, matched by payload.
Run visibility
Execution history shows the event, the flow that matched it, and the result or error for each step.
How to create an Instagram auto reply
- 01
Prepare the connected account
Grant the Instagram permissions. Flows that read or send private messages also need messaging enabled. - 02
Define the trigger and actions
Pick what starts the flow: a comment, a DM, or a quick-reply or button payload. Then add keyword conditions and the replies. - 03
Test, publish, and inspect
Test the flow on the kind of event it is meant for, publish it, and watch the results in the execution history.
Example
Instagram auto reply recipes for pricing, new DMs, and comment keywords
When a DM mentions “price”, a flow can ask which product or plan the person means. They answer by tapping a quick reply, and that choice travels into the next flow, which uses it to pick what to say.
In bundle.social that is two flows. The first listens for incoming DMs with the keyword “price” and replies with a set of quick replies, each carrying a payload such as PLAN_PRO. A tap on one starts the second flow, which has a quick-reply trigger for that payload and sends the matching answer. Quick-reply flows run ahead of incoming-DM flows, so one tap never gets two answers.
Instagram limits message text to 1,000 bytes, not characters, so emoji and non-Latin letters use it up faster. One message can carry up to 13 quick replies, each with a label of at most 20 characters. Buttons can open a link or send a postback. Instagram has no button that dials a phone number.
DM flows also have a loop brake in bundle.social. Across all your flows, one person gets at most one automated reply per minute and six per hour. Quick-reply taps are exempt, which makes tap-driven conversations a better fit for Instagram auto replies than open-ended chat.
The same flows can be built in the dashboard without writing JSON. Automations has four tabs: Builder, Flows, Provider settings, and Logs. In Builder you choose the team, the Instagram account, and the trigger (Comment created, DM received, Quick reply clicked, or Button clicked), then add keywords and actions such as a private reply, a public reply, a DM response with quick replies or buttons, or a like. A panel beside the form runs publish validation, lists the steps in order, and shows the API definition JSON that POST /api/v1/automations accepts.
Save draft stores the flow without running it, and Publish makes it live. On a post in the dashboard, Create automation opens the builder with that post already selected. The Logs tab lists every run of a flow with its status, time, and any error, plus the status and output of each step.
| Recipe | Trigger and actions |
|---|---|
| Pricing question | A DM received trigger with the keywords price and pricing sends a message with three quick replies. A second flow with a Quick reply clicked trigger on PLAN_PRO sends the Pro answer. The first flow is the JSON at the top of this page. |
| Any incoming DM | A DM received trigger with no keywords matches every message, including Instagram story mentions, which carry no text. One SEND_MESSAGE step can greet the person and offer buttons for the next step. |
| Comment with a keyword | A Comment created trigger on one post, with a keyword such as guide, sends a SEND_PRIVATE_REPLY with the link in plain text and, if you want, a SEND_PUBLIC_COMMENT_REPLY under the comment. |
Each recipe is its own flow. Flows have no priority order, so a catch-all DM flow and a keyword flow that match the same message both answer it. Keep one catch-all per account, or make sure keywords do not overlap. The comment recipe is covered step by step on the Comment to DM API page.
Example: answer a “price” DM with quick replies
A draft flow that watches incoming Instagram DMs for “price” or “pricing” and answers with three quick replies. Use your own team and account IDs in place of the samples.
DM flows have no postId. The three-second delay stops the answer from landing instantly. Each tap needs a second flow with the QUICK_REPLY_CLICKED trigger and PLAN_PRO, or another choice, in its payloads.
Getting started
Build through the API or the dashboard
Supported accounts and limits
- A comment flow covers one post or every post on the account, including posts published outside bundle.social.
- Private messages only work when the account has the needed permissions and is eligible for messaging.
- Instagram decides which message formats and events exist. It has no phone-call button, for example.
- Pausing a flow stops it in every matching conversation. You cannot hand a single conversation over to a person.
- Data retention policy
FAQ
Questions developers ask before building
How does Instagram auto reply work?
Can Instagram auto replies respond to DMs as well as comments?
Is comment-to-DM the same as Instagram auto reply?
Does bundle.social generate AI replies automatically?
Can I create flows without writing their JSON manually?
What happens when two Instagram auto reply flows match the same DM?
Can I pause automation for one conversation when a person takes over?
Which plans include DMs and automations?
Create an Instagram reply flow
Create one flow for a single event and publish it when it works.Message and automation allowances on paid plans are counted per connected account.