Instagram Comments Automation (N8n Complete Setup Guide)

Discover how to convert Instagram comments into leads instantly with proven automation tools. Learn the complete setup in 10 minutes - get started free!

You’re Losing Clients Because You’re Not Online 24/7

Here’s the truth: clients don’t leave because your work is poor. They leave because you weren’t there when they needed you.

Someone comments “interested” on your post at midnight. You reply at 9 AM. Too late – they already bought from someone else.

I lost a $500 client this way. Then I built an automation that responds instantly, even while I sleep. No more missed opportunities. No more clients feeling ignored.

This blog shows you exactly how to build it. Let’s dive in.

Instagram Comments Automation workflow in n8n showing a 5-step process: starting with a form submission trigger, followed by retrieving database pages from Notion, executing JavaScript code, making an HTTP request to an external service, and ending with sending a message via Gmail. The workflow canvas displays connected nodes in a dark theme interface with an 'Execute workflow' button at the bottom.

The Tools You’ll Need

We’re using two powerful platforms that work together seamlessly:

1. RapidDM – The Comment-to-DM Bridge

RapidDM is the tool that watches your Instagram posts and automatically sends DMs when someone comments. It’s the engine that makes this whole thing work.

Cost: 5-day free trial, no credit card required

2. N8n – The Automation Brain

n8n is an open-source automation platform that handles the form creation, data collection, and everything behind the scenes. Think of it as the central nervous system of your automation.

Cost: 14-day free trial

N8N Free Access For 14 Days “TRY NOW”

Don’t worry if you’ve never heard of these tools. I’m walking you through every single click.

Part 1: Setting Up RapidDM (Your Instagram Automation Engine)

Let’s start with the fun part – setting up the Instagram side of things.

Step 1: Sign Up and Connect Instagram
  1. Go to RapidDM’s website and sign up
  2. You’ll land directly on the dashboard (no credit card needed for the trial)
  3. Navigate to the Instagram tab
  4. Click “Connect Account” and follow the simple authorization flow
RapidDM Dashboard showing the Instagram connected account page. The left sidebar displays navigation menu items including Dashboard, Automations, Instagram (currently selected), and Subscription, with contact support information at the bottom. The main content area shows 'Connected Account' with a blue verified checkmark badge icon, accompanied by two action buttons: a gray 'Reauthorize' button and a red 'Remove' button for managing the connected Instagram account.

Your Instagram account is now connected. That was the hard part. Just kidding – there was no hard part.

Step 2: Create Your Comment Automation
  1. Click on “Automation” in the sidebar
  2. You’ll see two options: Comment Automation and Story Automation
  3. Select Comment Automation
Step 3: Set Your Trigger Keywords

Here’s where it gets interesting. RapidDM asks: “When should I respond to comments?”

Select “Comments with specific words”

Now add your trigger keywords. For example:

  • automation
  • test
  • resources
  • interested

You can add as many keywords as you want. Whenever someone comments ANY of these words, the automation fires.

Pro Tip: Use simple, obvious keywords. Don’t make people guess. “Type GUIDE for the free guide” works way better than something cryptic.

Step 4: The Secret Weapon – The Follow Gate

Here’s the genius part that most people miss.

Scroll down and find the option: “Ask to follow”

Toggle this ON.

RapidDM Instagram Comment Reply automation settings page showing the Automations sidebar menu selected. The main panel displays 'Instagram Comment Reply' configuration with keyword triggers set to '#automation' and 'test'. Below are three automation options: 'Reply to Comments' for configuring automatic replies to Instagram comments (inactive), 'Welcome Message' for setting up first messages sent to users (inactive), and 'Ask to Follow' to request users follow the account (with an active toggle enabled).
Step 5: Create Your Follow-Up Message

Now you need to set up the message that goes out after someone follows (or if they’re already following).

This is your chance to build excitement and direct them to the form.

Here’s a template that works:

“Thank you for your interest! I’m excited to share this valuable resource with you. I believe you’ll find it helpful and informative. Click the button below to access your template.”

"RapidDM Instagram Comment Reply automation settings showing the 'Ask to Follow' feature configuration. The interface displays a 'Message for Non-Followers' text box containing a customizable message that begins with 'One quick thing before we continue!' and explains exclusive content benefits for followers. Below is a 'Follow Button Text' field set to 'I'm Following' which users will click to confirm they've followed the account. A purple tip box at the bottom advises keeping messages clear and friendly to encourage follows. The automation is currently disabled as indicated by the toggle in the top right.
Step 6: Add the Action Button

RapidDM lets you add up to 3 buttons to your message. For this automation, you only need one:

  • Button Label: “Access Template” (or “Get Resources” or “Download Guide”)
  • Destination URL: This is where we’ll put the form link (we’ll create this in the next section)

For now, leave the URL field empty. We’ll come back to it.

That’s it for RapidDM! Don’t activate it yet – we need to create the form first so you have a URL to link to.

Part 2: Building Your Lead Capture System in n8n

Now comes the backend magic. This is where we create the form that captures information and stores it in a way you can actually use.

Step 1: Sign Up for n8n
  1. Go to n8n’s website and create an account
  2. You’ll get a 14-day free trial

N8N Free Access For 14 Days “TRY NOW”

3. Once you’re in, click “Create Workflow”

    You’re now looking at a blank canvas. Don’t panic – it’s simpler than it looks.

    Step 2: Create Your Lead Capture Form

    Every n8n workflow starts with a trigger – something that kicks off the automation. In our case, it’s a form submission.

    1. Click the first plus icon on the canvas
    2. Search for “n8n Form”
    3. Select the “n8n Form Trigger” (you’ll see a lightning bolt icon)

    Once you add it, you’ll see options for:

    • Test URL – Use this while building
    • Production URL – Use this when you’re live
    Step 3: Add Form Fields

    Click “Add Form Element” and create these fields:

    Field 1: Name

    • Element Type: Text
    • Placeholder: “First name”
    • Required: Yes

    Field 2: Email

    • Element Type: Email
    • Placeholder: “Enter email – you’ll receive the resource here”
    • Required: Yes

    Here’s the clever part…

    Field 3: Comment Word (Dropdown)

    • Element Type: Dropdown List
    • Label: “Commented Word”
    • Options:
      • automation
      • test
      • resources
      • (add all your trigger keywords here)
    • Required: Yes
    Step 4: Test Your Form

    Click “Execute Node” to generate your form.

    A preview opens up. Fill it out with test data and hit submit.

    You’ll see the submission data appear on the right side. This is HUGE – it means your form is working.

    n8n automation workflow interface showing an 'Instagram Resource Sender' form in the center. The form contains three input fields: 'what's your name' with a full name text input, 'Enter your Email' with an example@gmail.com placeholder, and 'Comment word' with a dropdown menu to select an option. A coral-colored Submit button appears at the bottom. The form header indicates it's a test version and explains users should fill out details to receive requested resources in their inbox. Behind the form, the n8n workflow canvas shows a connection between nodes including an HTTP Request trigger and a Gmail 'Send a message' action. The left sidebar displays n8n navigation menu items including Overview, Personal, Chat (Beta), Admin Panel, Templates, Insights, Help, and Settings.

    Important: Click “Pin Data” on the right side. This saves your test data so you don’t have to keep filling out the form as you build the rest of the automation.

    Step 5: Copy Your Form URL

    See that URL at the top of the n8n Form node? That’s your form link.

    Copy the Production URL (not the test URL).

    Now go back to RapidDM and paste this URL into the button destination field we left empty earlier.

    Boom. Your Instagram DM button now links directly to your lead capture form.

    See How AI Help In Blogging Check This – Automate Your Blog with AI : The Complete N8N News-to-WordPress Tutorial

    Part 3: Storing Lead Data in Notion

    Now you’ve got form submissions coming in. But where should they go? I recommend Notion because it’s free, organized, and powerful.

    Step 1: Set Up Your Notion Database

    Create a new database in Notion and Fill in one row as a template.

    For example:

    • Name: “Automation DM”
    • Subject: “Here’s the resource you requested on Instagram”
    • Body: HTML formatted email with your message and links
    • Tag: “automation”
    • File: Your PDF, template, or resource file
    Notion workspace showing a database table titled 'autto' with columns for Name, Body, File, Subject, and Tags. The table contains one entry labeled 'Automation DM' with HTML code in the Body column and 'Here's the Resource Requested' in the Subject column, tagged as 'BMW'. The left sidebar displays workspace navigation including Home, Meetings, Notion AI, and Inbox under 'nnn's Space', with teamspaces showing 'nnn's Space HQ' and databases including 'New database' and 'autto'. A context menu on the right shows database actions like Copy link, Duplicate, Move to, Customize layout, Lock database, Import, Export, and other options. A language preference notification appears at the bottom suggesting English (UK).
    Step 2: Connect Notion to n8n

    Back in your n8n workflow:

    1. Click the plus icon after your form node
    2. Search for “Notion”
    3. Select “Get Database Page”

    You’ll need to connect your Notion account. This process has a few steps involving API keys. I’ve created a detailed setup video that shows exactly how to do this. Check the resources section at the end of this post for the link.

    Once connected:

    • Operation: Get Many
    • Database: Select your “Automation DM” database
    • Limit: 1 (we only need one matching row)

    If you’re building with AI tools , Check Out Emergent AI Pricing 2026 — What You Actually Pay + 5% Off

    Part 4: Personalizing the Message

    Your Notion body probably has a placeholder like “[First Name]” where you want the person’s actual name to appear.

    We need to replace that placeholder with the real name from the form. This requires a tiny bit of code, but I promise it’s copy-paste simple.

    Adding the Code Node
    1. Click the plus icon after your Notion node
    2. Search for “Code”
    3. Select “Code” node

    In the code editor, paste this:

    const items = $input.all();
    const formSubmission = $("On form submission").all()[0];
    
    const updatedItems = items.map((item) => {
      item.json.property_body = item.json.property_body.replace(
        "[First Name]",
        formSubmission.json["Name"]
      );
      return item;
    });
    
    return updatedItems;

    Don’t worry if you don’t understand the code. This script simply finds “[First Name]” in your Notion body and replaces it with whatever name the person entered in the form.

    Click “Execute Node”.

    "n8n workflow automation code editor showing a JavaScript node that processes database items from Notion. The left INPUT panel displays database fields including id, name, url, property_tags (BMW), and property_file with a long AWS S3 URL. The center Parameters panel shows JavaScript code that maps through items, replaces property_body content with '[First Name]', and extracts values from a form submission. The code uses array methods and JSON operations to transform the data. The right OUTPUT panel shows the processed result with Automation DM entry and its corresponding Notion URL. A green success notification 'Node executed successfully' appears at the bottom right.

    Look at the output. The body now has the actual name instead of the placeholder. Magic.

    Part 5: Converting File URLs to Actual Files

    There’s one more technical hurdle. Notion stores files as URLs. But when you want to attach a file, you need the actual file, not just a link to it.

    Adding the HTTP Request Node
    1. Click the plus icon after your Code node
    2. Search for “HTTP Request”
    3. Select it

    Configuration:

    • Method: GET
    • URL: Drag and drop the “File” URL from your Notion node

    Here’s the crucial step:

    1. Click “Add Option”
    2. Find “Response” section
    3. Change “Response Format” from “Auto-detect” to “File”
    n8n HTTP Request node configuration showing a GET request setup to retrieve a file from AWS S3. The left INPUT panel displays data from a previous 'Code in JavaScript' node including id, name (Automation DM), url (Notion link), property_tags (BMW), and property_file array containing two AWS S3 URLs for files. The center Parameters panel shows the HTTP request configured with GET method, URL field populated with a dynamic expression '{{ $json.property_file[1] }}' to access the S3 URL, Authentication set to None, and collapsed sections for Send Query Parameters, Send Headers, Send Body, and Options with 'Include Response Headers and Status' enabled. The right OUTPUT panel displays the successful response with 'data' containing the downloaded file details including File Name 'bmw_m4.avif', the full S3 URL, and a long encoded data string representing the file content.

    Click “Execute Node”.

    Now instead of seeing JSON data, you’ll see an actual file in the output. This file can now be attached to emails or sent however you need.

    Part 6: Sending Automatic Emails with Gmail

    Here’s where the magic really happens. Your lead fills out the form, and seconds later, they receive a beautiful email with their resource. All without you lifting a finger.

    Adding the Gmail Node
    1. Click the plus icon after your HTTP Request node
    2. Search for “Gmail”
    3. Select “Send Message”
    Connect Your Gmail Account

    Click “Create New Credential” and sign in with Google. Grant n8n permission to send emails. It’s a simple one-click authorization.

    Configure the Email

    Now fill in the email details:

    To: Drag and drop the email field from your n8n Form Trigger

    Subject: Drag and drop the Subject property from your Notion node

    Email Type: Select HTML (so your formatting stays intact)

    Message: Drag and drop the personalizedBody from your Code node

    n8n HTTP Request node interface displaying a three-panel layout. The left INPUT panel shows data from a 'Code in JavaScript' node with fields for id (2bcfe0dc-3d2e-81ca-a28f-c870fff47b51), name (Automation DM), url (Notion link), property_tags (BMW), and property_file containing two AWS S3 URLs. The center Parameters panel configures a GET request with the URL field using the expression '{{ $json.property_file[1] }}' to dynamically fetch one of the S3 URLs. Authentication is set to None, with collapsed sections for Send Query Parameters, Send Headers, Send Body, and Options (where 'Include Response Headers and Status' is enabled). The right OUTPUT panel displays the successful response showing the downloaded file data including File Name 'bmw_m4.avif', the complete AWS S3 URL, and the encoded file content as a long alphanumeric string.
    Add the Attachment

    Click “Add Option”“Attachments”“Add Attachment”

    Property Name: Type “data”

    This grabs the file from your HTTP Request node (which outputs files as “data” by default).

    Test It

    Click “Execute Node”. Check the email address you used in your test form.

    Gmail inbox displaying an automated email with subject line 'Here's the Resource Requested on Instagram' marked with an Inbox label. The email, sent at 8:35 PM (2 minutes ago), contains a message from the Automation Team greeting the recipient and informing them they can download their requested resource from the attachment. The email includes a smiling emoji and mentions additional ways to explore AI Automations. Below the message body is one attachment that has been scanned by Gmail, with an option to 'Add all to Drive'. The Gmail interface shows standard navigation elements including Compose button, Inbox (with 12 messages), Starred, Snoozed, Sent, Drafts, Purchases, and More folders in the left sidebar. A second email preview from 'Mail Delivery Subsystem' is visible at the bottom.

    You should see your subject, personalized body with their name, and the attached resource. If everything looks good, you’re done!

    Connecting Everything Back to RapidDM

    Remember, we skipped the email sending part. But your automation is still incredibly powerful.

    Here’s what happens now:

    1. Someone comments your keyword
    2. RapidDM sends them a DM
    3. They click your button and fill out the form
    4. n8n captures their information and processes it through Notion
    5. You now have their email, name, and preferences organized and ready

    From here, you can:

    • Manually send them the resource (with the personalized template from Notion)
    • Export the data to your email marketing platform
    • Add them to a CRM
    • Set up additional automation tools to send emails automatically

    Final Verdict 

    You just built something most businesses pay thousands of dollars for. A system that captures leads automatically, responds instantly, and works 24/7 without you.

    The creators winning on Instagram aren’t just posting better content – they’re capturing everyone who engages with it.

    You’re no longer losing clients because you were offline. Every comment becomes a lead. Every lead gets an instant response.

    Set this up today. Test it this week. Watch your email list grow while you sleep.

    Your next $500 client is commenting right now. Don’t miss them.

    Leave a Reply

    Your email address will not be published. Required fields are marked *