To send an automatic DM when someone comments on Instagram, you need a professional account and a tool that works through Instagram's official API. The tool watches one post for a keyword and sends each commenter a single private reply in their DMs. You get one message per comment, so everything the person needs has to fit in that first DM.
What a comment to DM campaign is
You publish a post or reel that says something like "Comment GUIDE and we'll send it to you". A person comments the word. Your tool sees the comment, sends that person a DM with the link or code, and usually posts a short public reply under the comment so they know to check their inbox.
It works because the person asked first. You are not messaging strangers. You are answering someone who raised their hand, which is the only kind of automated DM Instagram's messaging API is designed for.
What you need before you start
- A professional account. Business or creator, either works. Personal accounts cannot use the API.
- A tool built on the official API. Avoid anything that asks for your Instagram password and logs in as you. Official tools connect through Meta's login screen and ask for specific permissions.
- The thing you are giving away. A link, a PDF, a discount code, a spot on a list. If you hand out codes, decide whether everyone gets the same one or each person gets their own.
- A second account for testing. You cannot see the campaign the way a follower does from your own account.
How to send an automatic DM when someone comments on Instagram, step by step
- Pick the post and the keyword. Choose one short word that is hard to misspell: GUIDE, CODE, LINK. Say it in the caption and in the video itself. Make sure matching ignores capital letters and punctuation, because people will write "guide!!" and "Guide pls".
- Write the DM template. Greet the person, deliver the thing, stop. A sample is below.
- Write the public reply. Prepare a few variations, such as "Sent, check your DMs" and "It's in your inbox now". The same sentence repeated under a hundred comments looks robotic to readers.
- Upload codes if you use them. One code per row. The tool should hand each code out exactly once.
- Set a pace. A few people per minute with random pauses is plenty for most campaigns.
- Test from your second account. Comment the keyword, check the DM, check the public reply. Then comment again and confirm you do not get a second DM.
- Go live and watch the first hour. Most problems show up in the first twenty comments.
The one reply per comment rule
Meta calls this message a private reply, and the rule is strict. You can send one message to the commenter per comment, and you have 7 days from the comment to send it. You can only follow up if the person responds, and then you have 24 hours from their response. The official private replies documentation spells this out.
In practice this means no "Hi, want the link?" followed by the link. Put the link in the first message. For the full set of limits, including the message size cap, see Instagram private reply rules.
A sample template
Hi {{name}}, here's the guide you asked for:
{{link}}
Your access code: {{code}}
This code is yours only.
Three things make this template work. It uses the person's name, so it reads like a reply and not a broadcast. It delivers in the first message. And it is short: a text message through the API must be 1000 bytes or less, and bytes are not characters. An emoji or an accented letter takes more than one byte, so a message that looks short can still be over the limit.
Common mistakes
Sending twice to the same person. People comment the keyword two or three times when the DM is slow. If your tool does not remember who already received a message, they get duplicates and you burn codes.
Assuming everyone received it. Messages to people who do not follow you can land in their Requests folder, and some accounts cannot receive messages at all. Plan for the "I didn't get it" comments before you launch. We cover the fix in why an Instagram DM goes to Requests.
A keyword that is a common word. If your keyword is "yes" or "me", you will match comments that were never requests. Pick a word people only write on purpose.
No public reply. Without it, commenters have no signal that anything happened, and new visitors cannot see that the offer is real.
Launching without a test. A wrong link in a template goes out to everyone before you notice.
Ignoring near misses. Some people write "send it to me too" and never type the keyword. Decide in advance whether a person or a tool will catch those.
Where a tool helps
You can run a small campaign by hand: read each comment, send the DM, reply publicly, keep a spreadsheet. It breaks down once comments arrive faster than you can answer, or when codes must be unique.
We built CometoDM after running into exactly these problems in our own campaign. It matches the keyword, sends one personalized DM per person, replies under the comment and keeps a record so nobody is messaged twice. It is still in development with a waitlist, so for now the checklist above is the useful part: one keyword, one complete first message, a test from a second account, and a plan for the people the DM does not reach.