Tutorials

How to Set Up Instagram Comment-to-DM Automation Without ManyChat

A plain-English guide to auto-replying to Instagram and Facebook comments with a private message, using Meta's official API. What you need, how it works, and the edge cases most tools miss.

Athanasios-Ioannis Panagiotakopoulos

Athanasios-Ioannis Panagiotakopoulos

Author

October 2, 2026
7 min read

How to Set Up Instagram Comment-to-DM Automation Without ManyChat

TL;DR: When someone comments a keyword under your post, Meta lets your Page send them one private message. You can build that yourself on Meta's official API with a small cloud function, no monthly per-contact fee. The hard part is not the happy path. It is the people who spell the keyword differently and the people whose messages are closed. We built this for our own product and it has answered hundreds of comments automatically.

You have seen it a hundred times: "Comment GUIDE and I'll send it to you." It works because it turns a passive viewer into a lead in one step, and every comment also tells the algorithm the post is worth showing to more people.

Most businesses do it with ManyChat or a similar tool. That is a perfectly good choice. But if you want no per-contact fees, full control of the edge cases, and leads that go straight into your own database and email list, building it yourself is very doable.

//What is comment-to-DM automation?

It is a small program that watches the comments on your Instagram or Facebook posts. When a comment contains your keyword, it sends that person a private message, usually with a link. The person never has to message you first.

Meta supports this officially through a feature called private replies: a business can send one private message in response to a comment on its own post, for a limited window after the comment was made.

//What you need before you start

  • An Instagram professional account (Business or Creator) connected to a Facebook Page
  • A Meta developer app with the permissions for reading comments and sending messages on Instagram and your Page
  • Webhooks subscribed to Instagram comments and your Page feed, so Meta tells your app the moment a comment arrives
  • A long-lived Page access token, stored as a secret, never in your code
  • Somewhere to run a small function: a Supabase Edge Function, a Netlify or Vercel function, or n8n if you prefer no code
  • App Review: while your app is in development mode it only works for people with a role on the app. To reply to the public, Meta has to approve it

//How the flow works

  1. 1Someone comments "433" under your reel.
  2. 2Meta sends a webhook to your function with the comment text, the comment ID and who wrote it.
  3. 3Your function checks the text against your keyword.
  4. 4If it matches, it calls Meta's API to send a private reply to that comment, with your link.
  5. 5Optionally, it likes the comment or posts a short public reply so others see it works.
  6. 6The person taps the link and lands on a page that asks for their email.

That is the whole system. In our case the bot went from idea to live in one day.

//The edge cases that decide whether it works

This is where off-the-shelf setups quietly lose people.

People type the keyword in many ways

Your keyword is "433". People type "4-3-3", "4:3:3", "4 3 3", "1-4-3-3" and "433!!". If you match the exact string only, you miss a real share of your leads and you never find out.

The fix: normalise the comment before matching. Strip spaces and punctuation, lower-case it, and accept the variants you see in your own comments. Then audit: once a week, compare every comment against every reply your bot sent.

Some people have messages from businesses switched off

When that happens Meta refuses the private message. Most tools log an error and move on, so the person who asked for your guide gets nothing.

The fix: catch that refusal and reply to the comment publicly with the link instead. Nobody is left without an answer.

Do not send the same person the link twice

People comment twice, or reply to their own comment. Keep a small record of which comments you have already answered and skip repeats.

Keep the message simple

We learned this one the hard way: a link full of tracking parameters looked suspicious and people did not click it. A plain, clean link performs better. And if your landing page asks for an email, say so in the message, or people will reply with their email in the chat instead.

//Build it yourself or use ManyChat?

ManyChat and similarCustom on Meta's API
Setup timeAn afternoonA day or two with a developer
CostMonthly, grows with contactsHosting is usually free or close to it
Edge casesWhat the tool supportsWhatever you decide
Your dataLives in their platformGoes straight to your database and email list
FlexibilityTemplatesAnything the API allows

If you post occasionally and want it running today, use a tool. If comments are a real lead channel for you, a custom bot pays for itself quickly and you own the whole funnel.

//What happens after the DM matters most

The DM is only the first step. The link should go to a fast page that asks for an email in exchange for something genuinely useful. Then a welcome email should arrive straight away, followed by a short series. That is where the comment turns into a customer. We cover that part in our email automation case study.

//Frequently asked questions

Is comment-to-DM automation allowed by Instagram?

Yes, when it uses Meta's official API and private replies feature from your own business account. Avoid tools that log in as you or scrape, which can get an account restricted.

Do I need a Facebook Page for Instagram DM automation?

Yes. Instagram's messaging API works through a professional Instagram account connected to a Facebook Page.

How fast does the DM arrive?

Usually within a few seconds of the comment, because Meta notifies your function straight away through a webhook.

Can it work on Facebook posts too?

Yes. The same function can listen to your Page's post comments and send private replies through Messenger.


See how we built ours, and the numbers behind it, in the comment-to-DM case study. Want one for your business? Tell us about your posts.

Share this article

Ready to Experience AI Automation?

Transform your workspace with voice-powered AI. Start your free trial today.

Start Free Trial