Reply to LinkedIn messages with OpenAI GPT and escalate complex cases to Discord
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- Webhook
n8n-nodes-base.webhook - Filter
n8n-nodes-base.filter - HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent - Wait
n8n-nodes-base.wait - If
n8n-nodes-base.if - Discord
n8n-nodes-base.discord - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set
What it does
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.