This workflow corresponds to n8n.io template #7670 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "3a42f460-754a-4d50-b5f7-4f550c9481d2",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-80,
368
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "74a26fd1-a743-4495-902b-1f22a753eb30",
"name": "Pipedrive Tool",
"type": "n8n-nodes-base.pipedriveTool",
"position": [
480,
416
],
"parameters": {
"filters": {},
"resource": "lead",
"operation": "getAll",
"returnAll": true
},
"credentials": {
"pipedriveApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "bbb5baca-6411-4d41-8530-3aff0a228513",
"name": "Chat with Slack",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-256,
-48
],
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "0983fb7e-b445-4018-b104-2c3047483a0e",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-864,
-240
],
"parameters": {
"width": 400,
"height": 816,
"content": "\n## \u2699\ufe0f Setup Instructions\n\n### 1\ufe0f\u20e3 Set Up OpenAI Connection\n1. Go to [OpenAI Platform](https://platform.openai.com/api-keys) \n2. Navigate to [OpenAI Billing](https://platform.openai.com/settings/organization/billing/overview) \n3. Add funds to your billing account \n4. Copy your API key into the **OpenAI credentials** in n8n\n\n### 2\ufe0f\u20e3 Connect Pipedrive\n1. In **Pipedrive** \u2192 **Personal preferences \u2192 API** \u2192 copy your **API token** \n - URL shortcut: `https://{your-company}.pipedrive.com/settings/personal/api` \n2. In **n8n** \u2192 **Credentials \u2192 New \u2192 Pipedrive API** \n - **Company domain**: `{your-company}` (the subdomain in your Pipedrive URL) \n - **API Token**: paste the token from step 1 \u2192 **Save** \n3. In the **Pipedrive Tool** node, select your Pipedrive credential and (optionally) set filters (e.g., owner, label, created time).\n\n\n## \ud83d\udcec Contact\nNeed help extending this (e.g., posting summaries to Slack/Email or auto-creating activities)?\n\n- \ud83d\udce7 **robert@ynteractive.com** \n- \ud83d\udd17 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)** \n- \ud83c\udf10 **[ynteractive.com](https://ynteractive.com)**\n"
},
"typeVersion": 1
},
{
"id": "37d66b1a-be0d-4d41-b334-357228086e3b",
"name": "Sticky Note51",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
-240
],
"parameters": {
"color": 7,
"width": 1136,
"height": 816,
"content": "# \ud83d\udcca Pipedrive Leads Chatbot (n8n + OpenAI)\n\nAsk natural-language questions about your **Pipedrive leads**. This workflow pulls live lead data from Pipedrive and has OpenAI answer questions like \u201cleads added this week\u201d, \u201cstuck leads by owner\u201d, or \u201cnext activities due today.\u201d Responses are grounded **only** in your Pipedrive data.\n\n"
},
"typeVersion": 1
},
{
"id": "97f075a0-1bdb-4846-a5f8-c026cba0d3b3",
"name": "Pipedrive Leads Chatbot",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
32,
-48
],
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant.\nFor all questions, get the lead conversation history from the Pipedrive tool.\nDo not make anything up. Use only the data available in the Pipedrive conversation history tool to answer questions."
}
},
"typeVersion": 2.2
},
{
"id": "c9cf44b3-eb53-4dff-a33a-6ff8abf5a8b0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-192,
208
],
"parameters": {
"color": 3,
"width": 288,
"height": 304,
"content": "### 1\ufe0f\u20e3 Set Up OpenAI Connection\n1. Go to [OpenAI Platform](https://platform.openai.com/api-keys) \n2. Navigate to [OpenAI Billing](https://platform.openai.com/settings/organization/billing/overview) \n3. Add funds to your billing account \n4. Copy your API key into the **OpenAI credentials** in n8n "
},
"typeVersion": 1
},
{
"id": "14df1699-db12-4e70-8590-aacad8bd97a1",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
368,
-16
],
"parameters": {
"color": 3,
"width": 288,
"height": 544,
"content": "### 2\ufe0f\u20e3 Connect Pipedrive\n1. In **Pipedrive** \u2192 **Personal preferences \u2192 API** \u2192 copy your **API token** \n - URL shortcut: `https://{your-company}.pipedrive.com/settings/personal/api` \n2. In **n8n** \u2192 **Credentials \u2192 New \u2192 Pipedrive API** \n - **Company domain**: `{your-company}` (the subdomain in your Pipedrive URL) \n - **API Token**: paste the token from step 1 \u2192 **Save** \n3. In the **Pipedrive Tool** node, select your Pipedrive credential and (optionally) set filters (e.g., owner, label, created time).\n"
},
"typeVersion": 1
}
],
"connections": {
"Pipedrive Tool": {
"ai_tool": [
[
{
"node": "Pipedrive Leads Chatbot",
"type": "ai_tool",
"index": 0
}
]
]
},
"Chat with Slack": {
"main": [
[
{
"node": "Pipedrive Leads Chatbot",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Pipedrive Leads Chatbot",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApipipedriveApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Ask natural-language questions about your Pipedrive leads. This workflow pulls live lead data from Pipedrive and has OpenAI answer questions like “leads added this week”, “stuck leads by owner”, or “next activities due today.” Responses are grounded only in your Pipedrive data.…
Source: https://n8n.io/workflows/7670/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Generate Sql Queries From Schema Only Ai Powered. Uses lmChatOpenAi, memoryBufferWindow, noOp, mySql. Chat trigger; 29 nodes.
Generate SQL queries from schema only - AI-powered. Uses lmChatOpenAi, memoryBufferWindow, noOp, mySql. Chat trigger; 29 nodes.
Extract Insights & Analyse Youtube Comments Via Ai Agent Chat. Uses stickyNote, lmChatOpenAi, toolWorkflow, memoryPostgresChat. Chat trigger; 29 nodes.
Generate SQL queries from schema only - AI-powered. Uses lmChatOpenAi, memoryBufferWindow, noOp, mySql. Chat trigger; 29 nodes.
This workflow is a modification of the previous template on how to create an SQL agent with LangChain and SQLite.