Automate Instagram Comment Responses with Google Sheets & CRM Tracking
Categories
Created by
akAkash KankariyaLast edited 58 days ago
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
🎯 Overview
This n8n workflow template automates the process of monitoring Instagram comments and sending predefined responses based on specific comment keywords. It integrates Instagram's Graph API with Google Sheets to manage comment responses and maintains an interaction log for customer relationship management (CRM) purposes.
🔧 Workflow Components
The workflow consists of 9 main nodes organized into two primary sections:
📡 Section 1: Webhook Verification
- ✅ Get Verification (Webhook node)
- 🔄 Respond to Verification Message (Respond to Webhook node)
🤖 Section 2: Auto Comment Response
- 📬 Insta Update (Webhook node)
- ❓ Check if update is of comment? (Switch node)
- 👤 Comment if of other user (If node)
- 📊 Comment List (Google Sheets node)
- 💬 Send Message for Comment (HTTP Request node)
- 📝 Add Interaction in Sheet (CRM) (Google Sheets node)
🛠️ Prerequisites and Setup Requirements
1. 🔵 Meta/Facebook Developer Setup
📱 Create Facebook App
📋 Action Items:
- [ ] Navigate to Facebook Developers
- [ ] Click "Create App" and select "Business" type
- [ ] Configure the following products:
- ✅ Instagram Graph API
- ✅ Facebook Login for Business
- ✅ Webhooks
🔐 Required Permissions
Configure the following permissions in your Meta app:
| instagram_basic | 📖 Read Instagram account profile info and media
| instagram_manage_comments | 💬 Create, delete, and manage comments
| instagram_manage_messages | 📤 Send and receive Instagram messages
| pages_show_list | 📄 Access connected Facebook pages
🎫 Access Token Generation
⚠️ Important Setup:+
- [ ] Use Facebook's Graph API Explorer
- [ ] Generate a User Access Token with required permissions
- [ ] ⚡ Important: Tokens expire periodically and need refreshing
2. 🌐 Webhook Configuration
🔗 Setup Webhook URL
📌 Configuration Checklist:
- [ ] In Meta App Dashboard, navigate to Products → Webhooks
- [ ] Subscribe to Instagram object
- [ ] Configure webhook URL:
your-n8n-domain/webhook/instagram- [ ] Set verification token (use "test" or create secure token)
- [ ] Select webhook fields:
- ✅ comments - For comment notifications
- ✅ messages - For DM notifications (if needed)
✅ Webhook Verification Process
The workflow handles Meta's webhook verification automatically:
- 📡 Meta sends GET request with
hub.challengeparameter - 🔄 Workflow responds with the challenge value to confirm subscription
3. 📊 Google Sheets Setup
Example - https://docs.google.com/spreadsheets/d/1ONPKJZOpQTSxbasVcCB7oBjbZcCyAm9gZ-UNPoXM21A/edit?usp=sharing
📋 Create Response Management Sheet
Set up a Google Sheets document with the following structure:
📝 Sheet 1 - Comment Responses:
Column
Description
Example
💬 Comment
Trigger keywords
"auto", "info", "help"
📝 Message
Corresponding response message
"Thanks for your comment! We'll get back to you soon."
📈 Sheet 2 - Interaction Log:
Column
Description
Purpose
⏰ Time
Timestamp of interaction
Track when interactions occur
🆔 User Id
Instagram user ID
Identify unique users
👤 Username
Instagram username
Human-readable identification
📝 Note
Additional notes or error messages
Debugging and analytics
🔧 Built By - [email protected]
You may also like
New to n8n?
Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!





