Usar GPT-4o-mini para generar resumen diario de transacciones de Pipedrive

Intermedio

Este es unAI Summarization, Multimodal AIflujo de automatización del dominio deautomatización que contiene 14 nodos.Utiliza principalmente nodos como Set, Code, Aggregate, Pipedrive, Summarize. Usar GPT-4o-mini para generar un resumen diario de operaciones en Pipedrive

Requisitos previos
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "165f2d3a-d197-4112-91ed-b8397cc6194d",
      "name": "Al hacer clic en 'Ejecutar flujo de trabajo'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -416,
        1952
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d6630b97-9d30-4dd1-a6e4-c547499bd2b6",
      "name": "Obtener múltiples acuerdos",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        -192,
        2480
      ],
      "parameters": {
        "filters": {},
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "pipedriveApi": {
          "id": "Tk6DUhlSCIuPlg0c",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3487ab2c-d87a-499a-9cd7-860100ad31fb",
      "name": "Obtener múltiples notas",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        240,
        1920
      ],
      "parameters": {
        "resource": "note",
        "operation": "getAll",
        "returnAll": true,
        "additionalFields": {
          "deal_id": "={{ $json.id }}"
        }
      },
      "credentials": {
        "pipedriveApi": {
          "id": "Tk6DUhlSCIuPlg0c",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2620c098-2507-4884-9392-905ece30ecab",
      "name": "Código",
      "type": "n8n-nodes-base.code",
      "position": [
        48,
        1952
      ],
      "parameters": {
        "jsCode": "// Code node: Rename stage_id numbers to names\n// Input: items with item.json.stage_id\n// Output: item.json.stage_name (string)\n\nconst stageMap = {\n  1: \"Prospecting\",\n  2: \"Qualified\",\n  3: \"Proposal Sent\",\n  4: \"Negotiation\",\n  5: \"Closed Won\"\n};\n\nreturn items.map(item => {\n  const stageId = item.json.stage_id;\n  item.json.stage_name = stageMap[stageId] || `Unknown (${stageId})`;\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "e5925254-2fa0-4c4e-96ad-44a4f7afc2c9",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1104,
        2416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f57e1044-3d56-438a-957e-d09de9c48f1e",
      "name": "Nota adhesiva8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        1760
      ],
      "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/organization/billing/overview)  \n3. Add funds to your billing account  \n4. Copy your API key into the **OpenAI credentials** in n8n  \n\n### 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** → **Credentials → New → Pipedrive API**  \n   - **Company domain**: `{your-company}` (the subdomain in your Pipedrive URL)  \n   - **API Token**: paste the token from step 1 → **Save**  \n3. In the **Pipedrive nodes**, select your Pipedrive credential and (optionally) set filters (e.g., owner, label, created time).\n\n\n\n## 📬 Contact\nNeed help extending this (e.g., send summaries by Slack/Email, or auto-create tasks in Pipedrive)?\n\n- 📧 **robert@ynteractive.com**  \n- 🔗 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)**  \n- 🌐 **[ynteractive.com](https://ynteractive.com)**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5a4cc9ef-73a0-4137-bfa8-be951faddf98",
      "name": "Nota adhesiva56",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        1760
      ],
      "parameters": {
        "color": 7,
        "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 generate a daily summary of your funnel.\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "4c55d8b2-a416-4c2b-b4f4-2505ac3a1d75",
      "name": "Nota adhesiva9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        2080
      ],
      "parameters": {
        "color": 3,
        "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** → **Credentials → New → Pipedrive API**  \n   - **Company domain**: `{your-company}` (the subdomain in your Pipedrive URL)  \n   - **API Token**: paste the token from step 1 → **Save**  \n3. In the **Pipedrive Tool** node, select your Pipedrive credential and (optionally) set filters (e.g., owner, label, created time).\n"
      },
      "typeVersion": 1
    },
    {
      "id": "48b1c9e1-576b-475a-8f64-d237fdb5bc12",
      "name": "Nota adhesiva11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        2256
      ],
      "parameters": {
        "color": 3,
        "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)  \n3. Add funds to your billing account  \n4. Copy your API key into the **OpenAI credentials** in n8n  "
      },
      "typeVersion": 1
    },
    {
      "id": "ce5d2198-e82a-4cec-9367-874798dbee30",
      "name": "Combinar notas",
      "type": "n8n-nodes-base.summarize",
      "position": [
        336,
        2304
      ],
      "parameters": {
        "options": {},
        "fieldsToSplitBy": "deal_id",
        "fieldsToSummarize": {
          "values": [
            {
              "field": "content",
              "separateBy": "=,",
              "aggregation": "concatenate"
            },
            {
              "field": "deal.title",
              "aggregation": "max"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "477886ba-3c21-4b1c-badd-c802f63bbcd4",
      "name": "Establecer nombres de campo",
      "type": "n8n-nodes-base.set",
      "position": [
        528,
        2144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1d2af38f-855d-435a-b70c-24cf560d103f",
              "name": "stage_name",
              "type": "string",
              "value": "={{ $('Code').item.json.stage_name }}"
            },
            {
              "id": "eb58ba6e-4722-4cc5-be7c-031a823a3488",
              "name": "deal.title",
              "type": "string",
              "value": "={{ $json.max_deal_title }}"
            },
            {
              "id": "d4fe6419-7954-450d-87ab-788149086bd5",
              "name": "content",
              "type": "string",
              "value": "={{ $json.concatenated_content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1bde07e2-8487-4589-9b96-6b10fc19612a",
      "name": "Agregar para agente",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        688,
        2032
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "63f75533-fb6e-47eb-82e0-34ed04e2dd58",
      "name": "Convertir objetos a texto",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        1968
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9578adb8-b0e3-4629-a375-8ac9585022f2",
              "name": "data",
              "type": "string",
              "value": "={{ $json.data }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5c9c8df3-4038-4aa6-8555-aa52abfe0572",
      "name": "Resumir Pipedrive",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1152,
        1936
      ],
      "parameters": {
        "text": "=Deals: {{ $json.data }}",
        "options": {
          "systemMessage": "You are a helpful assistant. Do a daily summary of the deals in our pipedrive funnel. "
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    }
  ],
  "pinData": {},
  "connections": {
    "2620c098-2507-4884-9392-905ece30ecab": {
      "main": [
        [
          {
            "node": "3487ab2c-d87a-499a-9cd7-860100ad31fb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ce5d2198-e82a-4cec-9367-874798dbee30": {
      "main": [
        [
          {
            "node": "477886ba-3c21-4b1c-badd-c802f63bbcd4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d6630b97-9d30-4dd1-a6e4-c547499bd2b6": {
      "main": [
        [
          {
            "node": "2620c098-2507-4884-9392-905ece30ecab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3487ab2c-d87a-499a-9cd7-860100ad31fb": {
      "main": [
        [
          {
            "node": "ce5d2198-e82a-4cec-9367-874798dbee30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "477886ba-3c21-4b1c-badd-c802f63bbcd4": {
      "main": [
        [
          {
            "node": "1bde07e2-8487-4589-9b96-6b10fc19612a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e5925254-2fa0-4c4e-96ad-44a4f7afc2c9": {
      "ai_languageModel": [
        [
          {
            "node": "5c9c8df3-4038-4aa6-8555-aa52abfe0572",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "1bde07e2-8487-4589-9b96-6b10fc19612a": {
      "main": [
        [
          {
            "node": "63f75533-fb6e-47eb-82e0-34ed04e2dd58",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "63f75533-fb6e-47eb-82e0-34ed04e2dd58": {
      "main": [
        [
          {
            "node": "5c9c8df3-4038-4aa6-8555-aa52abfe0572",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "165f2d3a-d197-4112-91ed-b8397cc6194d": {
      "main": [
        [
          {
            "node": "d6630b97-9d30-4dd1-a6e4-c547499bd2b6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Resumen de IA, IA Multimodal

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos14
Categoría2
Tipos de nodos9
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34