All guides

Free guide · Reel 53

OpenReply: auto-DM everyone who comments your keyword, on a tool you host yourself

Someone comments "LESSON" under your Reel, and a few seconds later they get a private message with your link. That's comment-to-DM automation, and OpenReply is a free, open-source version of it that you host yourself.

Paid comment-to-DM tools charge a monthly fee, and on some plans the price goes up as more people use your automation, so a Reel that takes off can make your bill bigger. OpenReply's code is free. You pay for the hosting it runs on, and you need one afternoon of setup, which Claude Code can walk you through.

Who it's for

Businesses that post on Instagram and want to send a guide, a price list, a booking link or a discount to everyone who asks, without answering each comment by hand.

Our example: a small music school in Leicester. Under each Reel it writes "Comment LESSON for a free trial lesson", and every commenter gets the booking link by DM.

What you need first

This list comes from OpenReply's setup guide on GitHub (github.com/diwenne/openreply, see docs/setup.md). Check it there, because it changes.

  1. An Instagram Business or Creator account. A personal account can't be connected. You can switch it in the Instagram app under the account type settings.
  2. A way to connect Instagram. Two options. Your own Meta developer app, which costs no subscription but means more setup and Meta's App Review where it's required. Or Zernio, which the guide recommends for a simpler setup; it is an optional paid service and OpenReply's sponsor.
  3. Hosting. OpenReply has a web app plus a worker that must run all the time, with a PostgreSQL database and Redis. The guide uses Vercel for the web app and Railway for the rest. The always-on part is the monthly cost, so check the current prices for your usage.
  4. Email for logging in. You sign in with an email link, so you need an email sending service (the guide uses Resend, with a verified domain) or your own mail server.
  5. A GitHub account and Claude Code. You copy (fork) the project to your own GitHub, and Claude Code helps you deploy it.

Step by step

  1. Decide how you connect Instagram. Read the two options above and choose before you start, because it changes which secrets you need.
  2. Fork the project. Open github.com/diwenne/openreply, click Fork, then clone your copy to your computer.
  3. Open Claude Code in that folder and paste the prompt below. The repo's setup guide has its own section for AI assistants. Our prompt tells Claude Code to follow it, explain each cost, and ask before every account or payment.
  4. Create your first campaign. In the OpenReply dashboard, pick a post, set the keyword, and paste the message you want to send. Use the DM template below.
  5. Test it with a second account. Comment the keyword from another Instagram account and check that the DM arrives and the link works.
  6. Switch on the tracked link. OpenReply can send a tracked link, so you see who clicked, not just who commented.

The setup prompt and the DM template

Prompt for Claude Code: set up OpenReply with me
This folder is my fork of OpenReply. Read README.md and docs/setup.md in full before you change anything, then follow the section "Set it up with an AI assistant".
My goal: one Instagram account for my business, [business type], and I want the simplest setup I can maintain on my own.
Rules while you help me:
- Before each step, explain in plain English what it does and what it will cost per month.
- Ask me before you create any account, choose a paid plan or connect Instagram.
- Keep every key and password in the hosting secrets or a local .env file. Never commit them.
- When it's live, help me create one test campaign and stop.
DM template
Hi! Thanks for commenting. Here's your [free trial lesson / guide / price list]: [link]
[One line on what to do next, e.g. "Pick any free slot this week and bring your own instrument if you have one."]
[Your first name], [business name]

Three common mistakes

Starting on a personal account

It won't connect. Switch to a Business or Creator account first, before any setup.

Forgetting the worker

The web app alone can't send anything. The worker has to stay on all the time, and it shares the same database and keys as the web app.

Hiding the keyword

If the keyword isn't in the caption and on screen, people comment something else and get nothing. Write it the same way in both places.

OUR EXTRA TIP

Pick a keyword that is one short word, with no spaces and no emoji.

Short words get typed correctly on a phone. Then test it yourself before the post goes live.

More free guides.

Every free guide from our Reels, in one place.