Skip to content

Setup guide

From zero to your first automatic DM

A plain-language summary of the whole setup. Plan 30 to 60 minutes; everything here is free. Each part links to the detailed guide if you get stuck.

What you need before you start

  • An Instagram professional account (Business or Creator).
  • A second Instagram account for testing.
  • A Facebook account to sign in to the Meta developer dashboard.
  • Free GitHub, Supabase and Vercel accounts (or a server with Docker and an HTTPS domain).

Prefer Bahasa Indonesia? Panduan lengkap berbahasa Indonesia (opens in a new tab).

Part 1 · Deploy the app

About 15 minutes. Free accounts on Supabase (database) and Vercel (hosting), plus a GitHub account.

  1. Step 1: Create the database

    Where: Supabase

    Create a new project in a region close to your audience (for Indonesia: Singapore) and note the password. Under Connect, copy the Transaction pooler (port 6543) and Session pooler (port 5432) connection strings. Don't use the “Direct connection”: Vercel can't reach it on the free plan. You don't need to run any SQL.

    Done when: You have two connection strings.

  2. Step 2: Generate two secrets

    Where: Your computer

    Run openssl rand -base64 48 for APP_SECRET and openssl rand -hex 32 for CRON_SECRET (the guide has a Node.js alternative for Windows). Save APP_SECRET in a password manager: if it changes, stored secrets can no longer be read.

    Done when: You have APP_SECRET and CRON_SECRET.

  3. Step 3: Deploy on Vercel

    Where: GitHub + Vercel

    Fork the repository, import it in Vercel and add four environment variables: DATABASE_URL (transaction pooler), DATABASE_URL_UNPOOLED (session pooler), APP_SECRET and CRON_SECRET. Deploy. The database tables are created during the build. Then set the Vercel Function Region to the one next to your database and redeploy, or every page will be slow.

    Done when: The build log shows “[migrate] Database is up to date.”

  4. Step 4: Check it and sign in

    Where: Your new URL

    Open /api/health on your production domain; it should say "status":"ok". Sign in with admin / changeme123 (or the password you set); you must choose a new password right away.

    Done when: You are in the dashboard with your own password.

Full deployment guide (opens in a new tab)

Part 2 · Connect Instagram

About 15 to 30 minutes in the Instagram app and the Meta developer dashboard. Free.

  1. Step 5: Prepare your Instagram account

    Where: Instagram app

    Switch to a professional account (Business or Creator). Then turn on Settings → Messages and story replies → Message controls → Connected tools → Allow access to messages. Without it, every DM fails. A Facebook Page is not needed.

    Done when: Professional account with message access on.

  2. Step 6: Create your Meta app

    Where: developers.facebook.com

    Create a Business app and add the Instagram product (API setup with Instagram login). Copy the Instagram app ID and secret into AutoDM under Settings → Instagram, and add the OAuth redirect URI shown there to Meta's Business login settings, character for character.

    Done when: App ID and secret saved; the secret shows “stored encrypted”.

  3. Step 7: Add yourself as a tester

    Where: Meta dashboard + Instagram

    New apps start in Development mode, where only people with a role on the app can use it. Add your Instagram account under App roles → Roles → Instagram Testers, then accept the invite in Instagram: Settings → Website permissions → Apps and websites → Tester invites.

    Done when: The tester shows as accepted.

  4. Step 8: Connect Instagram and the webhook

    Where: AutoDM + Meta dashboard

    In AutoDM click Connect Instagram and allow all permissions. Then, in Meta, open Configure webhooks, paste the callback URL and verify token from Settings → Instagram → Webhook, click Verify and save and subscribe to the comments field.

    Done when: Your username shows in Settings and the webhook verifies.

Full Meta setup guide (opens in a new tab)

Part 3 · Your first campaign

Five minutes, then a real test from a second account.

  1. Step 9: Create a campaign and a rule

    Where: AutoDM

    Campaigns → New campaign, pick a post or reel (or all posts). Add a rule: a keyword such as guide, match mode Whole word, two or three public reply variants (“Sent to your DMs, {username}!”) and the DM text with your link (up to 1000 characters). Use Test a comment to check the match; it sends nothing.

    Done when: “Test a comment” shows your rule matching.

  2. Step 10: Test with a second account

    Where: Instagram

    Comments from your own connected account are always skipped, so the app never answers itself. Add a second Instagram account as an Instagram Tester, accept the invite, and comment your keyword from it. Within seconds you should see the public reply and the DM.

    Done when: Activity shows the comment as Sent.

Campaign steps in detail (opens in a new tab)

Part 4 · Open it to everyone

Switch your Meta app to Live so comments from the public are processed.

  1. Step 11: Fill in your public contact

    Where: AutoDM

    In Settings → Account → Public contact, enter your name or business name and a contact email. They appear on the built-in privacy policy and data deletion pages, which Meta requires before going Live.

    Done when: Your name shows on /privacy.

  2. Step 12: Paste the URLs and go Live

    Where: Meta dashboard

    Settings → Instagram → Meta app review lists the privacy, terms, data deletion and callback URLs with copy buttons. Paste them where Meta asks, then flip the app mode to Live. Test again from an account that is not a tester. If public comments don't arrive, Meta may require Advanced Access through App Review; the guide explains the honest state of this.

    Done when: A comment from a non-tester shows up in Activity.

Development vs Live mode (opens in a new tab)

Rather run it on your own server?

Use the published Docker image instead of Vercel + Supabase.

Docker Compose starts the app, a Postgres 16 database and a small cron service on any VPS or home server. Clone the repository, copy .env.example to .env, set APP_SECRET, CRON_SECRET and APP_URL, and run docker compose up -d. Meta only talks to HTTPS, so put a reverse proxy with a certificate in front. Then continue with Part 2.

Docker guide (opens in a new tab)

Optional extras once everything works: n8n relay (opens in a new tab). Stuck? Troubleshooting (opens in a new tab).

Ready to answer every comment?

Free accounts on Supabase and Vercel, a Meta developer app and about an hour. The setup guide walks you through every click.