Open-source Instagram automation for DMs, comments, stories, AI replies, inbox, and Reels scheduling.
A self-hosted, AI-ready, developer-friendly alternative to paid Instagram automation tools like ManyChat.
No monthly SaaS fees. No vendor lock-in. Your data stays in your Supabase.
🎬 Video Guide · Join Web Testers · Self Host · Features · Env Setup · Deploy · Product Hunt · Discord · Telegram
Get your self-hosted Instagram automation platform live in under 18 minutes! Follow this step-by-step video tutorial to fork, configure, and deploy the application.
👉 Click here to watch the full step-by-step tutorial on YouTube
InstaAuto is an open-source Instagram automation platform built for creators, indie hackers, agencies, brands, and developers who want to automate Instagram workflows without paying recurring fees for closed SaaS tools.
Use it to build:
- Instagram DM automation
- Instagram comment auto-replies
- Instagram story automation
- AI Instagram auto-replies
- Keyword-triggered message funnels
- Live Instagram inbox dashboard
- Instagram Ice Breakers
- Reels publishing and scheduling workflows
- Self-hosted ManyChat alternative
- Open-source Instagram chatbot
If you are searching for a free ManyChat alternative, open-source Instagram DM bot, self-hosted Instagram automation tool, Instagram AI chatbot, or Instagram comment-to-DM automation, this project is built for that exact use case.
You have two ways to use InstaAuto:
If you do not want to deploy anything yourself, you can request access to the hosted web app and join as a tester.
- Best for: creators, small businesses, marketers, beta testers
- What you need: an Instagram Business or Creator account
- How it works: request access, connect Instagram, create automations, test DMs/comments/stories
The hosted app may require manual approval because Instagram platform permissions and tester roles are controlled through Meta.
If you are a developer or agency, self-host InstaAuto on your own Vercel + Supabase account.
- Best for: developers, agencies, privacy-focused teams, power users
- You control: database, tokens, deployment, AI gateway, webhook URL
- Cost: can run on free tiers for small usage
Try a real Instagram automation demo before self-hosting.
- Instagram profile: @ayuuxh2
- Ice Breaker demo: start a DM and tap/send
hello→ bot repliesheyyy - DM keyword demo: send
hi→ bot repliesheyy - DM keyword demo: send
link→ bot replieshello - Comment-to-DM demo post: instagram.com/p/DTkUbO3EZqC
- Comment trigger: comment
hiiion the demo post to test comment-to-DM automation
This showcase helps contributors and testers verify that the open-source Instagram DM automation, Ice Breakers, keyword replies, and comment-to-DM workflow are working in production.
Please use the demo responsibly. Do not spam the showcase profile or post.
ManyChat is great, but it is closed-source and paid. InstaAuto is for people who want ownership and flexibility.
| Feature | ManyChat | InstaAuto |
|---|---|---|
| Open source | ❌ | ✅ |
| Self-hosted | ❌ | ✅ |
| Monthly SaaS fee | ✅ | ❌ |
| Own your database | ❌ | ✅ |
| Custom API routes | Limited | ✅ |
| AI-native replies | Paid/add-on style | ✅ |
| Developer extensibility | Limited | ✅ |
| Supabase/Postgres backend | ❌ | ✅ |
| Vercel deployable | ❌ | ✅ |
| Full source code access | ❌ | ✅ |
Positioning: InstaAuto is not a drop-in clone. It is an open-source, self-hosted automation base for builders who want to customize Instagram automation deeply.
- Keyword-based DM auto-replies
- Multi-keyword matching
- Postback/button payload handling
- Auto-save incoming DMs to inbox
- Auto-save outgoing bot replies
- Live conversation dashboard
- Manual reply from inbox
- Rich response cards with buttons
- Follow-gated locked content flows
- Auto-reply to Instagram post comments
- Send private DM after a comment trigger
- Specific-post automations
- Global keyword automations
- Reply-all mode for selected posts
- Public comment reply like “Check your DMs”
- Comment-to-DM funnels for lead magnets, links, offers, downloads, coupons, courses, and products
- Story mention automation
- Story reply automation
- Story reaction automation
- Emoji reaction triggers
- Specific story matching support
- Automatic DM responses for story engagement
- AI fallback when no keyword automation matches
- Custom AI personality context per account
- Reads recent conversation history
- Matches language and tone: English, Hindi, Hinglish, casual, formal
- Short human-like replies
- Typing indicators
- Random delay before response for more natural behavior
- Proxy-based AI gateway support via
/api/groq/chat
- Add up to 4 Instagram Ice Breakers
- Save question + auto-response
- Sync Ice Breakers to Instagram Messenger profile
- Handle Ice Breaker postback responses in webhook
- Conversation list
- Message history
- Manual DM replies
- Store incoming and outgoing Instagram messages
- Useful for creators who want automation plus manual support
- Create Instagram Reels containers
- Poll publishing status
- Publish ready containers
- Content pool for scheduled posts
- Upload/import video URLs into Supabase storage
- Scheduler configuration API
- Automation count
- Active triggers
- Audience reached
- Messages sent
- Recent activity
- Quick view of account automation health
- Framework: Next.js 16 App Router
- Frontend: React 19, TypeScript
- Styling: Tailwind CSS, shadcn/ui-style components
- Icons: Lucide React
- Database: Supabase Postgres
- Storage: Supabase Storage
- Deployment: Vercel
- Analytics: Vercel Analytics
- Instagram API: Instagram API with Instagram Login, Graph API v24.0
- AI Gateway: Groq/OpenAI-compatible proxy pattern
Instagram User
↓
Instagram Webhook
↓
Next.js API Routes
↓
Automation Matcher
↓
Supabase Database
↓
Instagram Graph API ReplyImportant modules:
app/api/instagram/callback OAuth login + token exchange
app/api/instagram/webhook DM/comment/story webhook brain
app/api/automations Automation CRUD
app/api/ice-breakers Ice Breaker management + sync
app/api/inbox Conversations, messages, manual send
app/api/groq AI auto-reply settings + chat proxy
app/api/hooks Reels publishing hooks
app/api/scheduler Reels/content scheduling
components/dashboard Dashboard, automations, content pool
components/inbox Live inbox UI
lib/supabase-server.ts Supabase server client
lib/instagram-publishing.ts Reels container/publish helpersgit clone https://github.com/ayuuxh2/insta-p8.git
cd insta-p8npm installYou can also use Bun or pnpm if that is your preferred package manager.
- Create a new project on Supabase
- Copy your project URL
- Copy anon key
- Copy service role key
- Run the SQL schema from
dband migration scripts fromscripts/andmigrations/
You need an Instagram Business or Creator account and a Meta Developer app configured for Instagram Login and webhooks.
Required Instagram scopes used by the app:
instagram_business_basic
instagram_business_manage_messages
instagram_business_manage_comments
instagram_business_content_publish
instagram_business_manage_insightsCreate .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
NEXT_PUBLIC_INSTAGRAM_APP_ID=your_instagram_app_id
INSTAGRAM_APP_ID=your_instagram_app_id
INSTAGRAM_APP_SECRET=your_instagram_app_secret
NEXT_PUBLIC_INSTAGRAM_REDIRECT_URI=http://localhost:3000/api/instagram/callback
INSTAGRAM_WEBHOOK_VERIFY_TOKEN=choose_a_strong_verify_token
GATEWAY_SECRET=your_ai_gateway_secret
API_SECRET_KEY=your_internal_hook_secretnpm run devOpen:
http://localhost:3000| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
✅ | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
✅ | Supabase anon/public key |
SUPABASE_SERVICE_ROLE_KEY |
✅ | Supabase service role key for API routes |
NEXT_PUBLIC_INSTAGRAM_APP_ID |
✅ | Public Instagram app/client ID |
INSTAGRAM_APP_ID |
✅ | Server-side Instagram app ID |
INSTAGRAM_APP_SECRET |
✅ | Instagram app secret for token exchange |
NEXT_PUBLIC_INSTAGRAM_REDIRECT_URI |
✅ | OAuth redirect URI |
INSTAGRAM_WEBHOOK_VERIFY_TOKEN |
✅ | Webhook verification token |
GATEWAY_SECRET |
Optional | Secret used for AI gateway/proxy calls |
API_SECRET_KEY |
Optional | Internal API secret for publishing hooks |
Security note: never expose SUPABASE_SERVICE_ROLE_KEY, INSTAGRAM_APP_SECRET, user access tokens, or API_SECRET_KEY in client-side code.
- Fork this repository
- Import it into Vercel
- Add all environment variables
- Set the production redirect URI in Meta Developer Console
- Set your webhook callback URL:
https://your-domain.com/api/instagram/webhook- Deploy
- Connect your Instagram Business/Creator account
- Create your first automation
Before going live, test these flows:
- Login with Instagram Business/Creator account
- Create a DM keyword automation
- Send a test DM from another Instagram account
- Create a comment keyword automation
- Comment on a selected post
- Confirm public comment reply + private DM
- Add Ice Breakers and verify they sync
- Toggle AI auto-reply and send an unmatched DM
- Test inbox manual reply
- Test Reels container creation if using publisher
InstaAuto can be used as:
- Free ManyChat alternative
- Open-source ManyChat alternative
- Instagram DM automation tool
- Instagram comment automation tool
- Instagram chatbot platform
- Instagram AI auto-reply bot
- Instagram lead generation bot
- Comment-to-DM automation tool
- Instagram story automation software
- Self-hosted social media automation
- Instagram marketing automation dashboard
- Creator automation CRM
- Instagram inbox automation
- Instagram Reels scheduler
- Open-source Instagram API starter
- Instagram APIs require correct Meta app permissions and review for production use.
- Some features may require your Instagram account to be Business or Creator type.
- Webhooks must be reachable from the public internet.
- Hosted tester access may require approval depending on Meta app tester roles.
- Respect Instagram Platform Terms and anti-spam policies.
- Do not use automation to spam, deceive, scrape, or abuse users.
- One-click Vercel deploy button
- Docker setup
- Better onboarding wizard
- Automation templates
- Multi-account workspace support
- AI model selector
- Better analytics charts
- Webhook event debugger
- Export/import automations
- Public demo video
Contributions are welcome.
Join our Discord community for discussions, support, and updates!
Join our Telegram group for quick help, updates, and community chat!
Good first issues:
- Improve setup docs
- Add Docker support
- Add more automation templates
- Improve dashboard analytics
- Add tests for API routes
- Improve webhook logging
- Add provider-agnostic AI configuration
A huge thank you to our amazing sponsors for supporting this project!
- @Divypratap93 — $10 🇬🇧
If this project helps you avoid paying for expensive Instagram automation tools, please star the repo.
Stars help more developers discover open-source Instagram automation, self-hosted creator tools, and AI-powered social media workflows.
MIT License. Use it, fork it, self-host it, customize it, and build on top of it.