8
n8n 中文网amn8n.com

基于Claap通话使用GPT-4o和Google Slides自动生成销售演示文稿

高级

这是一个CRM, Multimodal AI领域的自动化工作流,包含 20 个节点。主要使用 If, Set, Code, Slack, Switch 等节点。 基于Claap通话使用GPT-4o和Google Slides自动生成销售演示文稿

前置要求
  • Slack Bot Token 或 Webhook URL
  • HubSpot API Key
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "d3e4902970aa37f340c04e2f2a31d62f0faafec176f1cad2990afef1086b6b99",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "45c60520-7937-4ccb-95e7-6805ee8e2f0a",
      "name": "复制演示文稿",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1872,
        2240
      ],
      "parameters": {
        "url": "=https://www.googleapis.com/drive/v3/files/{{ $('Set presentation id').item.json.presentationId }}/copy",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"name\": \"Claap x {{ $('Extract call info').item.json.client }} - Demo\"\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "udvmM2IU9jsvADPe",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8b92b5d8-00c7-4394-b45f-ef925a943600",
      "name": "发布演示文稿",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2080,
        2240
      ],
      "parameters": {
        "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions?supportsAllDrives=true",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"role\": \"reader\",\n  \"type\": \"anyone\",\n  \"allowFileDiscovery\": true\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "typeVersion": 4.2
    },
    {
      "id": "f594056f-b564-4ae8-b771-962640de5c8a",
      "name": "将用户设为编辑",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2304,
        2240
      ],
      "parameters": {
        "url": "=https://www.googleapis.com/drive/v3/files/{{ $('Duplicate presentation').item.json.id }}/permissions?supportsAllDrives=true",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"role\": \"writer\",\n  \"type\": \"user\",\n  \"emailAddress\": \"editor@example.com\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "udvmM2IU9jsvADPe",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0ce4dd64-60b6-42f4-a21e-836ad013a0b2",
      "name": "选择演示文稿模板",
      "type": "n8n-nodes-base.switch",
      "position": [
        560,
        2528
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Discovery",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6767bda7-f501-42d5-b70f-fbc427366c84",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('On new sales call recording').item.json.body.event.recording.labels.includes('Discovery') }}",
                    "rightValue": "Discovery"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Proposal",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d15a1cd6-f173-4f19-b126-56023ff972fc",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('On new sales call recording').item.json.body.event.recording.labels.includes('Proposal') }}",
                    "rightValue": "={{ $('On new sales call recording').item.json.body.event.recording.labels.includes('Discovery') }}"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "28a66a03-b46b-4101-9228-cdb1f0c1a137",
      "name": "提取通话信息",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        2528
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7d00c768-11f8-4e88-a72d-09f4680e6db5",
              "name": "client",
              "type": "string",
              "value": "={{ $json.body.event.recording.companies[0].name }}"
            },
            {
              "id": "899afd83-f493-4bf8-baa3-0af1357ba784",
              "name": "domain",
              "type": "string",
              "value": "={{ $json.body.event.recording.meeting.participants.find(p => p.email && p.email !== $json.body.event.recording.recorder.email)?.email.split(\"@\")[1] }}"
            },
            {
              "id": "53f353b3-8cbb-40d4-bd2f-13bf56554d7a",
              "name": "dealId",
              "type": "string",
              "value": "={{ $json.body.event.recording.crmInfo.crmDealId === undefined ? \"\" : $json.body.event.recording.crmInfo.crmDealId}}"
            },
            {
              "id": "61906ec6-d325-4e07-b05c-824a1d7e8c52",
              "name": "language",
              "type": "string",
              "value": "={{ $json.body.event.recording.transcripts[0].langIso2 === \"fr\" ? \"french\" : \"english\" }}"
            },
            {
              "id": "64575c62-a4bf-4748-854b-d31e1f9fc904",
              "name": "actionItems",
              "type": "string",
              "value": "={{ $json.body.event.recording.actionItems.join('\\n') }}"
            },
            {
              "id": "1e4964eb-11bc-40be-ae2d-acc3756f2f9c",
              "name": "keyTakeways",
              "type": "string",
              "value": "={{ $json.body.event.recording.keyTakeaways.join('\\n') }}"
            },
            {
              "id": "0594c03d-fbdb-4770-a3d7-f2793b90ac08",
              "name": "outlines",
              "type": "string",
              "value": "={{ $json.body.event.recording.outlines.join('\\n') }}"
            },
            {
              "id": "f632c9df-66ba-4b61-a3af-07a8ced06bb2",
              "name": "insights",
              "type": "string",
              "value": "={{ $json.body.event.recording.insightTemplates[0].insights[0].sections.map(section => `${section.title}:\\n${section.description}`).join('\\n\\n') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "dd22c7f0-6515-4c0e-ad2e-a84e6d3690b2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        2192
      ],
      "parameters": {
        "color": 2,
        "width": 600,
        "height": 240,
        "content": "# 模板演示文稿"
      },
      "typeVersion": 1
    },
    {
      "id": "5fc84ab3-2a83-4535-8d38-c271f87aa708",
      "name": "设置演示文稿ID",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        2240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "70365c23-d99e-4975-8359-96f81968ebf1",
              "name": "presentationId",
              "type": "string",
              "value": "1UZ0vGvHWwl1M0u_ThxJr6qLr-flIkIvCiVrg3fHPCFk"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6649d1d2-ce8b-4bb9-b473-ed0417249920",
      "name": "更新演示文稿",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2528,
        2240
      ],
      "parameters": {
        "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Duplicate presentation').item.json.id }}:batchUpdate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"requests\": [\n    {\n      \"replaceAllText\": {\n        \"containsText\": {\n          \"text\": \"$client\",\n          \"matchCase\": true\n        },\n        \"replaceText\": \"{{ $('Extract call info').item.json.client }}\"\n      }\n    },\n    {\n      \"replaceAllText\": {\n        \"containsText\": {\n          \"text\": \"$date\",\n          \"matchCase\": true\n        },\n        \"replaceText\": \"{{ new Date().toLocaleDateString('fr-FR') }}\"\n      }\n    },\n    {\n      \"replaceAllText\": {\n        \"containsText\": {\n          \"text\": \"$ambition\",\n          \"matchCase\": true\n        },\n        \"replaceText\": \"{{ $('Generate slide content').item.json.message.content.ambition }}\"\n      }\n    },\n    {\n      \"replaceAllText\": {\n        \"containsText\": {\n          \"text\": \"$challenges\",\n          \"matchCase\": true\n        },\n        \"replaceText\": \"{{ $('Format challenges').item.json.challengesFormatted }}\"\n      }\n    },\n    {\n      \"createImage\": {\n        \"url\": \"https://logo.clearbit.com/{{ $('Extract call info').item.json.domain }}\",\n        \"elementProperties\": {\n          \"pageObjectId\": \"g33acd02fb35_0_0\",\n          \"size\": {\n            \"height\": {\n              \"magnitude\": 50,\n              \"unit\": \"PT\"\n            },\n            \"width\": {\n              \"magnitude\": 100,\n              \"unit\": \"PT\"\n            }\n          },\n          \"transform\": {\n            \"scaleX\": 1,\n            \"scaleY\": 1,\n            \"translateX\": 0,\n            \"translateY\": 330,\n            \"unit\": \"PT\"\n          }\n        }\n      }\n    }\n  ]\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleSlidesOAuth2Api"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "id": "4XvUdGjZmtZF34lR",
          "name": "Google Slides account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "972a826c-781f-4fd1-92d5-ec2f53f4825d",
      "name": "新销售通话录音时",
      "type": "n8n-nodes-base.webhook",
      "position": [
        128,
        2528
      ],
      "webhookId": "f0ad896c-3d55-458b-b161-bd3d6cc4107f",
      "parameters": {
        "path": "claap-recordings",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "6dfdb4b2-5c74-41a7-9edd-8f0eba4264b5",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        2528
      ],
      "parameters": {
        "width": 320,
        "height": 120,
        "content": "如果可以根据通话类型选择多个演示文稿,可以在此处创建其他分支。您只需要提供要复制的演示文稿的ID。"
      },
      "typeVersion": 1
    },
    {
      "id": "99b44269-6d1c-441d-b597-272597b1e1c8",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        2432
      ],
      "parameters": {
        "height": 120,
        "content": "另一个选项是使用n8n内置节点,但它提供的控制较少(没有全文搜索和替换,也无法添加图像)"
      },
      "typeVersion": 1
    },
    {
      "id": "8017b6bc-f516-4668-bf0a-cd708bb76ab8",
      "name": "格式化挑战",
      "type": "n8n-nodes-base.code",
      "position": [
        1648,
        2240
      ],
      "parameters": {
        "jsCode": "return {\n  challengesFormatted: $input.first().json.message.content.challenges.join('\\\\n')\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "5aee27e9-17f0-4b0a-9b0e-e6bf0b82062b",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        3024
      ],
      "parameters": {
        "width": 200,
        "height": 120,
        "content": "此分支展示如何与CRM连接并根据CRM数据个性化演示文稿"
      },
      "typeVersion": 1
    },
    {
      "id": "357ad95c-19ce-425a-b430-2e9cac0fe0a0",
      "name": "删除错误货币幻灯片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        784,
        3040
      ],
      "parameters": {
        "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Duplicate presentation').item.json.id }}:batchUpdate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"requests\": [\n    {\n      \"deleteObject\": {\n        \"objectId\": \"{{ $json.slide_to_delete }}\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googleSlidesOAuth2Api"
      },
      "typeVersion": 4
    },
    {
      "id": "f129f806-564c-4820-a8fb-1516959ee780",
      "name": "发送给@用户",
      "type": "n8n-nodes-base.slack",
      "position": [
        2784,
        2240
      ],
      "webhookId": "1842e596-7b9f-4dc6-8331-58e7a6811afc",
      "parameters": {
        "text": "=",
        "user": {
          "__rl": true,
          "mode": "username",
          "value": "@user"
        },
        "select": "user",
        "blocksUi": "={\n  \"blocks\": [\n    {\n      \"type\": \"section\",\n      \"text\": {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*New presentation available for <https://docs.google.com/presentation/d/{{ $json.presentationId }}/edit#slide=id.g33acd02fb35_0_0|{{ $('Extract call info').item.json.client }}> 🔥*\"\n      }\n    }\n  ]\n}",
        "messageType": "block",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "id": "MFSWBbCvtN1Sk93E",
          "name": "Slack First Claapers"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "365237ff-823f-4b8c-928b-5b2bb8fc6bf7",
      "name": "如果有交易",
      "type": "n8n-nodes-base.if",
      "position": [
        128,
        3040
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "49b2504c-0426-4dda-8249-8b147db94e6a",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $('On new sales call recording').item.json.body.event.recording.deal.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "85c5809c-56f4-4648-b29e-ea4780634d75",
      "name": "获取交易信息",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        352,
        3040
      ],
      "parameters": {
        "dealId": "={{ $('On new sales call recording').item.json.body.event.recording.crmInfo.deal.id }}",
        "filters": {},
        "resource": "deal",
        "operation": "get",
        "authentication": "appToken"
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "mhuVEdo7ONjoZ1nP",
          "name": "HubSpot App Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "253e418e-1282-4da1-8bd9-f9b2e013005e",
      "name": "选择要删除的幻灯片",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        3040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d462ed0b-f883-4adf-adc9-baa7d67d632b",
              "name": "slide_to_delete",
              "type": "string",
              "value": "={{ (!$json.properties.deal_currency_code.value || $json.properties.deal_currency_code.value === 'EUR') ? 'g3417703b8a7_0_3' : 'g3026f7d6b00_0_71' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "65b78722-db75-4edc-ac9c-231cdb8e9336",
      "name": "生成幻灯片内容",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1264,
        2240
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Your are a sales expert here to assist sales professionals in crafting follow-ups based on transcripts of discovery calls. Analyze the call summary to identify the following 2 elements:\n\n# Ambition: a summary of the prospect's goals or desired outcomes.\n# Challenges: list 3 key difficulties or obstacles discussed during the call.\n\nInstructions:\n- Use simple language and remain concise.\n- Output your answer in {{ $('Extract call info').item.json.language }}.\n- Structure your answer as a JSON:\n\n{ \n  \"ambition\": \"\",\n  \"challenges\": [\"\", \"\", \"\"]\n}\n\nCall summary below (within triple quotes):\n'''\n{{ $('Extract call info').item.json.insights }}\n'''"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "E7za96D8nwfE78qQ",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "dedfb07c-b450-4101-b7eb-7ff6a40aa5f5",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        2496
      ],
      "parameters": {
        "color": 3,
        "width": 600,
        "height": 240,
        "content": "# 工作流程配置"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Get deal info": {
      "main": [
        [
          {
            "node": "Select slide to delete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract call info": {
      "main": [
        [
          {
            "node": "Select presentation template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format challenges": {
      "main": [
        [
          {
            "node": "Duplicate presentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If there is a deal": {
      "main": [
        [
          {
            "node": "Get deal info",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Set user as editor": {
      "main": [
        [
          {
            "node": "Update presentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set presentation id": {
      "main": [
        [
          {
            "node": "Generate slide content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update presentation": {
      "main": [
        [
          {
            "node": "Send to @user",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish presentation": {
      "main": [
        [
          {
            "node": "Set user as editor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Duplicate presentation": {
      "main": [
        [
          {
            "node": "Publish presentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate slide content": {
      "main": [
        [
          {
            "node": "Format challenges",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select slide to delete": {
      "main": [
        [
          {
            "node": "Delete wrong currency slide",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On new sales call recording": {
      "main": [
        [
          {
            "node": "Extract call info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select presentation template": {
      "main": [
        [
          {
            "node": "Set presentation id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 客户关系管理, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量20
分类2
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流