
The Operator's ChatGPT Prompt Book
100 prompts I actually use to run my businesses. Organized the way an operator thinks.
Read →
BY STEVE TAN
AI isn't a tool. It's leverage. Sharing what's working week by week.
ManyChat cut its free plan from a thousand contacts to twenty five, and the paid tiers scale with the number of people who trigger your automation, which means a reel that pops off raises your bill. OpenReply is the free open source version, built by a seventeen year old who got tired of paying. This is the full deploy in the order that actually works, the seven steps that fail silently if you miss them, and the one prompt that does the whole thing for you.
Steve Tan
TL;DR
OpenReply is a free open source comment-to-DM tool for Instagram, built by a seventeen year old developer and published on GitHub. Set a keyword on a post, and anyone who comments it gets an automatic DM with your link in seconds. It replaces the core of what ManyChat charges fifteen to sixty nine dollars a month for, with no contact caps. The repo costs nothing. You pay only for hosting, which runs a few dollars a month on Vercel and Railway free tiers for a single account. Setup is a one-time technical afternoon, and the repo ships a prompt you paste into Claude Code that drives the whole thing while asking you for values. This guide covers the corrected deploy order, the exact environment variables, the seven steps that fail silently, and how to tell within sixty seconds whether it is actually working. Running it for your own account never requires Meta App Review.
Read time: 8 min
Comment-to-DM is the single highest-converting mechanic on Instagram. You post a reel, you say "comment REPLY and I'll send it," and the tool DMs the link to everyone who does. It works because the comment is public proof and the DM is a private, opened, one-to-one delivery.
The problem is that the tooling for it has been rented, not owned. ManyChat is what most creators pay for this, and the free plan went from a thousand contacts down to twenty five. Paid runs fifteen to sixty nine dollars a month, and the pricing scales with how many people trigger your automation. Which means the reel that finally performs is the reel that raises your bill.
OpenReply is the open source version. It is a GitHub repo you deploy on your own hosting. It watches your Instagram comments through Meta's webhook, matches a keyword you set per post, and fires the DM within seconds. No contact ceiling, because there is no vendor counting your contacts.
It was built by Diwen, a seventeen year old who got tired of paying for the subscription and wrote his own. The repo is at github.com/diwenne/openreply.
This is self-hosted software you run yourself. You will be opening a terminal and clicking through the Meta developer dashboard. If that is not you, skip to the honest limits section before you start.
| ManyChat | OpenReply | |
|---|---|---|
| Software | $15 to $69 per month | Free |
| Contact cap | 25 on free, tiered on paid | None |
| Cost when a reel pops off | Goes up | Stays flat |
| Hosting | Included | A few dollars per month |
| Setup time | Minutes | One afternoon, once |
| Who holds your Instagram token | ManyChat | You |
The repo itself is free. What you pay for is keeping the machinery running: a background worker plus a Postgres database and a Redis queue, which need to stay on. Free tiers on Vercel and Railway cover a single account. Add real volume or multiple accounts and you are into a few dollars a month, not a few tens.
The number that matters is the second row. Every subscription tool in this category prices against your success. This one does not.
A Facebook account. Meta developer registration requires one and there is no Instagram-only path.
An Instagram Business or Creator account. Personal accounts cannot receive the webhook.
A Resend account with a verified sender domain. Login is email magic links only, so without a verified domain nobody can sign in at all, including you. This is the requirement people skip.
Vercel for the web app and Railway for the worker, Postgres, and Redis. Free tiers on both are enough for one account.
You do not need to buy a domain. The free your-app.vercel.app URL is what everything points at, and OpenReply serves its own privacy, terms, and data-deletion pages there.
Deploy order matters here, and getting it backwards is the most common way to waste an hour. Railway comes first, because Vercel needs the database URLs that Railway generates.
Step 1. Railway first. Create a project. Add PostgreSQL. Add Redis. Then add the worker by connecting your fork of the repo. In the worker's settings, set Build Command to npm run db:generate and Start Command to npm run worker. Do not leave the default build, which runs a pointless next build and fails if it touches the database. Give the worker the internal database and Redis URLs, the *.railway.internal ones.
Step 2. Migrate the production database. Once, from your own machine, using the public Postgres URL:
DATABASE_URL="postgresql://...proxy.rlwy.net.../railway" npm run db:migrateStep 3. Vercel. Import your fork, add every environment variable, deploy. Vercel gets the public Railway URLs. The internal ones hang and time out from outside Railway's network.
The full variable list:
Create a free account to continue reading
The operator's library for building with AI.
“The most actionable AI resource library
I've found. Thanks Steve!”
James.H — Member since 2026
Join 2,845+ leaders, builders, and innovators
Already have an account?
| Variable | Note |
|---|---|
| NEXTAUTH_URL | Your Vercel URL |
| NEXTAUTH_SECRET | Generate one |
| CRON_SECRET | Generate one |
| ENCRYPTION_KEY | 32-byte hex, exactly 64 hex characters |
| DATABASE_URL | Public Railway Postgres URL |
| REDIS_URL | Public Railway Redis URL |
| RESENDAPIKEY | From Resend |
| EMAIL_FROM | Must be on your verified Resend domain |
| METAGRAPHAPI_VERSION | Per the repo |
| INSTAGRAMAPPID | Instagram product page, not Basic settings |
| INSTAGRAMAPPSECRET | Instagram product page |
| FACEBOOKAPPSECRET | App settings, Basic |
| WEBHOOKVERIFYTOKEN | Any string you invent |
Step 4. Create the Meta app. At developers.facebook.com/apps, choose type Business and use case Manage messaging and content on Instagram. Do not pick Facebook Login, which breaks OAuth later with a mismatched-client error. Do not pick the Marketing API, which brings review requirements heavy enough to block publishing.
Step 5. Collect the three secrets. INSTAGRAM_APP_ID and INSTAGRAM_APP_SECRET live under the Instagram product's API setup page. FACEBOOK_APP_SECRET lives under App settings, Basic. Note that the Instagram app ID is deliberately not the same number as the Facebook app ID on the Basic page. Set all three. The app verifies webhook signatures against both secrets so you never have to guess which one Meta signed with.
Step 6. Tester invite, both halves. In the Meta dashboard under App roles, add your Instagram username as an Instagram tester. Then open the Instagram app as that account and go to Settings and activity, Apps and websites, Tester invites, and accept. Both halves are required.
Step 7. OAuth redirect. In the Instagram product's business login settings, register exactly https://your-app.vercel.app/api/instagram/callback. No trailing slash.
Step 8. Webhook. Callback URL https://your-app.vercel.app/api/webhook, verify token matching your environment value, then subscribe to the comments field. If the Verify button greys out, re-paste the token, since editing the URL clears it. Test delivery with the console's Test, Send to My Server. It takes two clicks. The first only previews.
Step 9. Publish the app. Set the privacy, terms, and data-deletion URLs. OpenReply serves them at /privacy, /terms, and /data-deletion on your own domain. Then publish.
Step 10. Test end to end. Connect the account under Settings, Connect Instagram. Create a campaign with a keyword. Then comment that keyword from a different account, because your own comments are ignored by design.
The repo ships a ready-made prompt in its "Set it up with an AI assistant" section. Clone the repo, open it in Claude Code, paste the prompt, and it drives the entire deploy while asking you for values as it goes.
This is the intended path, not a workaround. The repo's own guide recommends it.
One security note worth taking seriously: the assistant will need your real secrets to finish, including your Meta app secrets and your database URLs. Only paste those into tools you trust, and rotate them afterward.
This is the part every setup guide skips, and it is the reason most people conclude the tool does not work.
None of these throw a useful error. The deploy succeeds, the dashboard loads, and nothing happens.
3. ENCRYPTION_KEY does not match across both services. The web app encrypts the Instagram token. The worker decrypts it. If the key is not identical on Vercel and Railway, every single send fails while everything else looks healthy.
*.railway.internal URLs work between Railway services and hang from anywhere else. The worker wants internal. Vercel wants public..../api/instagram/callback/ and .../api/instagram/callback are different URLs to Meta. Connecting fails with a redirect_uri mismatch.Seven failure modes. Six of them are configuration and one is a testing mistake, and between them they account for nearly every "it just doesn't work" report.
Most feature lists are flat. Here is the leverage-ordered version.
/api/health reports database, Redis, queue, and worker heartbeat. A worker.healthy: false means no DM will ever send even while webhooks are arriving normally. This one endpoint replaces most debugging.Six things. The first one is why you switch. The last one is why you stay, because self-hosted tools live or die on whether you can tell what broke.
This is a developer tool. You are deploying two services, configuring a Meta app, and managing environment variables. The afternoon is real, but it is a technical afternoon.
You own the uptime. Nobody is on call. If the worker dies, the DMs stop, and you find out from your comments section unless you check the health endpoint.
It is unofficial automation on someone else's platform. It uses Meta's sanctioned webhook and messaging APIs, which is the right way to do it, but Instagram's policies and API versions change and you are the one who has to keep up.
App Review is not required for you, and is required for a hosted version. Running it for your own account or a handful of testers never requires Meta App Review. If you want strangers to sign up to your instance, that is a different product, and it brings business verification and a screencast with it.
Local development needs a tunnel. Meta's webhooks cannot reach your machine directly. Run ngrok http 3000 and point NEXTAUTH_URL and both Meta URLs at the tunnel URL.
Webhooks arrive but no DM sends. Hit /api/health. If worker.healthy is false, the worker is down or misconfigured and nothing will ever send. If it is true, check that ENCRYPTION_KEY is byte-identical on Vercel and Railway.
"Insufficient Developer Role" on login. The tester invite was never accepted inside the Instagram app. Go to Settings and activity, Apps and websites, Tester invites.
The console test works but real comments do nothing. The app is still in Development mode. Publish it.
redirect_uri mismatch when connecting Instagram. Check for a trailing slash on the registered callback URL.
Nobody can log in, including you. Resend has no verified sender domain.
The Verify button on the webhook greys out. Re-paste the verify token. Editing the callback URL clears it.
Vercel requests hang or time out. You gave it the internal Railway URLs. Swap to public.
The build fails on Railway. The build command is still the default. Set it to npm run db:generate and the start command to npm run worker.
Comment-to-DM was never a hard technical problem. It is a webhook, a keyword match, and a message send. The reason it costs sixty nine dollars a month is that the tooling got there before the alternatives did, and the pricing model quietly aligned itself against the thing you actually want, which is a post that reaches a lot of people.
A seventeen year old looked at that bill, decided it was not worth paying, and published the replacement for free.
The tradeoff is honest. You take on an afternoon of setup and the responsibility for your own uptime, and in exchange the cost stops scaling with your reach and the token stays yours. For anyone posting consistently, that trade pays for itself in the first month and keeps paying every month after.
The creators who own this layer instead of renting it are going to run the same mechanic at ten times the volume for the same few dollars.
Credit: OpenReply is built and maintained by Diwen (@diwenne on GitHub). Check the repo for current license terms before building anything commercial on top of it.
Steve Tan
Builder · Operator · Advisor
20+ years building businesses the hard way across eCommerce, SaaS, agency, education, and supply chain. $200M+ in revenue. Now I help business owners turn AI into their unfair advantage.
More about SteveMore from Steve

100 prompts I actually use to run my businesses. Organized the way an operator thinks.
Read →

The custom prompt that runs your business idea through Sam Altman's Startup Playbook the way a YC partner would in a real interview. Free, ten minutes, brutally honest, full prompt included.
Read →

A full breakdown of the AI ad workflow that turns one product photo into a batch of finished video ads. Setup, prompting, briefing, and the parts most people miss.
Read →