Instagram + Google Sheets: instant comment replies
Instagram comments come in fast. Then you’re stuck copy-pasting the same answers, missing legit questions, and occasionally replying with the wrong link from last week.
Social media managers feel it first. But founders running their own accounts and small marketing teams get pulled into the same chaos. This Instagram comment replies automation keeps responses consistent and logs every interaction so you can actually follow up.
You’ll see how the workflow watches for new comments, matches keywords to an approved reply in Google Sheets, sends the response via Instagram’s API, then writes a neat CRM-style record back to a sheet.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Instagram + Google Sheets: instant comment replies
flowchart LR
subgraph sg0["Flow 1"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Insta Update"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Send Message for Comment"]
n2@{ icon: "mdi:database", form: "rounded", label: "Comment List", pos: "b", h: 48 }
n5@{ icon: "mdi:database", form: "rounded", label: "Add Interation in Sheet (CRM)", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check if update is of comment?", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Comment if of other user", pos: "b", h: 48 }
n2 --> n1
n0 --> n6
n7 --> n2
n1 --> n5
n6 --> n7
end
subgraph sg1["Flow 2"]
direction LR
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Get Verification"]
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Respond to Verfication Message"]
n3 --> n4
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n6,n7 decision
class n2,n5 database
class n0,n1,n3,n4 api
classDef customIcon fill:none,stroke:none
class n0,n1,n3,n4 customIcon
The Problem: Comment Replies Break as You Grow
Replying to Instagram comments sounds simple until you’re doing it all day, across multiple posts, with different offers and different “right” answers. One person replies from memory, another pulls text from an old Notion doc, and suddenly your brand voice is all over the place. Worse, good leads slip through because nobody sees the “price?” comment until hours later. It’s not just time. It’s the mental load of staying consistent while you’re being interrupted every few minutes.
It adds up fast. And the mess usually shows up in the same places.
- Real questions get buried under spammy one-word comments, so the people who actually want to buy wait too long.
- Approved messaging lives in someone’s head, which means replies drift as your team changes.
- Manual replying makes reporting painful because you can’t easily answer “how many people asked for info this week?”
- One missed comment can turn into a public thread that looks like you don’t pay attention.
The Solution: Auto-Reply from Google Sheets and Log Everything
This workflow turns your Google Sheet into a simple “reply library” for Instagram. When Instagram sends a webhook event for a new comment, n8n checks that the update is actually a comment (not some other event), then confirms it’s from another user (so you don’t accidentally reply to yourself). Next, it pulls your approved keyword-to-message pairs from Google Sheets and chooses the right response based on what the commenter wrote. Finally, it sends the reply through an HTTP request to the Instagram Graph API and writes an interaction record back into a second sheet for tracking and CRM follow-up. Clean, predictable, and honestly much easier to manage than a bunch of saved replies spread across devices.
The workflow starts with an Instagram webhook event. From there, n8n routes the update, validates the commenter, and looks up the matching reply in Google Sheets. Then it posts the response and logs the interaction so you can report on it later without guessing.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you average 40 comments a day across your posts and reels. Manually, even “quick replies” take about 1 minute each once you open the app, read context, paste the right message, and double-check the link, which is roughly 40 minutes daily. With this workflow, you spend maybe 10 minutes a week updating your Google Sheet responses, and the rest runs in the background. That’s about half an hour back most days, plus a clean log you can review when someone asks for a report.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Instagram Graph API (Meta) to receive comments and post replies.
- Google Sheets for approved replies and interaction logging.
- Meta access token (generate it in Graph API Explorer).
Skill level: Intermediate. You won’t code, but you will set up a Meta app, permissions, and webhooks.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Instagram sends an event. When a new comment hits your account, Meta calls your n8n webhook with the update payload. There’s also a separate verification webhook that answers Meta’s “challenge” during setup, so subscription validation is handled automatically.
The workflow filters and validates. A routing step checks the update type so you only act on comment events. Then an “other user” check helps prevent accidental loops or weird self-replies.
Google Sheets decides the reply. n8n loads your reply table (keyword in one column, approved message in another) and uses it as the source of truth. Update the sheet, and future replies change without redeploying anything.
n8n posts the response and logs it. An HTTP request sends the chosen message back through the Instagram Graph API. Immediately after, a row is added to an interaction log sheet with timestamp, user info, and notes for reporting.
You can easily modify the keyword matching to include multiple triggers per message, or route different keywords to different sheets based on your campaigns. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
This workflow uses two webhook endpoints to receive Instagram comment events and complete the verification handshake.
- Add the Instagram Event Hook node and set HTTP Method to
POSTand Path toinstagram. - Add the Webhook Verification Intake node and set Path to
instagramand Response Mode toUsing Respond to Webhook Node. - Connect Webhook Verification Intake to Return Verification Response and set Respond With to
textand Response Body to{{ $json.query["hub.challenge"] }}. - Connect Instagram Event Hook to Route Comment Updates as the main event stream.
Tip: Use the same instagram path for both webhook nodes so Instagram can validate and send comment updates to the same endpoint.
Step 2: Connect Google Sheets
Two Google Sheets nodes are used to retrieve predefined replies and log interactions.
- Open Retrieve Comment Replies and set Document to
IG Comment Replyand Sheet toSheet1. - In Retrieve Comment Replies, add a filter with Lookup Column set to
Commentand Lookup Value set to{{ $json.body.entry[0].changes[0].value.text.split()[0].toLowerCase() }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Comment Replies.
- Open Log Interaction to Sheet and set Operation to
append, Document toIG Comment Reply, and Sheet toInteration List. - Map columns in Log Interaction to Sheet with these values: Time =
{{ $('Route Comment Updates').item.json.body.entry[0].time }}, User Id ={{ $('Route Comment Updates').item.json.body.entry[0].changes[0].value.from.id }}, Username ={{ $('Route Comment Updates').item.json.body.entry[0].changes[0].value.from.username }}, Note ={{ $json?.error.message }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Log Interaction to Sheet.
⚠️ Common Pitfall: Ensure the sheet names match exactly (Sheet1 and Interation List) or the Google Sheets nodes will fail to find the worksheets.
Step 3: Set Up Processing and Routing
Route only comment events and filter out internal/own comments before fetching a reply.
- In Route Comment Updates, create a rule where Left Value is
{{ $json.body.entry[0].changes[0].field }}and Right Value iscomments, with the output renamed toComment. - Connect Route Comment Updates to Validate External Commenter.
- In Validate External Commenter, set a condition where Left Value is
{{ $json.body.entry[0].id }}and Right Value is{{ $json.body.entry[0].changes[0].value.from.id }}with operatornotEquals. - Connect Validate External Commenter to Retrieve Comment Replies.
Step 4: Configure Output and Reply Actions
This step sends the Instagram reply and logs the interaction to Google Sheets.
- Connect Retrieve Comment Replies to Dispatch Comment Reply, then connect Dispatch Comment Reply to Log Interaction to Sheet.
- In Dispatch Comment Reply, set URL to
https://graph.instagram.com/v23.0/{{ $('Route Comment Updates').item.json.body.entry[0].id }}/messages. - Set Method to
POST, Send Body totrue, and Body Content Type tojson. - Set the JSON Body to
{ "recipient": { "id": "{{ $('Route Comment Updates').item.json.body.entry[0].changes[0].value.from.id }}" }, "message": { "text": "{{ $json.Message }}" } }. - Credential Required: Connect your httpHeaderAuth credentials in Dispatch Comment Reply.
Tip: Ensure the reply message is stored in a Message field in your Google Sheet so Dispatch Comment Reply can use {{ $json.Message }}.
Step 5: Test & Activate Your Workflow
Verify that the workflow processes Instagram comment events and logs successful replies.
- Click Test Workflow and send a test Instagram comment event to the Instagram Event Hook URL.
- Confirm that Route Comment Updates routes only
commentsevents and Validate External Commenter filters out your own account. - Verify that Dispatch Comment Reply sends a response and Log Interaction to Sheet appends a new row with
Time,User Id,Username, andNote. - When testing is successful, switch the workflow to Active for production use.
Common Gotchas
- Meta (Instagram Graph API) tokens expire or lose permissions after app changes. If replies suddenly stop, check your access token status in Meta’s developer dashboard and refresh it first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Google Sheets column names and sheet tabs must match what the workflow expects. If “no reply found” shows up in the log, confirm the keyword and message columns haven’t been renamed.
Frequently Asked Questions
Plan for about 60 minutes if your Meta app is new.
No. You’ll mostly be connecting accounts and pasting in the right API details from Meta.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Meta/Instagram API access (usually $0, but your app must be approved with the right permissions).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but keep it simple: add a “Campaign” or “Brand” column in Google Sheets, then filter which rows are used based on the Instagram account or a keyword group. Many teams also maintain separate tabs per brand and point the “Retrieve Comment Replies” step at the right tab. You can also change the outgoing message format (for example, add a tracked link) inside the HTTP Request that posts the reply.
Usually it’s an expired access token or missing permissions like instagram_manage_comments in your Meta app. Regenerate the token, update it in n8n, and confirm your webhook subscription is still active. If it fails only during busy periods, you may be hitting rate limits, so logging the raw error message into your interaction sheet helps you spot the pattern.
If you self-host, there’s no hard execution limit (it depends on your server), and most small businesses can handle hundreds of comments a day without thinking about it.
Often, yes. This setup needs webhook handling, branching logic (only respond to certain updates), and a clean logging step, which is where n8n tends to feel more flexible. Self-hosting is also a big deal if you expect lots of executions because you’re not paying per tiny step. Zapier or Make can still work for lighter setups, but Instagram Graph API edge cases can get annoying in “simpler” builders. Talk to an automation expert if you want help choosing without overbuilding.
Once this is running, your replies stay consistent and your log stays updated, even on the days you’re busy launching something else. Set it up, test it, and let your comment section stop being a daily fire drill.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.