Instagram Comment Lead Capture & Automated DM Reply - n8n Workflow

Automate Instagram lead capture using this advanced n8n workflow. Respond to keyword-triggered comments with DMs, log leads in Google Sheets, and start your marketing funnel using powerful n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Marketing teams and agencies managing high-volume social media engagement.

  • Content creators looking to automate lead generation directly from Instagram comments.

  • Users seeking pre-built n8n templates for social media automation.

  • Businesses requiring a system to log new Instagram leads in Google Sheets and prevent duplicate entries.

Overview

This powerful n8n workflow provides a solution for converting casual Instagram commenters into qualified marketing leads. Traditional social media interaction often results in lost opportunities, but this automation ensures every interaction is captured. The moment an Instagram user leaves a comment containing a specific keyword, this n8n workflow instantly triggers, verifying the Meta subscription and sending a personalized direct message (DM) containing a lead capture form. Furthermore, it uses a Google Sheets n8n node to maintain a central matching table, ensuring that the same user is not repeatedly sent the lead form, creating a highly professional and efficient customer experience. Utilizing this sophisticated n8n template saves significant manual effort and structures your lead capture pipeline.

How it Works

The process is initiated by the n8n trigger, the 'Listen to new Instagram comments' Webhook n8n node, which receives real-time comment data from Meta/Instagram.


  1. Validation & Routing: The 'Check first validation' Switch n8n node immediately processes the incoming data. If it is a subscription validation request (hub.verify_token matches 'KlickTipp'), the 'Challenge to validate' n8n node responds instantly to complete the handshake. Otherwise, the main processing branch is selected.

  2. Keyword Filtering: The 'Does comment contain keyword?' If n8n node analyzes the comment text. The downstream flow only proceeds if the predefined 'keyword' is detected.

  3. Automated DM: If the keyword is present, the 'DM form to user' HTTP Request n8n node sends a customized direct message to the user containing the lead form link (e.g., JotForm), using the user's ID for personalization.

  4. Duplicate Check: The 'Look for entry in matching table' Google Sheets n8n node searches for the user's Instagram username in the designated matching sheet.

  5. Lead Logging: The 'Does entry exist?' If n8n node determines if the lead is new. If the user is not found, the n8n workflow proceeds to the 'Add entry to matching table' Google Sheets n8n node, logging the new lead's username and ID. This ensures the integrity of the data collected by this essential n8n workflow.

Installation Guide

To deploy this expert n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON and import it into your n8n instance.

  2. Instagram/Meta Credentials: Set up your Instagram credential (using HTTP Header Auth) within the 'DM form to user' n8n node, ensuring you have the necessary Graph API permissions (pages_messaging).

  3. Google Sheets Setup: Configure the Google Sheets credential in the 'Look for entry...' and 'Add entry...' n8n nodes. You must link a Google Sheet that serves as the matching table, containing columns like Instagram username and Instagram ID.

  4. Webhook Activation: Activate the 'Listen to new Instagram comments' n8n trigger. Copy the generated webhook URL.

  5. Meta App Configuration: Set up your Meta App webhook subscription for Instagram comments, pasting the n8n webhook URL and using 'KlickTipp' as the verify token, matching the logic in the 'Check first validation' n8n node.

  6. Customization: Replace the placeholder 'keyword' in the If n8n node and update the JotForm link in the DM content to your specific lead capture URL.

Node Details


  • Listen to new Instagram comments (Webhook n8n trigger): The entry point of this n8n workflow. It waits for incoming POST requests from Instagram upon a new comment.

  • Check first validation (Switch n8n node): Essential flow control. Routes the execution based on whether the request is a Meta validation challenge or a live comment payload.

  • Challenge to validate (Respond to Webhook n8n node): Completes the Meta webhook handshake by returning the hub.challenge value, required for initial setup.

  • Does comment contain keyword? (If n8n node): Filters comments to ensure the automation only runs when the user types a specific term, crucial for triggering lead capture.

  • DM form to user (HTTP Request n8n node): Sends the personalized direct message using the Instagram Graph API. Key parameters include the recipient ID and the customized message text containing the lead form URL.

  • Look for entry in matching table (Google Sheets n8n node): Performs a lookup operation, searching the designated spreadsheet by Instagram username to check for prior engagement.

  • Add entry to matching table (Google Sheets n8n node): If the user is new (following the Does entry exist? If n8n node logic), this n8n node appends the new Instagram lead data to the Google Sheet.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Reach more people. 100% GDPR compliant. Quickly create automated email campaigns, SMS and marketing automations. Market your knowledge independently of Google & Co., sell lucrative products and activate your customers.

Featured*