Blog · AI and automation
Instagram comment-to-DM automation with the official API: how it works and what is allowed
How ‘comment a keyword and get the link by DM’ works with the official Instagram API, what Meta allows, and how to set it up without risking your account.
“Comment GUIDE and I will send it to you.” You have seen it on thousands of Reels. When it works, it multiplies comments, starts real conversations and gets your link in front of people who asked for it. When it is done with unofficial tools, it can get an account restricted. This is how to do it properly with the official Instagram API.
How it works
- Someone comments a keyword on one of your posts or Reels.
- Instagram notifies your automation through a webhook within seconds.
- The automation checks the keyword and sends the person a private reply with the link: a direct message linked to their comment.
- Optionally, it also replies publicly to the comment (“Sent! Check your DMs”) to encourage more people to ask.
What the official API allows
- It works with professional accounts (Business or Creator) connected through Instagram Login.
- A private reply can be sent once per comment, within a limited time after the comment (currently seven days).
- After the person answers the DM, you can keep talking within the standard 24-hour messaging window.
- The app that does it needs Meta’s App Review for the comment and messaging permissions before it can be used with accounts other than the developer’s own.
What to avoid
- Tools that log in with your password or simulate taps in the app instead of using the API. They break Instagram’s terms and are the usual cause of blocks.
- Sending messages to people who did not ask for them, or several messages in a row.
- Replying to your own comments or creating loops between accounts.
- Collecting more data than you need: the comment, the username and the post ID are enough.
Privacy, briefly
The person who comments starts the conversation by asking for the link, which is a clear legitimate interest. Explain what the automation does in a public privacy policy, store only the minimum data, delete it when it is no longer needed, and give creators a way to disconnect their account. You can read ours as an example: FamDev Comment Reply privacy policy.
How we built ours
FamDev Comment Reply runs on n8n workflows: one receives Instagram’s webhooks and verifies Meta’s signature, another checks the keyword chosen by the creator, sends the private reply with the link, answers the comment publicly and records the comment ID so the same person never receives the message twice. It does not read the creator’s inbox and uses no cookies, analytics or advertising tools.
Summary
Comment-to-DM is one of the best organic growth tactics on Instagram, as long as it runs on the official API, respects the limits and is transparent about data. If you want it for your account or your clients’ accounts, see our AI agents and automation service or write to us.
Related services
AI agents and automation
AI agents and bots on Telegram, Instagram and WhatsApp, and n8n workflows that connect your tools (Shopify, Notion, Gmail, CRMs) with language models.
