Skip to main content

Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord

Workflow preview

Workflow preview
100%
Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord preview
Open on n8n.io

1. Workflow Overview

Who it's for This workflow is for sales teams, growth agencies, and solo operators running LinkedIn outreach campaigns who want to automate prospect reply handling without losing the human touch on...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.filter, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.wait, n8n-nodes-base.if, n8n-nodes-base.discord

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord
Workflow name
Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord

Who it's for

This workflow is for sales teams, growth agencies, and solo operators running LinkedIn outreach campaigns who want to automate prospect reply handling without losing the human touch on complex cases.

How it works

  1. A webhook receives incoming LinkedIn message events and filters out invalid entries — ensuring a LinkedIn URL is present and the message is not sent by the agent itself.
  2. The Unipile API resolves the contact's public LinkedIn identifier, then fetches the full conversation history for that chat thread.
  3. An AI agent powered by OpenAI GPT analyzes the conversation and classifies the prospect (Meeting Request, Info Request, Not Interested, or Escalation), then drafts a contextual reply.
  4. A conditional branch evaluates the classification: if escalation is required, a formatted alert is posted to a Discord channel; otherwise, the workflow waits a randomized business-hours delay before posting the AI-generated reply back to LinkedIn via the Unipile API.

How to set up

  • Configure the Webhook node with the correct path to receive LinkedIn reply events
  • Add your Unipile API credentials (base URL + API key) to the three HTTP Request nodes
  • Set your OpenAI API credentials in the OpenAI Chat Model node
  • Configure the Discord bot token and target channel ID for escalation alerts
  • Update the AI agent system prompt with your identity, company details, and booking link
  • Adjust the Wait node logic to match your preferred reply delay window

Requirements

  • Unipile account with a connected LinkedIn account
  • OpenAI API account
  • Discord bot with access to a notification channel

How to customize

  • Swap the OpenAI model for another provider (Anthropic Claude, Mistral) by replacing the language model sub-node.
  • Extend the classification logic in the IF node to add more routing branches (e.g. route "Not Interested" prospects to a CRM update step).
  • Replace the Discord alert with a Slack message or an email notification via Gmail for escalation handling.

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 - Sticky Note13

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

Block 2 - Sticky Note16

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

Block 3 - Sticky Note

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

Block 4 - Sticky Note1

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

Block 5 - Sticky Note2

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

Block 6 - Sticky Note3

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

Block 7 - Sticky Note4

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

Block 8 - Sticky Note5

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

Block 9 - When LinkedIn Reply Received

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 10 - Filter Valid LinkedIn URLs

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

Block 11 - Fetch LinkedIn Public Identifier

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

Block 12 - Fetch LinkedIn Chat Messages

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

Block 13 - LinkedIn Reply Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 14 - Wait Business Hours Delay

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

Block 15 - If Escalation Needed

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

Block 16 - Send Escalation to Discord

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

Block 17 - Post AI Reply to LinkedIn Chat

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

Block 18 - OpenAI GPT-5-mini Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 19 - Parse Linkedin output

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 20 - Create webhook Unipile

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

Block 21 - When clicking ‘Execute workflow’

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

Block 22 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 23 - Sticky Note6

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

3. Summary Table

Workflow Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord
Complexity advanced
Nodes 23
Categories Lead Nurturing, AI Chatbot
Author Allan Vaccarizi
Published 12 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15658/15658.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 Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord do?

Who it's for This workflow is for sales teams, growth agencies, and solo operators running LinkedIn outreach campaigns who want to automate prospect reply handling without losing the human touch on...

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, AI Chatbot use case.