ManyChat
Visual flow builder for automated Instagram, Messenger, WhatsApp and SMS conversations.
The flow builder is the visible part and it is not the hard part: keyword triggers, branching, delays and tags are a weekend of CRUD and a state machine. The hard part is that every message goes through Meta, and Meta decides who gets to send it. To reply to arbitrary strangers who DM your Instagram account you need a reviewed app with advanced messaging permissions, a linked Facebook page, business verification, and compliance with the 24 hour window and human agent tag rules. ManyChat has already cleared all of that and maintains it as the APIs churn. A DIY bot works fine for accounts you personally control in dev mode, which is exactly the audience that does not need automation.
Build verification: not recorded. How we judge buildability
What you give up
- Pre-approved Meta Business Partner status, so your bot only talks to testers until review passes
- The visual flow editor that non-engineers can actually edit without touching JSON
- Multi-channel parity: WhatsApp, SMS and email in one contact record
- Comment-to-DM triggers, story reply triggers, ads-click entry points and other Meta surface coverage
- Deliverability guardrails: 24 hour window handling, message tags, broadcast policy compliance baked in
Why people still pay
Because the bottleneck is access, not code. Anyone selling through Instagram DMs needs messages that actually reach strangers who commented on a post, and that requires permissions Meta grants to reviewed apps and revokes when policy shifts. ManyChat absorbs that risk, keeps the connectors alive across API versions, and hands a marketing person a canvas they can edit at 11pm without a deploy. Fifteen dollars a month against a broken funnel is not a hard call.
Your build guide
The stack, security requirements, and agent rules for a focused replacement.
Before you start
- Meta developer app with a professional Instagram account linked to a Facebook page
- App review for advanced messaging permissions if you want to reply to non-testers
- Publicly reachable HTTPS endpoint for the webhook (tunnel or small VPS)
- Willingness to fix the integration whenever Meta changes the API
Use these project rules and optional skill references alongside the prompt. Review each skill before adding it to your agent; the AGENTS.md export includes the same guidance.
Project rule, data: Store contacts (platform, psid, first_seen, last_inbound_at, tags) and a messages log in SQLite at ./data/dmflow.db. Create the schema on boot if missing.
Project rule, behavior: Run a small state machine per contact: current flow id, current step index, collected fields. Persist state so a restart resumes correctly.
Project rule, recovery: Verify the X-Hub-Signature-256 header against APP_SECRET and reject anything that fails.
Implementation plan
Phase 1, architecture and data
Build a self-hosted Instagram/Messenger DM autoresponder called "dmflow". Node 20, TypeScript, Fastify, better-sqlite3, no ORM, no frontend framework. Store contacts (platform, psid, first_seen, last_inbound_at, tags) and a messages log in SQLite at ./data/dmflow.db. Create the schema on boot if missing.
Phase 2, implement
Run a small state machine per contact: current flow id, current step index, collected fields. Persist state so a restart resumes correctly.
Phase 3, implement
A self-hosted webhook server that receives Instagram or Messenger events and runs your keyword-triggered reply flows from a JSON config, storing contacts and state in SQLite.
Phase 4, review and output
Visual flow builder for automated Instagram, Messenger, WhatsApp and SMS conversations.
Phase 5, recovery and acceptance
Verify the X-Hub-Signature-256 header against APP_SECRET and reject anything that fails. Verify this invariant with a saved fixture: A failed platform call retains the draft and cannot be marked published; retries use a stable delivery key. State the practical limit: Pre-approved Meta Business Partner status, so your bot only talks to testers until review passes.
Build a self-hosted Instagram/Messenger DM autoresponder called "dmflow". Node 20, TypeScript, Fastify, better-sqlite3, no ORM, no frontend framework. Stack decisions are final, do not offer alternatives. What it does: 1. POST /webhook receives Meta Messenger and Instagram messaging webhook events. GET /webhook handles the hub.challenge verification using VERIFY_TOKEN from .env. 2. Verify the X-Hub-Signature-256 header against APP_SECRET and reject anything that fails. 3. Store contacts (platform, psid, first_seen, last_inbound_at, tags) and a messages log in SQLite at ./data/dmflow.db. Create the schema on boot if missing. 4. Load flows from ./flows/*.json. A flow has: id, triggers (array of keyword strings, matched case-insensitively on the inbound text, plus an optional "default" fallback flow), and steps. Step types: send_text, send_buttons (title plus up to 3 postback buttons), wait (seconds), add_tag, set_field, goto (another flow id). 5. Run a small state machine per contact: current flow id, current step index, collected fields. Persist state so a restart resumes correctly. 6. Outbound sends go to the Graph API /me/messages with PAGE_ACCESS_TOKEN. Respect the 24 hour window: if last_inbound_at is older than 24 hours, refuse to send and log the reason instead of retrying forever. 7. Retry failed sends up to 3 times with exponential backoff, then dead-letter the message into a table. 8. Serve a single read-only HTML page at / rendering contacts, their tags, and the last 50 messages. Plain server-rendered HTML, no JS build step. Out of scope: WhatsApp, SMS, email, a visual flow editor, multi-user auth, analytics dashboards, broadcast sending. Secrets in .env only: VERIFY_TOKEN, APP_SECRET, PAGE_ACCESS_TOKEN, PORT. Ship .env.example. No telemetry, no third party services beyond Meta's Graph API. Include two example flows in ./flows: a keyword flow for "price" and a default greeting flow. Write a README that states plainly that until the Meta app passes review for advanced messaging permissions, this will only reply to accounts added as app testers, and that this is a limitation of Meta, not of the code.
$ open in your agent (prompt prefilled, you press enter), copy the prompt or copy AGENTS.md · generated from this app's build plan
prompt copied. want to know what dies next week?
new verdicts + top votes, weekly. free. one-click out.
No prior-art project is listed yet. Compare the scoped build with the paid product before choosing.
Questions about ManyChat
Can you build your own ManyChat with AI?
A full replacement is not the recommended project. The flow builder is the visible part and it is not the hard part: keyword triggers, branching, delays and tags are a weekend of CRUD and a state machine. The hard part is that every message goes through Meta, and Meta decides who gets to send it. To reply to arbitrary strangers who DM your Instagram account you need a reviewed app with advanced messaging permissions, a linked Facebook page, business verification, and compliance with the 24 hour window and human agent tag rules. ManyChat has already cleared all of that and maintains it as the APIs churn. A DIY bot works fine for accounts you personally control in dev mode, which is exactly the audience that does not need automation.
What does the ManyChat build prompt cover?
The prompt starts with this scope: A self-hosted webhook server that receives Instagram or Messenger events and runs your keyword-triggered reply flows from a JSON config, storing contacts and state in SQLite. Full-product capabilities excluded from the comparison include: Pre-approved Meta Business Partner status, so your bot only talks to testers until review passes; The visual flow editor that non-engineers can actually edit without touching JSON; Multi-channel parity: WhatsApp, SMS and email in one contact record. Follow the implementation plan and its prerequisites before expanding the build.
How do I use the prompt, AGENTS.md and agent skills?
Start with the ManyChat prerequisites and stack, then copy the prompt into your coding agent. Save the project rules as AGENTS.md in the project root. Linked skills are optional packages or source instructions for specific tasks; review their current contents and install only those matching the chosen stack. A skill does not supply API credentials or verify the finished app.
How long will this ManyChat project take?
The catalogue estimate is a weekend for the limited scope. Setup, integration approvals, debugging, deployment and ongoing maintenance can add time. This is an estimate, not a delivery guarantee.
What would I give up by replacing ManyChat?
Pre-approved Meta Business Partner status, so your bot only talks to testers until review passes; The visual flow editor that non-engineers can actually edit without touching JSON; Multi-channel parity: WhatsApp, SMS and email in one contact record; Comment-to-DM triggers, story reply triggers, ads-click entry points and other Meta surface coverage; Deliverability guardrails: 24 hour window handling, message tags, broadcast policy compliance baked in. Because the bottleneck is access, not code. Anyone selling through Instagram DMs needs messages that actually reach strangers who commented on a post, and that requires permissions Meta grants to reviewed apps and revokes when policy shifts. ManyChat absorbs that risk, keeps the connectors alive across API versions, and hands a marketing person a canvas they can edit at 11pm without a deploy. Fifteen dollars a month against a broken funnel is not a hard call.
What price is this guide comparing against?
The recorded Pro plan is $39 reference price (monthly, includes 2,500 active contacts then per-contact overage), checked 2026-08-18. Check the linked pricing source before buying. Building your own also has hosting, API and maintenance costs; the recorded amount is not a guaranteed saving.
What can I use instead of building ManyChat?
No alternative is listed in this entry yet. That is a gap in this catalogue, not proof that no suitable product exists. Compare the paid product and the proposed scope before committing to a build.