Skip to main content

LinkedIn lead generation: Auto DM system with comment triggers using Unipile & NocoDB

Workflow preview

Workflow preview
100%
LinkedIn lead generation: Auto DM system with comment triggers using Unipile & NocoDB preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Short Description This LinkedIn automation workflow monitors post comments for specific trigger words and automatically sends direct messages with lead magnets to engaged users. The system checks c...

Best for

  • Lead Nurturing automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.if, n8n-nodes-base.filter, n8n-nodes-base.code, n8n-nodes-base.nocodb, n8n-nodes-base.splitinbatches, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Alexandra Spalato.

Original n8n.io source

1.1 Workflow description

Title
LinkedIn lead generation: Auto DM system with comment triggers using Unipile & NocoDB
Workflow name
LinkedIn lead generation: Auto DM system with comment triggers using Unipile & NocoDB

Short Description

This LinkedIn automation workflow monitors post comments for specific trigger words and automatically sends direct messages with lead magnets to engaged users. The system checks connection status, handles non-connected users with connection requests, and prevents duplicate outreach by tracking all interactions in a database.

Key Features

  • Comment Monitoring: Scans LinkedIn post comments for customizable trigger words
  • Connection Status Check: Determines if users are 1st-degree connections
  • Automated DMs: Sends personalized messages with lead magnet links to connected users
  • Connection Requests: Asks non-connected users to connect via comment replies
  • Duplicate Prevention: Tracks interactions in NocoDB to avoid repeat messages
  • Message Rotation: Uses different comment reply variations for authenticity
  • Batch Processing: Handles multiple comments with built-in delays

Who This Workflow Is For

  • Content creators looking to convert post engagement into leads
  • Coaches and consultants sharing valuable LinkedIn content
  • Anyone wanting to automate lead capture from LinkedIn posts

How It Works

  1. Setup: Configure post ID, trigger word, and lead magnet link via form
  2. Comment Extraction: Retrieves all comments from the specified post using Unipile
  3. Trigger Detection: Filters comments containing the specified trigger word
  4. Connection Check: Determines if commenters are 1st-degree connections
  5. Smart Routing: Connected users receive DMs, others get connection requests
  6. Database Logging: Records all interactions to prevent duplicates

Setup Requirements

Required Credentials

  • Unipile API Key: For LinkedIn API access
  • NocoDB API Token: For database tracking

Database Structure

**Table: leads

  • linkedin_id: LinkedIn user ID
  • name: User's full name
  • headline: LinkedIn headline
  • url: Profile URL
  • date: Interaction date
  • posts_id: Post reference
  • connection_status: Network distance
  • dm_status: Interaction type (sent/connection request)

Customization Options

  • Message Templates: Modify DM and connection request messages
  • Trigger Words: Change the words that activate the workflow
  • Timing: Adjust delays between messages (8-12 seconds default)
  • Reply Variations: Add more comment reply options for authenticity

Installation Instructions

  1. Import the workflow into your n8n instance
  2. Set up NocoDB database with required table structure
  3. Configure Unipile and NocoDB credentials
  4. Set environment variables for Unipile root URL and LinkedIn account ID
  5. Test with a sample post before full use

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Get Comments from Posts

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - Split Out1

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 3 - Check if we are connected

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 4 - Filter Comments with trigger

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 5 - Send DM with Lead Magnet

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Answer to comment

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Create Message Rotation

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Create a row

Type / Role
n8n-nodes-base.nocoDb - nocoDb
Config choices
Version 3

Block 9 - Ask For connection

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 10 - Loop Over Items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 11 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 12 - Split Out2

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 13 - cursor

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 15 - Filter1

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 16 - Create a row2

Type / Role
n8n-nodes-base.nocoDb - nocoDb
Config choices
Version 3

Block 17 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 18 - Get all the rows where the dm is already sent

Type / Role
n8n-nodes-base.nocoDb - nocoDb
Config choices
Version 3

Block 19 - Get all the rows where the connection is already asked

Type / Role
n8n-nodes-base.nocoDb - nocoDb
Config choices
Version 3

Block 20 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 21 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 22 - If1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 23 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow LinkedIn lead generation: Auto DM system with comment triggers using Unipile & NocoDB
Complexity advanced
Nodes 32
Categories Lead Nurturing, Multimodal AI
Author Alexandra Spalato
Published 25 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7844/7844.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does LinkedIn lead generation: Auto DM system with comment triggers using Unipile & NocoDB do?

Short Description This LinkedIn automation workflow monitors post comments for specific trigger words and automatically sends direct messages with lead magnets to engaged users. The system checks c...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, Multimodal AI use case.