Instagram to Google Sheets, DMs sent and tracked
Instagram comments come in fast. Then you’re stuck jumping between notifications, profiles, and DMs, trying to follow up before the moment (and the buyer intent) disappears.
Social media managers feel this on busy client accounts. E-commerce owners see it when a product post takes off. And if you’re a creator or coach, Instagram DM tracking becomes the difference between “nice comment” and a real lead.
This workflow watches one Instagram post, messages new commenters automatically, and logs everything in Google Sheets so you never double-message. You’ll learn what it does, what you need, and how to run it safely.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Instagram to Google Sheets, DMs sent and tracked
flowchart LR
subgraph sg0["Start Monitoring Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Start Monitoring", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Configure Post & Message", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Read Contacted Users", pos: "b", h: 48 }
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/code.svg' width='40' height='40' /></div><br/>Filter New Comments"]
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check If Has New Comments", pos: "b", h: 48 }
n5["<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 Reply to Comment"]
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Reply Success", pos: "b", h: 48 }
n7@{ icon: "mdi:database", form: "rounded", label: "Record Contacted User", pos: "b", h: 48 }
n8["<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/code.svg' width='40' height='40' /></div><br/>Log Failed Reply"]
n9["<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/code.svg' width='40' height='40' /></div><br/>Generate Summary"]
n10["<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/>Get Post Comments"]
n11@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n8 --> n9
n11 --> n1
n0 --> n1
n10 --> n3
n6 --> n7
n6 --> n8
n3 --> n4
n2 --> n10
n7 --> n9
n5 --> n6
n1 --> n2
n4 --> n5
n4 --> n9
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 n0,n11 trigger
class n4,n6 decision
class n2,n7 database
class n5,n10 api
class n3,n8,n9 code
classDef customIcon fill:none,stroke:none
class n3,n5,n8,n9,n10 customIcon
Why This Matters: Commenters Slip Through the Cracks
If you’ve ever tried to “just keep up” with Instagram comments manually, you already know the trap. You reply to some comments in public, you DM a few people who seem interested, and then you get pulled into something else. By the time you come back, you’ve got a messy pile: people you meant to message, people you already messaged (but can’t remember), and a handful of leads that cooled off. The worst part is the mental load. You’re not doing high-skill marketing anymore. You’re doing follow-up logistics.
It adds up fast. Here’s where it usually breaks down.
- New commenters get missed because you’re not watching the post all day.
- You accidentally DM the same person twice, which looks spammy and hurts trust.
- There’s no clean record of what you sent, so you can’t analyze what actually converts.
- When a post spikes, the “I’ll follow up later” plan collapses in about an hour.
What You’ll Build: Auto-DM New Commenters and Log Them
This automation runs on a schedule (every 15 minutes) and checks a specific Instagram post for new comments using the upload-post.com API. It pulls your existing “already contacted” list from Google Sheets first, so it has memory. Then it compares fresh comments against that sheet and isolates only the people you haven’t messaged yet. For each new commenter, it sends your pre-written message as a DM (and can also post a public reply, depending on how you configure it). After a successful send, it appends a new row in Google Sheets with the comment ID, username, message content, timestamp, and post URL. If something fails, it captures the failure and rolls it into a session summary, so you can spot issues without digging through logs all day.
The workflow starts with your schedule trigger (or a manual run for testing). Next, it fetches comments, filters out anyone already contacted, and sends the message. Finally, it records the outcome in Google Sheets, which becomes your single source of truth for follow-ups and reporting.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say your promo post gets 40 comments in a day. If you spend maybe 3 minutes per person to open the profile, decide what to send, DM them, and track it somewhere, that’s about 2 hours of busywork. With this workflow, the check runs automatically every 15 minutes, the DM goes out as soon as they’re detected, and the Google Sheets row is created for you. You’ll still want to skim the sheet and handle edge cases, but the bulk of the work disappears.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- upload-post.com for Instagram comment + DM API access.
- Google Sheets to store contacted users and message logs.
- Upload-post API token (get it from your upload-post.com dashboard).
Skill level: Beginner. You’ll connect accounts, paste a post URL, and map a few fields into your Sheet.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A schedule (or manual test run) kicks things off. The workflow runs every 15 minutes via the Schedule Trigger, and you can also start it on demand with Manual Start Launch when you’re setting it up.
Your post and message are set once, then reused. In “Set Post & Reply Text,” you define the Instagram post URL to monitor, the reply/DM text you want to send, and your upload-post profile username. This is the “control panel” node you’ll edit most often.
Google Sheets provides memory. “Retrieve Contacted List” pulls the existing rows so the workflow knows who has already been contacted. Then it fetches the latest comments from upload-post.com and isolates only the new ones that are not in your sheet.
The workflow replies and logs the outcome. If new comments exist, it sends the reply (via HTTP Request), validates that the send actually worked, and appends a row to Google Sheets. Failures get captured too, and a session summary is built so you can monitor what happened without babysitting the workflow.
You can easily modify the message text to match your campaign, or switch the monitored post URL when you launch something new. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual and Schedule Triggers
This workflow can be run manually or on a 15-minute schedule. Configure both triggers to suit testing and production use.
- Open Manual Start Launch and leave settings as default for manual testing.
- Open Scheduled Check Trigger and set the interval rule to
minuteswithminutesInterval=15. - Confirm both Manual Start Launch and Scheduled Check Trigger connect to Set Post & Reply Text.
Tip: Use Manual Start Launch for your first test runs so you can monitor logs from the code nodes.
Step 2: Connect Google Sheets
These nodes read and update the list of already-contacted commenters.
- Open Retrieve Contacted List and set Document to
[YOUR_ID]and Sheet togid=0(Hoja 1). - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Retrieve Contacted List. - Open Append Contacted Row and ensure Operation is set to
append. - Verify column mappings in Append Contacted Row use expressions like
{{ $('Isolate New Comments').item.json.commentId }},{{ $('Isolate New Comments').item.json.username }}, and{{ $('Isolate New Comments').item.json.replyMessage }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Append Contacted Row.
⚠️ Common Pitfall: Make sure your Google Sheet has headers matching comment_id, username, message_sent, timestamp, and post_url or the append mapping will fail.
Step 3: Set Up Post Configuration and Comment Retrieval
Define the Instagram post to monitor and pull comments through the API.
- Open Set Post & Reply Text and set postUrl to
Instagram url post/reel. - Set replyMessage to
Thanks so much! This is the template: xxxxxand profileUsername toadd_upload_post_username. - Open Fetch Post Comments and set URL to
=https://api.upload-post.com/api/uploadposts/comments. - In Fetch Post Comments, set query parameters: platform =
instagram, user ={{ $('Set Post & Reply Text').item.json.profileUsername }}, and post_url ={{ $('Set Post & Reply Text').item.json.postUrl }}. - Credential Required: Connect your
httpHeaderAuthcredentials in Fetch Post Comments.
Step 4: Set Up Comment Filtering Logic
Filter out commenters already contacted and decide whether to send replies or skip the cycle.
- Open Isolate New Comments and keep the provided JavaScript, which normalizes comment IDs and excludes those found in Retrieve Contacted List.
- Confirm Isolate New Comments uses values from Set Post & Reply Text for
replyMessage,postUrl, andprofileUsername. - Open Verify New Comment Presence and confirm its conditions use expressions like
{{ $json.noNewComments }}and{{ !$json.noNewComments }}. - Check that Verify New Comment Presence routes to Post Comment Reply when new comments exist, and to Build Session Summary otherwise.
Tip: The normalization logic in Isolate New Comments prevents precision errors with long Instagram comment IDs—avoid altering that section unless necessary.
Step 5: Configure Reply Posting and Logging
Send replies, validate results, and capture success or failure outcomes.
- Open Post Comment Reply and confirm the JSON body uses
{{ $json.profileUsername }},{{ $json.commentId }}, and{{ $json.replyMessage }}. - Credential Required: Connect your
httpHeaderAuthcredentials in Post Comment Reply. - Open Validate Reply Result and confirm it checks
{{ $json.success }}to route success to Append Contacted Row and failures to Capture Failed Reply. - Review Capture Failed Reply to ensure it logs failed replies with
userId,username, andcommentIdfrom Isolate New Comments. - Open Build Session Summary to aggregate totals from Fetch Post Comments, Isolate New Comments, Append Contacted Row, and Capture Failed Reply.
Step 6: Test and Activate Your Workflow
Run a manual test first, then enable scheduled monitoring when results look correct.
- Click Execute Workflow using Manual Start Launch to test the full flow.
- Confirm Fetch Post Comments returns comments and Isolate New Comments outputs items for new commenters.
- Check that successful replies appear in your Google Sheet via Append Contacted Row, and failed ones are logged by Capture Failed Reply.
- Verify Build Session Summary outputs a summary message and totals in its JSON output.
- When you are satisfied, toggle the workflow to Active to let Scheduled Check Trigger run every 15 minutes.
Troubleshooting Tips
- upload-post.com credentials can expire or need specific permissions. If things break, check your upload-post dashboard token status and connected Instagram account access 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.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
About 30 minutes if your accounts and sheet are ready.
No. You will connect credentials, paste your post URL, and edit the DM message.
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 upload-post.com API costs based on your usage.
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, and you’ll probably want to. Most people swap the monitored post in “Set Post & Reply Text,” then adjust the replyMessage to match the offer (discount code, lead magnet, booking link). You can also change the schedule interval in the “Scheduled Check Trigger” node if 15 minutes is too frequent or not frequent enough. If you need a different tracking system, replace the “Retrieve Contacted List” and “Append Contacted Row” Google Sheets nodes with another database, but keep the idea the same: store comment_id so duplicates are blocked.
Usually it’s expired Google OAuth or the spreadsheet permissions changed. Reconnect the Google Sheets credential in n8n, then confirm the document ID in “Retrieve Contacted List” and “Append Contacted Row” matches the right file. Also check the sheet tab name and column headers (comment_id, username, message_sent, timestamp, post_url), because mismatches can look like “random” failures.
For most small teams, hundreds of comments per day is fine.
Often, yes, because this workflow depends on checking, filtering, branching on success/failure, and keeping a “memory” list, which is where n8n stays flexible. You also get the option to self-host for unlimited executions, which matters when you’re checking every 15 minutes. Zapier or Make can still work if you keep it very simple, but you may hit pricing or logic limits as you add safeguards like duplicate prevention. If you’re unsure, look at how many posts you plan to monitor and how much control you need over logging. Talk to an automation expert and we’ll help you pick the cleanest approach.
Once this is running, your comment-to-DM follow-up stops being a daily scramble. The workflow does the tracking and the sending, and you get to focus on the conversations that actually need a human.
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.