Log inStart Free Trial
easyCoexistence Official APIs

Instagram AI auto-reply for DMs and comments

Instagram AI auto-reply runs through Meta's Instagram API: a webhook reports new DMs and comments as they arrive, the business's own AI writes the reply, and the API sends it. A DM gets its reply within 24 hours of the person's latest message, once the account allows access to messages; a comment gets a public reply, or one private reply by DM within 7 days.

easyCoexistence lets a business's AI reply on Instagram: automations reply to DMs and comments on their own with a fixed text, an AI reply written with your own Anthropic, OpenAI or OpenRouter key, an AI agent with its own knowledge, or your own agent through a webhook, and comment-to-DM rules send private replies around the clock.

24 hours

The standard window for replying after a person's DM, for most user actions.

1 per comment

Private replies Meta allows per comment, within 7 days; further messages wait until the person responds.

750 an hour

Private replies to post and Reel comments Meta allows per Instagram professional account.

Disclose

Where the law requires it, an automated chat must tell people they are talking to an automated service.

50 rules

Comment-to-DM rules one Instagram account can hold on easyCoexistence, each with a DM of up to 1,000 characters.

How does an AI reply reach a DM or a comment?

In three moves. Meta's webhook tells the app about a new DM or comment as it arrives; the app hands the text to an AI model, or to the business's own agent; and the reply goes back through the API, as a DM, a public reply under the comment or a private reply. Nothing reaches a person who has not written or commented first.

1A DM or commentFrom someone who wrote first
2WebhookMeta notifies the app as it arrives
3The AI writesA model with the business's instructions, or its own agent
4The API sendsA DM, a public reply or one private reply

What does Meta allow an automated reply to do?

Meta's rules for each app on the API apply whether a person or a model writes the text, and only the separate 7-day Human Agent window is kept for replies a person writes:

  • DMs: replies to people who wrote first, within 24 hours of their latest message.
  • Comments: public replies under the comment, and hiding or showing it.
  • Private replies: one DM per comment, within 7 days, delivered to the inbox or to message requests; a follow-up waits until the person answers.
  • Rate: up to 750 private replies an hour to post and Reel comments, per account.
  • Disclosure: where the law requires it, the chat says it is automated at the start, after a long pause, or when it passes from a person to automation.

How do easyCoexistence's automations decide when to reply?

An automation is a trigger and a flow of steps, up to 30 in a line and 60 in all, that easyCoexistence runs on its own, around the clock, with no chat open. On Instagram, dm_received takes the matches any, keyword, phone_number, first_message and outside_hours, the last with opening hours in a timezone, comment_received takes any, keyword or phone_number, on one post or all of them, and tag_added starts a flow when a contact gets a tag. When several automations match, the most specific one runs: phone_number, then keyword, then first message, then outside hours, then any.

Which steps can an automation take?

Steps run top to bottom, and condition and ai_decide split the flow into paths that each hold their own line of steps, nested up to 4 deep. On a DM, reply_text and ai_reply reply in the DM, and agent, ask, send_file and handoff work there too; on a comment, either reply step sends the comment's single private reply, so a comment automation holds at most one of them before the person answers, beside reply_comment for a public reply and hide_comment.

reply_textA fixed reply, sent as a DM
ai_replyA reply written by Anthropic, OpenAI or OpenRouter with the business's own key
call_webhookThe event, signed, sent to the business's own agent, whose reply goes out
reply_commentA public reply under the comment
hide_commentHides the comment
wait1 to 1,380 minutes; on a DM, the run stops there if the owner answers from the app meanwhile
stopEnds the run, as the last step

How does the business's own AI write the reply?

In one of three ways. ai_reply calls Anthropic, OpenAI or OpenRouter with the business's own key, saved in the dashboard and never passed through a chat, a prompt about the business, and up to 20 earlier messages of the conversation, 10 by default. an agent step hands the DM to one of the business's AI agents, which answers from its own instructions, knowledge and tools on the business's own key. call_webhook posts the DM or comment, signed with X-EC-Signature, to the business's own agent or backend, and replies with the text it returns as {"reply": "..."}.

How do comment-to-DM rules work?

A rule pairs keywords with a DM and, if you like, a public reply. When a comment contains one of the keywords, ignoring case, the commenter gets the DM as their private reply and the public reply under the comment, with no agent involved. A rule covers one post or all of them, and the oldest matching rule replies; rules go first, and automations take the comments no rule matched. create_comment_rule, list_comment_rules and update_comment_rule manage them.

What keeps automated replies in check?

Guards built into the runner, so an automation can be left running:

  • A reply sent from the Instagram app pauses the automation on that chat, for 4 hours by default and up to 168.
  • Free-form replies go out only within 24 hours of the person's latest message.
  • AI replies are capped per chat, at 10 an hour by default.
  • test_automation runs the steps on a sample message without sending anything.
  • list_automation_runs explains each run that replied or was skipped, and the owner is emailed when an automation fails.

How do you set one up from Claude or ChatGPT?

Ask in plain words, for example: when someone comments PRICE on this Reel, send them the price list by DM and reply that it is in their inbox. The assistant creates the rule or automation, runs test_automation, and reads list_automation_runs when you ask why something did or did not answer. AI keys are added in the dashboard, never through the chat.

Common mistakes

  • Putting two DM steps in a comment automation. Meta allows one private reply per comment, so keep one reply_text or ai_reply and reply in public with reply_comment.
  • Writing a DM close to 1,000 characters with emoji or accents. Meta counts the limit in UTF-8 bytes, so text under 1,000 characters can still be refused.
  • Picking a short keyword for a rule. Rules match keywords anywhere in the comment, so art also fires on start and party; automations can match exact words instead.
  • Leaving Allow access to messages off. The account's DMs through the API fail until it is turned on in the Instagram app, under Message controls and Connected tools.
Doing this with EasyCoexistence

US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

Can AI reply to Instagram DMs automatically?

Yes, within Meta's rules: the person writes first, and replies go out within 24 hours of their latest message. An automation's ai_reply step writes each reply with the business's own AI key.

Can AI reply to Instagram comments?

Yes, in public under the comment, or in private with one DM per comment, sent within 7 days of it.

Does an automation stop when I reply from the app?

Yes. Replying from the Instagram app pauses the automation on that chat, for 4 hours unless you change it, anywhere from 0 to 168 hours.

Which AI models can write the replies?

Models from Anthropic, OpenAI or OpenRouter, called with the business's own key saved in the dashboard, an AI agent built in easyCoexistence, or your own agent, reached through a call_webhook step.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on