{
  "name": "Generate daily Pipedrive deal summaries with GPT-4o-mini",
  "nodes": [
    {
      "id": "9246c394-0b95-48c7-a011-271dcea72081",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        416,
        304
      ]
    },
    {
      "id": "ba2e7076-7e79-4e54-b46f-5564d9545684",
      "name": "Get many deals",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        640,
        832
      ]
    },
    {
      "id": "223b3cbe-9a9c-420a-ab56-04af64eac3f8",
      "name": "Get many notes",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        1072,
        272
      ]
    },
    {
      "id": "934f9442-ab8c-4542-bac6-c232b5580d2c",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        304
      ]
    },
    {
      "id": "84d9ce96-9150-4300-8080-2be123b97a5f",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1936,
        768
      ]
    },
    {
      "id": "2eee8c39-6df0-4a86-a590-21d1f1d05533",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        112
      ],
      "parameters": {
        "width": 400,
        "height": 912,
        "content": "\n## ⚙️ Setup Instructions\n\n### 1️⃣ 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/orga"
      }
    },
    {
      "id": "97501f67-851f-4876-b8eb-1b61e4be2906",
      "name": "Sticky Note56",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        112
      ],
      "parameters": {
        "width": 1984,
        "height": 912,
        "content": "# 📊 Pipedrive Deals Daily Summary (n8n + OpenAI)\n\nThis workflow fetches **deals and their notes from Pipedrive**, cleans up stage IDs into names, aggregates the information, and uses **OpenAI** to gen"
      }
    },
    {
      "id": "35293ed8-8d18-4a3e-826d-c60c37cab6ab",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        432
      ],
      "parameters": {
        "width": 288,
        "height": 544,
        "content": "### 2️⃣ Connect Pipedrive\n1. In **Pipedrive** → **Personal preferences → API** → copy your **API token**  \n   - URL shortcut: `https://{your-company}.pipedrive.com/settings/personal/api`  \n2. In **n8n"
      }
    },
    {
      "id": "2ab2ecd5-6e76-45e6-a17c-6bcd103a42d5",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        608
      ],
      "parameters": {
        "width": 288,
        "height": 304,
        "content": "### 1️⃣ 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) "
      }
    },
    {
      "id": "c1dee969-580e-4e71-93c0-68eaa8ff08eb",
      "name": "Combine Notes",
      "type": "n8n-nodes-base.summarize",
      "position": [
        1168,
        656
      ]
    },
    {
      "id": "8a8861ec-df79-4c9a-8b15-fab444d4094f",
      "name": "Set Field Names",
      "type": "n8n-nodes-base.set",
      "position": [
        1360,
        496
      ]
    },
    {
      "id": "1968ceb0-3c68-4ef8-8186-c0a0a2767641",
      "name": "Aggregate for Agent",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1520,
        384
      ]
    },
    {
      "id": "f777571b-59aa-4d2d-b371-c7c8415d25f8",
      "name": "Turn Objects to Text",
      "type": "n8n-nodes-base.set",
      "position": [
        1728,
        320
      ]
    },
    {
      "id": "8a3952d0-4a24-4903-86b4-dad3d98dbf6d",
      "name": "Summarize Pipedrive",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1984,
        288
      ]
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Get many notes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Notes": {
      "main": [
        [
          {
            "node": "Set Field Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many deals": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many notes": {
      "main": [
        [
          {
            "node": "Combine Notes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Field Names": {
      "main": [
        [
          {
            "node": "Aggregate for Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Pipedrive",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate for Agent": {
      "main": [
        [
          {
            "node": "Turn Objects to Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Turn Objects to Text": {
      "main": [
        [
          {
            "node": "Summarize Pipedrive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get many deals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}