What you’ll need
- An Instagram business or creator account, ideally connected to a Facebook Page.
- Claude Code, Codex or Cursor to paste the prompt into. Claude Code needs a paid Claude plan (Pro is $20 a month).
- An email tool for your list. Most have a free plan for a small list.
- Somewhere for the bot to run all the time. Small hosting plans start around $5 a month, and the prompt tells you the cost before it sets anything up.
Paste this into your AI tool
Paste into Claude Code
Build me my own Instagram comment bot that gets people's email. When someone comments my keyword on a post, it should: 1. Reply under their comment so other people see it works. 2. Send them a DM with a button. 3. When they tap the button, ask for their email. 4. When they type it, send the link in the DM, send the same link to that email, and add them to my email list. First ask me, one at a time: 1. My Instagram handle (it has to be a business or creator account), and whether it's connected to a Facebook Page. 2. The keyword, and the link I'm giving away. 3. Which email tool I use for my list (for example Mailchimp, Kit, MailerLite or Brevo), or help me pick one with a free plan. 4. Where to host the bot. Pick the cheapest option that stays on all the time and tell me the monthly cost before we set it up. Then build it: 1. Walk me through making a Meta developer app for my own account, one click at a time, with the permissions it needs to read comments and send messages. I'm the admin of the app and it only runs on my own account, so tell me if any step asks for Meta's App Review and why. 2. The first DM goes out as a private reply to the comment, since that's the only way to message someone who hasn't messaged me. Put the button in that first DM. 3. If the email they type doesn't look like an email, ask once more, nicely. 4. Only answer comments on posts whose caption says Comment "KEYWORD", so a random comment with that word on an old post doesn't set it off. 5. Never answer my own comments, and never message the same person twice for the same comment. 6. Write the comment reply, the three DMs and the email in my voice. Keep each DM under 25 words. Show them to me before you turn anything on. 7. Keep a simple log of everyone who came through: their handle, the email, the keyword and the date. 8. Test it with me: I'll comment the keyword from a second account, and you show me every step landing, including the email in the inbox. Plain words when you talk to me. Tell me what anything costs, including any up-front credit, before you set it up.
It asks four questions, walks you through the Meta setup a click at a time, shows you every message before it goes live, and ends with a test from a second account.
What the person who comments sees
- A reply under their comment, so everyone scrolling sees it works.
- A DM a second later, with a button.
- They tap it, and the bot asks for their email.
- They type it, and the link shows up in the DM and in their inbox.
Optional
Get the next free build by email.
One build like this every Tuesday, with the prompt to copy. The guide stays free either way.
No spam, unsubscribe anytime.
Good to know
- Just want the DM, no email? Instagram has a free built-in tool for that: set up comment a word for free.
- Instagram lets you send one private reply per comment, within 7 days of it. After that, you can only message someone within 24 hours of their last message to you. That’s why the first DM has a button: the tap opens the conversation.
- On your own account you’re the admin of your Meta app, so you can run it without Meta’s App Review. Running it on other people’s accounts is when Meta wants to review it.
- Some people type their email wrong. The bot asks again once, and the link in the DM gets to them either way.
- Turn the bot on before the post goes up, and test it from a second account. A comment from your own account won’t set it off.
- Put the keyword in the caption exactly as Comment “LIST” (with your word). The bot only answers posts that say it.
Read next
- See what your website does when a customer asks for a quoteOne prompt reads your site like a new customer: the form, the reply time, the booking link and after hours.
- How to set up "comment a word" on Instagram for freeInstagram's free built-in tool DMs anyone who comments your keyword. One prompt writes the whole setup.
- Auto-reply to every website inquiry in under a minuteOne prompt builds an agent that answers in the owner’s words, with one next step, and sends a test.
Stuck? Message me on LinkedIn and I’ll help you get it running.