Skip to content
forked from ayuuxh2/insta-p8

About

Open-source ManyChat alternative for Instagram DM, comment, story automation and AI replies. Self-hosted with Next.js + Supabase. https://t.me/instagramautomationp8

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

GitHub stars Next.js React Supabase Instagram automation Product Hunt Discord Telegram Group

⚡ InstaAuto

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


🎬 Step-by-Step Video Setup Guide

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.

InstaAuto Setup Tutorial Video

👉 Click here to watch the full step-by-step tutorial on YouTube


🚀 What is InstaAuto?

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.


🌐 Live Web App & Testing Access

You have two ways to use InstaAuto:

Option 1: Join the released web app as a tester

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.

Option 2: Self-host it

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

� Live Showcase

Try a real Instagram automation demo before self-hosting.

  • Instagram profile: @ayuuxh2
  • Ice Breaker demo: start a DM and tap/send hello → bot replies heyyy
  • DM keyword demo: send hi → bot replies heyy
  • DM keyword demo: send link → bot replies hello
  • Comment-to-DM demo post: instagram.com/p/DTkUbO3EZqC
  • Comment trigger: comment hiii on 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.


�💡 Why not just use ManyChat?

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.


✨ Features

💬 Instagram DM Automation

  • 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

💭 Instagram Comment Automation

  • 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

📖 Instagram Story Automation

  • Story mention automation
  • Story reply automation
  • Story reaction automation
  • Emoji reaction triggers
  • Specific story matching support
  • Automatic DM responses for story engagement

🤖 AI Instagram Auto-Replies

  • 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

🧊 Instagram Ice Breakers

  • 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

📥 Built-in Inbox

  • Conversation list
  • Message history
  • Manual DM replies
  • Store incoming and outgoing Instagram messages
  • Useful for creators who want automation plus manual support

🎬 Reels Publishing & Scheduling

  • 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

📊 Dashboard

  • Automation count
  • Active triggers
  • Audience reached
  • Messages sent
  • Recent activity
  • Quick view of account automation health

🧱 Tech Stack

  • 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

🏗️ Architecture

Instagram User
     ↓
Instagram Webhook
     ↓
Next.js API Routes
     ↓
Automation Matcher
     ↓
Supabase Database
     ↓
Instagram Graph API Reply

Important 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 helpers

⚡ Quick Start: Self Host

1. Clone the repo

git clone https://github.com/ayuuxh2/insta-p8.git
cd insta-p8

2. Install dependencies

npm install

You can also use Bun or pnpm if that is your preferred package manager.

3. Create a Supabase project

  • Create a new project on Supabase
  • Copy your project URL
  • Copy anon key
  • Copy service role key
  • Run the SQL schema from db and migration scripts from scripts/ and migrations/

4. Create a Meta / Instagram app

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_insights

5. Configure environment variables

Create .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_secret

6. Run locally

npm run dev

Open:

http://localhost:3000

🔐 Environment Variables

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.


▲ Deploy to Vercel

  1. Fork this repository
  2. Import it into Vercel
  3. Add all environment variables
  4. Set the production redirect URI in Meta Developer Console
  5. Set your webhook callback URL:
https://your-domain.com/api/instagram/webhook
  1. Deploy
  2. Connect your Instagram Business/Creator account
  3. Create your first automation

🧪 Testing Checklist

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

📈 SEO Use Cases

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

⚠️ Important Notes

  • 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.

🗺️ Roadmap

  • 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

🤝 Contributing

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

❤️ Sponsors

A huge thank you to our amazing sponsors for supporting this project!


⭐ Support

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.


📄 License

MIT License. Use it, fork it, self-host it, customize it, and build on top of it.

About

Open-source ManyChat alternative for Instagram DM, comment, story automation and AI replies. Self-hosted with Next.js + Supabase. https://t.me/instagramautomationp8

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages