🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Instagram to Google Sheets, DMs sent and tracked

Lisa Granqvist Partner Workflow Automation Expert

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

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

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.

  1. Open Manual Start Launch and leave settings as default for manual testing.
  2. Open Scheduled Check Trigger and set the interval rule to minutes with minutesInterval = 15.
  3. 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.

  1. Open Retrieve Contacted List and set Document to [YOUR_ID] and Sheet to gid=0 (Hoja 1).
  2. Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Contacted List.
  3. Open Append Contacted Row and ensure Operation is set to append.
  4. 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 }}.
  5. Credential Required: Connect your googleSheetsOAuth2Api credentials 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.

  1. Open Set Post & Reply Text and set postUrl to Instagram url post/reel.
  2. Set replyMessage to Thanks so much! This is the template: xxxxx and profileUsername to add_upload_post_username.
  3. Open Fetch Post Comments and set URL to =https://api.upload-post.com/api/uploadposts/comments.
  4. 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 }}.
  5. Credential Required: Connect your httpHeaderAuth credentials 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.

  1. Open Isolate New Comments and keep the provided JavaScript, which normalizes comment IDs and excludes those found in Retrieve Contacted List.
  2. Confirm Isolate New Comments uses values from Set Post & Reply Text for replyMessage, postUrl, and profileUsername.
  3. Open Verify New Comment Presence and confirm its conditions use expressions like {{ $json.noNewComments }} and {{ !$json.noNewComments }}.
  4. 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.

  1. Open Post Comment Reply and confirm the JSON body uses {{ $json.profileUsername }}, {{ $json.commentId }}, and {{ $json.replyMessage }}.
  2. Credential Required: Connect your httpHeaderAuth credentials in Post Comment Reply.
  3. Open Validate Reply Result and confirm it checks {{ $json.success }} to route success to Append Contacted Row and failures to Capture Failed Reply.
  4. Review Capture Failed Reply to ensure it logs failed replies with userId, username, and commentId from Isolate New Comments.
  5. 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.

  1. Click Execute Workflow using Manual Start Launch to test the full flow.
  2. Confirm Fetch Post Comments returns comments and Isolate New Comments outputs items for new commenters.
  3. Check that successful replies appear in your Google Sheet via Append Contacted Row, and failed ones are logged by Capture Failed Reply.
  4. Verify Build Session Summary outputs a summary message and totals in its JSON output.
  5. When you are satisfied, toggle the workflow to Active to let Scheduled Check Trigger run every 15 minutes.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

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

What’s the setup time for this Instagram DM tracking automation?

About 30 minutes if your accounts and sheet are ready.

Is coding required for this Instagram DM tracking?

No. You will connect credentials, paste your post URL, and edit the DM message.

Is n8n free to use for this Instagram DM tracking workflow?

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.

Where can I host n8n to run this automation?

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.

Can I modify this Instagram DM tracking workflow for different use cases?

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.

Why is my Google Sheets connection failing in this workflow?

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.

What volume can this Instagram DM tracking workflow process?

For most small teams, hundreds of comments per day is fine.

Is this Instagram DM tracking automation better than using Zapier or Make?

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.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal