Discover how to automate intelligent responses to Instagram comments using n8n and AI. This workflow handles verification, filters comments, and replies contextually, saving hours of manual moderation.
This workflow listens for new Instagram comments on posts about AI and automation.
It blocks comments made by the account owner.
Then, it uses AI to read each comment and make a smart reply in Brazilian Portuguese.
Finally, it posts that reply back to the Instagram comment.
This saves time and keeps engagement fast and relevant.
The workflow helps users avoid long manual answers and bad or slow responses.
The main goal is to keep the Instagram page active without work overload.
Input → Processing → Output
Inputs
Instagram webhook: Sends comment updates including comment text, user info, and post ID.
User IDs: To check if comment is from account owner.
OpenRouter API key: For AI text generation.
Instagram Graph API credentials: To get post data and send replies.
Processing Steps
Verify webhook: Answer Instagram GET challenges to confirm ownership of webhook URL.
Read comment data: Extract comment ID, text, user info, post ID from webhook.
Filter out owner comments: Skip comments if commenter is the Instagram account itself.
Get post context: Call Instagram API for the post caption or content to provide AI more information.
Generate AI reply: Send comment and post info to Gemini 2.0 AI model via OpenRouter API with a prompt that decides if comment is question, praise, critic, or irrelevant.
Post reply: Send AI-generated text as a reply comment on Instagram via the Graph API.
Output
A new comment reply on Instagram, made by AI, matching the comment’s tone and content.
Non-owner comments get thoughtful answers quickly.
Tools and services used
n8n Workflow Automation: To build the automation and connect services.
Instagram Graph API: To receive comment webhook data and post replies.
OpenRouter API with Gemini 2.0 model: To analyze comment and generate reply in Brazilian Portuguese.
HTTP Requests with header authentication: To communicate securely with Instagram API.
Beginner step-by-step: How to use this workflow in n8n production
Step 1: Download and import the workflow
Click the Download button on this workflow page to get the workflow file.
Open the n8n editor where you want to run this automation.
Use the menu option Import from File and select the downloaded workflow file.
Step 2: Configure credentials and settings
Add the Instagram Graph API credentials with permission to read comments and post replies.
Fill in the OpenRouter API key for the Gemini 2.0 language model.
Enter your Instagram account ID and verify tokens in the filter and webhook nodes to match your page.
If there are any URLs, IDs, or prompts in the workflow inputs, double-check they reflect your account or intentions.
Step 3: Test the workflow
Trigger a test comment on your Instagram post or simulate webhook data to watch the workflow run.
Check the execution logs to confirm each step works properly and a reply comment is sent back.
Step 4: Activate the workflow
After successful tests, toggle the workflow to active mode in n8n.
Make sure your webhook URL is publicly accessible so Instagram can send live comment events.
Keep API keys updated to prevent failures from expired tokens.
If using self hosting n8n for more control, see self-host n8n for setup options.
Customization ideas
Change AI reply language or style by editing the prompt in the AI Agent node.
Extend filters to ignore comments with certain words or spam patterns inside the Filter node.
Add emoji reaction calls before replying based on sentiment analysis.
Use other AI models supported by OpenRouter or integrate multiple AI endpoints.
Duplicate workflow to manage multiple Instagram accounts by passing different IDs and credentials dynamically.
Common errors and fixes
No webhook events: Usually means webhook URL is not public or verify token mismatch. Check URL accessibility and tokens in Instagram App and Respond to Webhook node.
No AI replies or bad replies: Check OpenRouter API key and ensure prompt instructions are clear in AI Agent node.
Replies not posting: Validate HTTP Request node settings. Check Instagram Graph API endpoints, token validity, and JSON body formatting.
Result summary
✓ Save hours by automating Instagram comment replies.
✓ Reply fast with AI-generated, context-aware answers.
✓ Keep audience engaged without manual work.
✓ Avoid replying to own comments and spam.
→ Increase Instagram interaction and follower trust.
Frequently Asked Questions
Can other AI models replace OpenRouter Gemini in this workflow?
Yes, users can switch the AI node to models like OpenAI GPT or local LangChain models by adjusting prompts and API keys accordingly.
Does using this workflow consume Instagram or AI API credits?
Yes, both Instagram Graph API calls and OpenRouter API requests consume service quotas depending on usage volume.
Is user comment data secure when processed by this workflow?
User data is transmitted via authenticated API calls within the secured n8n environment; keep credentials private and n8n updated.
Can this workflow handle high volumes of Instagram comments?
It can handle moderate volumes well, but large accounts may require scaling n8n instances and rate limiting to avoid API limits.
← Back to All Workflows
Automate Instagram AI Comment Replies with n8n
Press CTRL+F5 if the workflow didn't load.
Visit through Desktop for Best experience
What this workflow does
This workflow listens for new Instagram comments on posts about AI and automation.
It blocks comments made by the account owner.
Then, it uses AI to read each comment and make a smart reply in Brazilian Portuguese.
Finally, it posts that reply back to the Instagram comment.
This saves time and keeps engagement fast and relevant.
The workflow helps users avoid long manual answers and bad or slow responses.
The main goal is to keep the Instagram page active without work overload.
Input → Processing → Output
Inputs
Processing Steps
Output
A new comment reply on Instagram, made by AI, matching the comment’s tone and content.
Non-owner comments get thoughtful answers quickly.
Tools and services used
Beginner step-by-step: How to use this workflow in n8n production
Step 1: Download and import the workflow
Step 2: Configure credentials and settings
Step 3: Test the workflow
Step 4: Activate the workflow
If using self hosting n8n for more control, see self-host n8n for setup options.
Customization ideas
Common errors and fixes
Result summary
✓ Save hours by automating Instagram comment replies.
✓ Reply fast with AI-generated, context-aware answers.
✓ Keep audience engaged without manual work.
✓ Avoid replying to own comments and spam.
→ Increase Instagram interaction and follower trust.
Frequently Asked Questions
2 Months of Sales Navigator 👉 FREE
50+ InMails. Advanced Lead search. First 2 Users only
10,000+ n8n Workflows to Download & Learn Building
There’s no automation you can’t learn to build with BULDRR AI.
Automate your LinkedIn Posts
Your posts. Your brand. Fully automated.
1:1 - Meeting FREE
I'll show how you can implement AI AGENTS to take over repetitive tasks.
Get Self-Host n8n
Why Pay $20/month, When you can Self Host n8n @ $3.99 only
Promoted by BULDRR AI
Learn by Category
Related Workflows
Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)
AI SEO Blog Writer Automation Workflows in n8n
Automate CrowdStrike Alerts with VirusTotal, Jira & Slack
Automate Telegram Invoices to Notion with AI Summaries & Reports
Automate Email Replies with n8n and AI-Powered Summarization
Automate Email Campaigns Using n8n with Gmail & Google Sheets
Browse by Apps