Scroll the comments under any Indonesian online shop’s Reel and you’ll see the same thing: “harga?”, “PM sis”, “masih ready?”, “ongkir ke Medan berapa?”. Half of them never get an answer, or get one six hours later, after the buyer has already ordered from someone else.
Big brands fix this with “comment PRICE and we’ll DM you the details” campaigns. Small shops don’t, because they don’t know it’s possible without a developer. That gap is the job: you set up comment-to-DM automation on a shop’s Instagram account, add an AI layer that answers common questions from the shop’s own price list, and charge a setup fee plus a monthly retainer.
This is not a grey-area hack. It runs on Meta’s official Instagram Messaging API through ManyChat, which is a Meta Business Partner. The grey area is right next to it, though: cheap “auto-DM” Chrome extensions and Python bots that log into Instagram like a human. Those get accounts restricted. This guide shows you how to sell the version that doesn’t.
In this guide:
- the Meta rules that decide what you can and can’t automate
- the ManyChat flow (no code) for comment-to-DM
- a small Python + Gemini webhook that answers free-text questions only from the shop’s catalogue, and hands off to a human when it doesn’t know
- real tool costs, what to charge, how long it takes, and the risks (account restrictions, wrong prices, personal data)
The rules you’re working inside
Meta lets businesses automate Instagram DMs, but only through approved tools and only inside a few limits. Check Meta’s developer docs for the Instagram Messaging API before you promise a client anything, because these limits change:
- The account must be a Professional account (Business or Creator). Personal accounts can’t connect to the API.
- The 24-hour window. After a user messages the account, or taps a button in a DM, the business can send automated messages for 24 hours. After that, automation has to stop (there is a separate “human agent” tag that lets a real person reply for up to 7 days).
- Private replies to comments. When someone comments on a post, the business can send that person one private DM about that comment, within 7 days of the comment. That single message is the entire comment-to-DM trick. It must get the person to reply or tap a button, which opens the 24-hour window for the rest of the conversation.
- Where the private reply lands. If the commenter follows the shop, the DM goes to their Inbox. If not, it goes to their message Requests folder, where many people never look. Your public comment reply (“Cek DM kak!”) is what gets them to check.
- Rate limits. Meta applies rate limits to the messaging API, and automation tools add their own pacing on top (around 200 automated DMs per hour per account is a figure many tools use). For a small shop this is plenty. For a giveaway post that gets 5,000 comments in an hour, it isn’t, and the extra comments get queued or missed.
- No cold DMs. You can’t message people who never interacted with the account. Any tool that promises “mass DM your competitor’s followers” is breaking Instagram’s Terms of Use, which ban accessing or collecting information “in an automated way without our express permission.”
What you’re selling
Keep the offer simple. Three packages cover almost every small shop:
| Package | What’s included | Suggested price (Indonesia) | Suggested price (international) |
|---|---|---|---|
| Starter | 1 keyword flow (“comment HARGA”), public comment reply, DM with price list + WhatsApp/checkout link | Rp 500.000 one-off | $60–$100 |
| Standard | 3 keyword flows + AI FAQ answers from their catalogue + human handoff + lead capture to Google Sheets | Rp 1.500.000 setup + Rp 300.000/month | $200–$350 setup + $50/month |
| Campaign | Giveaway or launch flow, story-reply triggers, weekly report | Rp 750.000 per campaign | $100–$200 |
For reference, search Fiverr for “manychat instagram automation” before you set prices. Basic keyword-flow gigs start in the tens of dollars and full setups with AI and integrations go into the hundreds. Check the current listings yourself; they move around.
The monthly retainer is the real money. Catalogues change, prices change, promos start and end, and someone has to update the bot. That someone is you.
What you need
| Item | Cost | Notes |
|---|---|---|
| ManyChat account (client’s, you get admin access) | Free plan to test (25 active contacts); Pro $39/month, or $29/month billed yearly, for 2,500 active contacts (older accounts may still be on the legacy Pro price, from $15/month) | External Request (the webhook step) and AI features need Pro. Essential ($17/month) doesn’t include them. ManyChat changed its pricing in March 2026, so check manychat.com/pricing. Client pays. |
| Client’s Instagram Professional account linked to a Facebook Page | $0 | Done in Instagram settings + Meta Business Suite |
Python 3.10+, flask, google-genai, gunicorn | $0 | pip install |
| Gemini API key | Free tier to start, then pay-as-you-go | aistudio.google.com |
| A server with HTTPS | $0–$6/month | A small VPS (Hetzner, DigitalOcean) with Caddy, or a free tier on Render/Railway for testing |
| Google Sheet (optional) | $0 | For lead capture via ManyChat’s Google Sheets integration |
Gemini pricing: as of October 2026, Gemini 3.5 Flash-Lite (used below) costs $0.30 per million input tokens and $2.50 per million output tokens, and it has a free tier. Google now limits the older 2.5 models to people who already used them, so new projects should use a 3.x model. Models and prices change often, so check ai.google.dev/gemini-api/docs/pricing.
ManyChat also sells its own AI add-on. You can use it instead of the webhook below. The reason to build your own is control: you decide exactly what the bot is allowed to say about prices, and you keep the same code for every client.
Step 1: Prepare the client’s account
- In Instagram: Settings → Account type and tools → Switch to professional account (if it isn’t already).
- Link the account to a Facebook Page in Meta Business Suite (create a Page if they don’t have one).
- In Instagram: Settings → Messages and story replies → Message controls → Connected tools → Allow access to messages must be on. Without this, ManyChat can’t read or send DMs.
- The owner creates the ManyChat account with their own Facebook login, connects Instagram, and invites you as an admin under Settings → Team. Never ask for their Instagram password. If the relationship ends, they remove you and keep everything.
Step 2: Build the comment-to-DM flow in ManyChat
This part is no-code. In ManyChat: Automation → New Automation, then:
- Trigger: “User comments on your Post or Reel”. Choose a specific post, or “any post” if the keyword will be used everywhere. Set the keyword filter to
HARGA,PRICE,INFOand common typos (hrg,harganya). - Public reply: turn it on and add 3–4 variations (“Sudah kami DM ya kak 🙏”, “Cek DM kak!”). Rotating replies looks less robotic, and replying in the comments also helps the post’s engagement.
- First DM (the one private reply): short text plus a button, for example “Halo kak! Mau lihat daftar harga lengkap?” with a button “Lihat harga”. The button tap is what opens the 24-hour window. If you put the whole price list in the first message and the buyer never replies, you can’t follow up.
- After the button: send the price list (image or text), the WhatsApp or Shopee/Tokopedia link, and a question: “Ada yang mau ditanyakan? Ketik aja pertanyaannya.”
- Lead capture (Standard package): add an action to save the user’s Instagram handle, the keyword and the date to a Google Sheet. That sheet is what you show the owner in your monthly report.
Test it with your own Instagram account by commenting on the client’s post. ManyChat’s preview mode also lets you run the flow in DMs.
Step 3: The Gemini FAQ webhook
Free-text questions (“bisa COD?”, “ukuran L ready warna hitam?”, “ongkir ke Makassar?”) are where shops lose buyers. ManyChat can send each question to your server; your server asks Gemini to answer only from the shop’s catalogue, and says it will pass the question to the admin if the answer isn’t there.
Set up the project:
mkdir ig-faq && cd ig-faq
python3 -m venv .venv && source .venv/bin/activate
pip install flask google-genai gunicorn
export GEMINI_API_KEY="your-key"
export WEBHOOK_SECRET="$(openssl rand -hex 16)"
echo $WEBHOOK_SECRET # you will paste this into ManyChat
Create catalog_tokoabc.txt with the shop’s facts in plain text. Keep it short and factual. This is the only thing the bot is allowed to know:
Toko ABC - kaos polos cotton combed 30s
Harga: Rp 55.000 (S-XL), Rp 60.000 (XXL)
Warna ready: hitam, putih, navy, abu misty
Pengiriman dari Bandung, JNE/J&T/SiCepat, ongkir dihitung di checkout Shopee
COD: hanya lewat Shopee
Grosir: min 12 pcs Rp 48.000/pcs, order via WhatsApp 0812-xxxx-xxxx
Jam admin: Senin-Sabtu 09.00-17.00 WIB
Retur: tukar ukuran maks 3 hari setelah diterima, ongkir ditanggung pembeli
Now app.py:
import os
from pathlib import Path
from flask import Flask, abort, jsonify, request
from google import genai
from google.genai import types
app = Flask(__name__)
client = genai.Client() # reads GEMINI_API_KEY
SECRET = os.environ["WEBHOOK_SECRET"]
MODEL = os.environ.get("GEMINI_MODEL", "gemini-3.5-flash-lite")
HANDOFF = "HANDOFF"
RULES = """You answer Instagram DMs for a small online shop.
Use ONLY the facts in the catalogue below. Never invent prices, stock,
discounts, shipping costs or delivery times.
If the answer is not in the catalogue, or the customer is angry,
complaining, or asking about an existing order, reply with exactly: HANDOFF
Reply in the customer language (usually casual Indonesian, call them "kak").
Maximum 3 short sentences. No markdown.
CATALOGUE:
"""
def load_catalog(shop: str) -> str:
path = Path(f"catalog_{shop}.txt")
if not shop.isalnum() or not path.exists():
abort(404)
return path.read_text(encoding="utf-8")
@app.post("/faq/<shop>")
def faq(shop):
if request.headers.get("X-Webhook-Secret") != SECRET:
abort(401)
question = (request.get_json(silent=True) or {}).get("question", "").strip()
if not question:
return jsonify(reply="", handoff=True)
try:
resp = client.models.generate_content(
model=MODEL,
contents=question[:1000],
config=types.GenerateContentConfig(
system_instruction=RULES + load_catalog(shop),
temperature=0.2,
# 3.5 Flash-Lite defaults to minimal thinking; thinking tokens count as output
max_output_tokens=200,
),
)
answer = (resp.text or "").strip()
except Exception as e: # API down, quota, safety block
app.logger.warning("gemini error: %s", e)
answer = HANDOFF
handoff = (not answer) or HANDOFF in answer
app.logger.info("shop=%s handoff=%s q=%r", shop, handoff, question[:80])
return jsonify(reply="" if handoff else answer, handoff=handoff)
Run it locally and test with curl before touching ManyChat:
gunicorn -w 2 -b 0.0.0.0:8000 app:app &
curl -s localhost:8000/faq/tokoabc \
-H "Content-Type: application/json" \
-H "X-Webhook-Secret: $WEBHOOK_SECRET" \
-d "{\"question\": \"kak yg navy ukuran XXL berapa?\"}"
# {"handoff":false,"reply":"Halo kak! Kaos navy ukuran XXL harganya Rp 60.000 ya..."}
curl -s localhost:8000/faq/tokoabc \
-H "Content-Type: application/json" \
-H "X-Webhook-Secret: $WEBHOOK_SECRET" \
-d "{\"question\": \"paket saya kok belum sampai ya\"}"
# {"handoff":true,"reply":""}
(The replies above show the expected shape; Gemini’s exact wording will differ each run.) Write 20 real questions from the shop’s old comments and DMs, run them all, and read every answer. If the bot ever states a price or fact that isn’t in the catalogue, tighten the catalogue and the rules before going live.
To deploy, put it on a VPS behind Caddy, which gets an HTTPS certificate automatically. A two-line Caddyfile is enough:
faq.yourdomain.com {
reverse_proxy localhost:8000
}
Run gunicorn under systemd so it restarts on reboot. One server handles every client: each shop is just another catalog_<shop>.txt file and another URL.
Step 4: Connect ManyChat to the webhook
- In ManyChat, create a custom field (User field, text) called
ai_reply. - Open Automation → Default Reply for Instagram. This catches any DM that doesn’t match a keyword.
- Add an Action → External Request: method
POST, URLhttps://faq.yourdomain.com/faq/tokoabc, headerX-Webhook-Secretwith your secret, and a JSON body{"question": ...}where you insert the Last Text Input system field with the field picker. - In Response mapping, map
$.replytoai_reply. Click Test the request to make sure it works. - Add a Condition: if
ai_replyis not empty, send a message containingai_reply. Otherwise send “Pertanyaannya sudah kami teruskan ke admin ya kak, dibalas di jam kerja 🙏” and notify the shop owner (ManyChat can send an admin notification, or move the conversation to the Live Chat inbox).
External Request only works on ManyChat Pro and above, which is why the Standard package needs the client on a paid plan. Tell the client about this cost up front: at $29–$39/month, ManyChat Pro can cost more than your own retainer.
Cost breakdown
Per client, per month:
| Item | Cost | Who pays |
|---|---|---|
| ManyChat Pro (up to 2,500 active contacts) | $29 (yearly billing) to $39 (monthly); legacy accounts from $15 | Client |
| Gemini 3.5 Flash-Lite, 1,000 questions/month | about $0.30 | You (built into retainer) |
| VPS share (one $5 server for 20+ clients) | under $0.50 | You |
| Domain for the webhook | ~$1 | You |
The Gemini figure: one question is roughly 500 input tokens (rules + catalogue + question) and 60 output tokens. 1,000 questions is 0.5M input tokens ($0.15) plus 0.06M output tokens ($0.15), plus a little for minimal thinking. Even a long catalogue keeps this around $1 a month or less for a small shop, and the free tier may cover testing. Your real cost is your time.
Realistic earnings and time
- Starter setup: 1–2 hours once you have a template. Standard setup: 4–6 hours the first time, 2–3 hours from the third client on (most of it is writing and testing the catalogue).
- Retainer work: 1–2 hours a month per client: update prices, check the handoff log, send a short report (comments received, DMs sent, button taps, leads in the sheet).
- Realistic first 3 months: this depends heavily on your pitch and your market, and there’s no public data on close rates. If you message 50–100 local shops and show a demo on your own test account, landing 2–5 Standard clients is a plausible goal, not a promise. ManyChat Pro’s cost on top of your fee is a likely objection, so have an answer ready. For example, six clients at Rp 300.000/month is Rp 1.800.000 recurring, plus Rp 1.500.000 per new setup. That’s side income, not a salary, until you have 20+ retainers or sell to agencies.
The best leads are shops that already post Reels regularly and have unanswered “harga?” comments. Screenshot those comments in your pitch. It’s hard to argue with their own lost buyers.
Risks: bans, wrong prices and personal data
Account restrictions. The official API route is low risk, but not zero. Instagram can still limit an account that looks spammy: identical public replies on hundreds of comments, giveaway posts that trigger thousands of DMs, or users reporting the DMs. Minimise it by rotating public replies, keeping the first DM short and relevant to what they commented, and never automating anything outside the 24-hour window.
The real grey area: unofficial bots. Clients will ask for “auto follow, auto like, DM all followers of my competitor.” That needs unofficial tools: browser extensions, instagrapi-style Python libraries, or “growth services” that log in with the account password. These break Instagram’s Terms of Use, and the usual outcomes are action blocks, forced password resets, and disabled accounts. Losing a client’s main sales channel is a terrible trade for a Rp 500.000 job. Say no, or explain the risk in writing and let them walk away.
Wrong answers cost money. If the bot says Rp 48.000 when the price is Rp 55.000, the buyer will screenshot it. Under Indonesia’s Consumer Protection Law (UU 8/1999), businesses are responsible for the information they give consumers. That is why the code answers only from the catalogue, uses low temperature, and hands off anything it can’t answer. Put a line in your agreement that the client must tell you about price changes, and that they approve the catalogue before go-live.
Personal data. ManyChat stores Instagram names, handles and conversations, and your Sheet stores leads. Indonesia’s personal data protection law (UU PDP, Law 27/2022) has applied in full since October 2024. Collect only what the shop needs, keep the Sheet in the client’s Google account (not yours), and don’t reuse one client’s leads for anything else. You don’t send customer data to Gemini beyond the question text, and you shouldn’t.
Reality check
What doesn’t work:
- Selling “automation” in the abstract. Shop owners don’t buy ManyChat. They buy “no more lost buyers in your comments.” Lead with their own unanswered comments and a 30-second screen recording of the flow working.
- Letting the AI answer everything. A bot that guesses shipping costs or promises stock will create more complaints than it saves. A bot that answers 60% of questions correctly and hands off the rest is a good bot.
- Dumping the full price list in the first DM. No button, no reply, no 24-hour window, no follow-up.
- Accounts that get no comments. Automation multiplies engagement that already exists. A shop with 40 views per Reel needs content, not a DM bot. Don’t take their money.
Common mistakes:
- Asking for the client’s Instagram password instead of a ManyChat team invite
- Forgetting the “Allow access to messages” setting, then debugging ManyChat for an hour
- Not testing typos and slang (“hrg brp kak”, “ready gk”) in the keyword list
- No handoff path, so angry customers get cheerful bot replies
- Not updating the catalogue after a promo ends, so the bot keeps offering an expired discount
Final checklist
- Client account is Professional, linked to a Page, “Allow access to messages” on
- You were invited as a ManyChat team member (no passwords shared)
- Keyword flow tested from a separate account, including typos
- First DM has a button; the price list comes after the tap
- Webhook tested with 20 real questions; every answer checked against the catalogue
- Handoff message and admin notification working
- Client approved the catalogue in writing and knows to tell you about price changes
- Monthly report template ready (comments, DMs sent, taps, leads, handoffs)