8
n8n 中文网amn8n.com

潜在客户资格语音代理

高级

这是一个自动化工作流,包含 20 个节点。主要使用 If, Set, Code, Gmail, Merge 等节点。 使用OpenAI GPT、Twilio、Elevenlabs和Gmail的自动化潜在客户资格认证语音代理

前置要求
  • Google 账号和 Gmail API 凭证
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "o6QHC3fXUypkp711",
  "meta": {
    "instanceId": "4a43422fbb4436cfced0de07eb5d2d01eaa8cc03a01c4252706b959813bd56df",
    "templateCredsSetupCompleted": true
  },
  "name": "潜在客户资格语音代理",
  "tags": [],
  "nodes": [
    {
      "id": "36381180-1a71-435f-ba1d-8c2d64ec53a6",
      "name": "Google Sheets触发器",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -208,
        -144
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1245574619,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit#gid=1245574619",
          "cachedResultName": "Form Responses 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit?usp=drivesdk",
          "cachedResultName": "Lead Qualification Voice Agent Demo v1 (Responses)"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "l7TGsnvKBCe8ZyIv",
          "name": "Jainik's Personal Drive"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "206d9715-ee90-4a40-8f1e-ddc5978674bf",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -192,
        224
      ],
      "webhookId": "030f0967-0d16-43db-aa72-ad2d5909f945",
      "parameters": {
        "path": "030f0967-0d16-43db-aa72-ad2d5909f945",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "8ca3c8e3-55a1-4785-8619-74e6cb1722ff",
      "name": "响应 Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        832,
        224
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={\n  \"type\": \"conversation_initiation_client_data\",\n  \"dynamic_variables\": {\n    \"voiceopener\": \"{{ $json.choices[0].message.content['Voice Opener'] }}\"\n  }\n}\n"
      },
      "typeVersion": 1.4
    },
    {
      "id": "f2d03e6c-a85f-4a11-9bf4-d1a57cfbccf8",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -208,
        624
      ],
      "webhookId": "37e8d818-8265-43e9-803e-00119da5f3cb",
      "parameters": {
        "path": "37e8d818-8265-43e9-803e-00119da5f3cb",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "7ef04ab0-ee54-4ff7-b23b-178b1519a33e",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        16,
        624
      ],
      "parameters": {
        "jsCode": "// Get the webhook data from the input\nconst webhookData = $input.item.json;\n\n// Access the transcript array\nconst transcript = webhookData.body.data.transcript;\n\n// Format the transcript into a clean string\nconst formattedTranscript = transcript.map(entry => {\n  // Capitalize the role for better readability\n  const role = entry.role.charAt(0).toUpperCase() + entry.role.slice(1);\n  return `${role}: ${entry.message}`;\n}).join('\\n'); // Join each line with a newline\n\n// Return the formatted transcript\nreturn {\n  json: {\n    clean_transcript: formattedTranscript\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "7dde1ba5-34f2-44ec-b244-2c93aec36b57",
      "name": "向模型发送消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        240,
        624
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "={{ $json.clean_transcript }}"
            },
            {
              "role": "system",
              "content": "=You are an expert AI assistant specializing in analyzing sales call transcripts for \"ThinkSpire,\" a custom AI agency. You will be given the full transcript of a conversation between an AI agent named Sarah and a potential client.\n\nYour task is to carefully read the transcript and extract the key information. You MUST respond ONLY with a valid JSON object and nothing else. Do not include any introductory text, backticks, or explanations.\n\nThe JSON object must have the following structure:\n\n{\n  \"callSummary\": \"A concise, one-paragraph summary of the entire conversation, written in the third person.\",\n  \"leadStatus\": \"Analyze the conversation and classify the lead's status. Must be one of the following strings: 'Qualified', 'Not Qualified', 'Follow-up'. 'Qualified' means they explicitly agreed to a follow-up call. 'Not Qualified' means they explicitly said no or were a bad fit. 'Follow-up' means the call was inconclusive or they asked for more information via email first.\",\n  \"projectDetails\": \"Summarize the core requirements and features of the AI solution the client wants to build.\",\n  \"budget\": \"Extract the client's stated budget. Must be one of the following strings: '< INR 50k', 'INR 50k - INR 200k', 'INR 200k - INR 500k', 'INR 500k+', or 'Not Mentioned'.\",\n  \"timeline\": \"Extract the client's stated timeline. Must be one of the following strings: 'ASAP', '1-3 weeks', '3-6 weeks', '6+ weeks', or 'Not Mentioned'.\",\n  \"painPoints\": \"List the key business problems or pain points the client mentioned they are trying to solve.\"\n}"
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "2gSkA1G9KkvWNtlt",
          "name": "OpenAI N8N"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "f24c1e5f-8b7d-4d36-bead-5a24841bd1f1",
      "name": "条件判断",
      "type": "n8n-nodes-base.if",
      "position": [
        592,
        768
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1526b36e-0225-48b5-9839-71b4f4a2e017",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.choices[0].message.content.leadStatus }}",
              "rightValue": "Qualified"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7e85f631-f7c9-48b1-a215-d1780d4a2628",
      "name": "获取工作表中的行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        736
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $('Webhook1').item.json.body.data.conversation_initiation_client_data.dynamic_variables.system__called_number }}",
              "lookupColumn": "Phone Number (Please enter + country code)"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1245574619,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit#gid=1245574619",
          "cachedResultName": "Form Responses 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit?usp=drivesdk",
          "cachedResultName": "Lead Qualification Voice Agent Demo v1 (Responses)"
        },
        "combineFilters": "OR"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "5roORN1u47v6N6tf",
          "name": "Jainik's Personal"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "f03074cd-cb71-455e-a58e-93df49da4f84",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        592,
        528
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f90161bd-2afe-472c-bb45-22b2da435bb9",
              "name": "country_code",
              "type": "string",
              "value": "={{$('Webhook1').item.json.body.data.metadata.phone_call.external_number.match(/^\\+(\\d{1,2})/)[1]}}"
            },
            {
              "id": "fe128657-11d8-457f-b31e-27806ae3ab3f",
              "name": "phone_number",
              "type": "string",
              "value": "={{$('Webhook1').item.json.body.data.metadata.phone_call.external_number.replace(/^\\+\\d{1,2}/, '')}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ec82a8cd-ade2-4692-a04d-6e945e3d4d32",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        832,
        736
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "f6990d40-3847-4fbb-98ac-9226dbe93707",
      "name": "向模型发送消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        512,
        224
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Hi  {{ $json['First Name'] }}, your request: {{ $json['Service Request'] }}"
            },
            {
              "role": "system",
              "content": "=Your name is Anika. You work with Thinkspire AI. You are an expert in following up with potential leads.\n\nWrite a friendly, yet concise, outbound call opener using the lead’s {{ $json['First Name'] }} and referencing their requested service: {{ $json['Service Request'] }} . Make sure the sentence is grammatically correct.\n\nLabel the output as \"Voice Opener\""
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "2gSkA1G9KkvWNtlt",
          "name": "OpenAI N8N"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "3238a22e-782e-408a-b494-606177ff4652",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        128
      ],
      "parameters": {
        "width": 1296,
        "height": 288,
        "content": "## 2. 获取客户数据 ##"
      },
      "typeVersion": 1
    },
    {
      "id": "43db9c00-5e99-4648-ac9f-d00090ebc270",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        480
      ],
      "parameters": {
        "color": 4,
        "width": 1728,
        "height": 464,
        "content": "## 3. 外呼处理 ##"
      },
      "typeVersion": 1
    },
    {
      "id": "55b994a2-d9af-42c1-a1e8-ae65de7430bf",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 272,
        "content": "## 1. 发起呼叫 ##"
      },
      "typeVersion": 1
    },
    {
      "id": "6319684e-a732-4643-8840-21ff133caa29",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        48,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e726c247-bf1a-451a-910c-49beee3fe548",
              "name": "country_code",
              "type": "string",
              "value": "={{$json.body.called_number.match(/^\\+(\\d{1,2})/)[1]}}"
            },
            {
              "id": "058cde1e-76ba-4dee-9da8-141e154f6a8c",
              "name": "phone_number",
              "type": "string",
              "value": "={{$json.body.called_number.replace(/^\\+\\d{1,2}/, '')}}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4,
      "alwaysOutputData": true
    },
    {
      "id": "757c530d-0864-4ad9-8b0d-44d8c9817fb2",
      "name": "更新呼叫数据",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        528
      ],
      "parameters": {
        "columns": {
          "value": {
            "Budget": "={{ $('Message a model').item.json.choices[0].message.content.budget }}",
            "Timeline": "={{ $('Message a model').item.json.choices[0].message.content.timeline }}",
            "Transcript": "={{ $('Webhook1').item.json.body.data.analysis.transcript_summary }}",
            "Lead status": "={{ $('Message a model').item.json.choices[0].message.content.leadStatus }}",
            "Call summary": "={{ $('Message a model').item.json.choices[0].message.content.callSummary }}",
            "Phone Number (Please enter + country code)": "={{ $('Webhook1').item.json.body.data.conversation_initiation_client_data.dynamic_variables.system__called_number }}"
          },
          "schema": [
            {
              "id": "Timestamp",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Number (Please enter + country code)",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Phone Number (Please enter + country code)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Service Request",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Service Request",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Budget",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Budget",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Timeline",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Timeline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Call summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Call summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Lead status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Lead status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Transcript",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Voice opener",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Voice opener",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Modified At",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Modified At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Phone Number (Please enter + country code)"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1245574619,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit#gid=1245574619",
          "cachedResultName": "Form Responses 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit?usp=drivesdk",
          "cachedResultName": "Lead Qualification Voice Agent Demo v1 (Responses)"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "5roORN1u47v6N6tf",
          "name": "Jainik's Personal"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "b7277703-20a6-4360-9499-dd09d6cc4bdb",
      "name": "查找客户数据",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        288,
        224
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.body.called_number }}",
              "lookupColumn": "Phone Number (Please enter + country code)"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1245574619,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit#gid=1245574619",
          "cachedResultName": "Form Responses 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VxAAFch57KhXmRpgClLpklDeB4naAqr8LrLoBd3SiWw/edit?usp=drivesdk",
          "cachedResultName": "Lead Qualification Voice Agent Demo v1 (Responses)"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "5roORN1u47v6N6tf",
          "name": "Jainik's Personal"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "81bc117a-acfb-485d-9ebe-2fd4b6e60361",
      "name": "发送日程安排请求",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1264,
        736
      ],
      "webhookId": "2ae2636b-48c1-49bd-9aac-8fb23ba202a7",
      "parameters": {
        "sendTo": "={{ $json.Email }}",
        "message": "=Hi {{ $json['First Name']}},\n\nIt was great talking to you, below is our meeting calendar - https://calendar.app.google/Zs7VjMjbwWeaPvAH7 \n\nJust click the link, pick a time that works best for you, and we will see you in the meeting!\n",
        "options": {
          "appendAttribution": false
        },
        "subject": "Thinkspire Meeting",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "UMHWeEqEByzmGxuh",
          "name": "Jainik's Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "832bf94b-659e-4c74-8367-aba68c34a167",
      "name": "外呼",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        16,
        -144
      ],
      "parameters": {
        "url": "https://api.elevenlabs.io/v1/convai/twilio/outbound-call",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "agent_id",
              "value": "agent_0501k5kszqfxe65byc7m2ebkg498"
            },
            {
              "name": "agent_phone_number_id",
              "value": "phnum_1201k5ksx9cmehgah78rf8es27jf"
            },
            {
              "name": "to_number",
              "value": "={{ $json[\"Phone Number (Please enter + country code)\"] }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "twilioApi": {
          "id": "bp37NwTMs8XC5Zrf",
          "name": "Jainik's Twilio account"
        },
        "httpHeaderAuth": {
          "id": "VaEVCw0VjHTzTgZP",
          "name": "Jainik's Personal 11Labs"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6c4960da-78fc-4119-b281-7bed1c16f9b4",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -432
      ],
      "parameters": {
        "color": 3,
        "width": 832,
        "height": 1760,
        "content": "## 这是什么?"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "Webhook1": [
      {
        "json": {
          "body": {
            "data": {
              "status": "done",
              "user_id": null,
              "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
              "analysis": {
                "call_successful": "success",
                "call_summary_title": "Automate Appointment Booking Inquiry",
                "transcript_summary": "Thinkspire AI's Sarah contacted John regarding his interest in automating appointment booking. John wants to automate bookings and increase them, with a budget of 1 lakh rupees and a 2-week timeline. Sarah proposed a discovery session with an AI strategist and will send a calendar link to schedule it. John agreed.\n",
                "data_collection_results": {},
                "evaluation_criteria_results": {}
              },
              "metadata": {
                "cost": 1285,
                "error": null,
                "charging": {
                  "tier": "free",
                  "is_burst": false,
                  "llm_price": 0.0007876000000000001,
                  "llm_usage": {
                    "initiated_generation": {
                      "model_usage": {
                        "gemini-2.0-flash-001": {
                          "input": {
                            "price": 0.0006964,
                            "tokens": 6964
                          },
                          "output_total": {
                            "price": 0.00009120000000000001,
                            "tokens": 228
                          },
                          "input_cache_read": {
                            "price": 0,
                            "tokens": 0
                          },
                          "input_cache_write": {
                            "price": 0,
                            "tokens": 0
                          }
                        }
                      }
                    },
                    "irreversible_generation": {
                      "model_usage": {
                        "gemini-2.0-flash-001": {
                          "input": {
                            "price": 0.0005844,
                            "tokens": 5844
                          },
                          "output_total": {
                            "price": 0.00008400000000000001,
                            "tokens": 210
                          },
                          "input_cache_read": {
                            "price": 0,
                            "tokens": 0
                          },
                          "input_cache_write": {
                            "price": 0,
                            "tokens": 0
                          }
                        }
                      }
                    }
                  },
                  "llm_charge": 8,
                  "call_charge": 1277,
                  "dev_discount": false,
                  "free_minutes_consumed": 0,
                  "free_llm_dollars_consumed": 0
                },
                "feedback": {
                  "likes": 0,
                  "dislikes": 0,
                  "overall_score": null
                },
                "timezone": null,
                "rag_usage": null,
                "text_only": false,
                "batch_call": null,
                "phone_call": {
                  "type": "twilio",
                  "call_sid": "CA54c75fabc12cea508b6459ac812cfdcd",
                  "direction": "outbound",
                  "stream_sid": "MZ4078e9ed8d961b06f1fb0845619b55ca",
                  "agent_number": "+18787866860",
                  "external_number": "+919833046559",
                  "phone_number_id": "phnum_1201k5ksx9cmehgah78rf8es27jf"
                },
                "initiator_id": null,
                "main_language": "en",
                "features_usage": {
                  "workflow": {
                    "enabled": false,
                    "tool_node": {
                      "used": false,
                      "enabled": false
                    }
                  },
                  "dtmf_tones": {
                    "used": false,
                    "enabled": false
                  },
                  "is_livekit": false,
                  "multivoice": {
                    "used": false,
                    "enabled": false
                  },
                  "agent_testing": {
                    "enabled": false,
                    "tests_ran_in_last_7_days": false,
                    "tests_ran_after_last_modification": false
                  },
                  "pii_zrm_agent": false,
                  "pii_zrm_workspace": false,
                  "transfer_to_agent": {
                    "used": false,
                    "enabled": false
                  },
                  "language_detection": {
                    "used": false,
                    "enabled": false
                  },
                  "transfer_to_number": {
                    "used": false,
                    "enabled": false
                  },
                  "voicemail_detection": {
                    "used": false,
                    "enabled": false
                  },
                  "external_mcp_servers": {
                    "used": false,
                    "enabled": false
                  },
                  "tool_dynamic_variable_updates": {
                    "used": false,
                    "enabled": false
                  }
                },
                "eleven_assistant": {
                  "is_eleven_assistant": false
                },
                "deletion_settings": {
                  "delete_audio": false,
                  "deletion_time_unix_secs": null,
                  "delete_transcript_and_pii": false,
                  "deleted_logs_at_time_unix_secs": null,
                  "deleted_audio_at_time_unix_secs": null,
                  "deleted_transcript_at_time_unix_secs": null
                },
                "call_duration_secs": 115,
                "termination_reason": "Call ended by remote party",
                "authorization_method": "signed_url",
                "start_time_unix_secs": 1759756324,
                "accepted_time_unix_secs": 1759756324,
                "conversation_initiation_source": "twilio",
                "conversation_initiation_source_version": null
              },
              "transcript": [
                {
                  "role": "agent",
                  "message": "Hi John, this is Sarah from Thinkspire AI. I noticed you requested information about automating appointment booking, and I’m here to help you with that!",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": {
                    "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                    "workflow_node_id": null
                  },
                  "original_message": null,
                  "time_in_call_secs": 1,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_tts_service_ttfb": {
                        "elapsed_time": 0.5635368379880674
                      }
                    }
                  }
                },
                {
                  "role": "user",
                  "message": "Hi, so yeah how can you help me with that?",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": "audio",
                  "agent_metadata": null,
                  "original_message": null,
                  "time_in_call_secs": 14,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_asr_trailing_service_latency": {
                        "elapsed_time": 0.12325029399653431
                      }
                    }
                  }
                },
                {
                  "role": "agent",
                  "message": "Great, thank you. To make sure we fully understand your vision, I just have three quick questions... First, could you tell me a little more about the core problem you're hoping to solve with this AI agent? What does a successful outcome look like for your business?\n",
                  "feedback": null,
                  "llm_usage": {
                    "model_usage": {
                      "gemini-2.0-flash-001": {
                        "input": {
                          "price": 0.0001055,
                          "tokens": 1055
                        },
                        "output_total": {
                          "price": 0.000022800000000000002,
                          "tokens": 57
                        },
                        "input_cache_read": {
                          "price": 0,
                          "tokens": 0
                        },
                        "input_cache_write": {
                          "price": 0,
                          "tokens": 0
                        }
                      }
                    }
                  },
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": {
                    "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                    "workflow_node_id": null
                  },
                  "original_message": null,
                  "time_in_call_secs": 18,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_llm_service_ttfb": {
                        "elapsed_time": 0.3215819909964921
                      },
                      "convai_tts_service_ttfb": {
                        "elapsed_time": 0.19393545400816947
                      },
                      "convai_llm_service_ttf_sentence": {
                        "elapsed_time": 0.4416125149873551
                      },
                      "convai_llm_service_tt_last_sentence": {
                        "elapsed_time": 0.6158950379904127
                      }
                    }
                  }
                },
                {
                  "role": "user",
                  "message": "So I want to make sure that my appointments are booked automatically and I can increase my appointment bookings.",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": "audio",
                  "agent_metadata": null,
                  "original_message": null,
                  "time_in_call_secs": 40,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_asr_trailing_service_latency": {
                        "elapsed_time": 0.22823749399685767
                      }
                    }
                  }
                },
                {
                  "role": "agent",
                  "message": "Thank you, that's helpful. And to help us scope the project correctly, do you have a rough budget range in mind? It's perfectly fine if it's just an estimate.\n",
                  "feedback": null,
                  "llm_usage": {
                    "model_usage": {
                      "gemini-2.0-flash-001": {
                        "input": {
                          "price": 0.0001132,
                          "tokens": 1132
                        },
                        "output_total": {
                          "price": 0.000016400000000000002,
                          "tokens": 41
                        },
                        "input_cache_read": {
                          "price": 0,
                          "tokens": 0
                        },
                        "input_cache_write": {
                          "price": 0,
                          "tokens": 0
                        }
                      }
                    }
                  },
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": {
                    "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                    "workflow_node_id": null
                  },
                  "original_message": null,
                  "time_in_call_secs": 49,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_llm_service_ttfb": {
                        "elapsed_time": 0.45740470799501054
                      },
                      "convai_tts_service_ttfb": {
                        "elapsed_time": 0.21295881099649705
                      },
                      "convai_llm_service_ttf_sentence": {
                        "elapsed_time": 0.5848784309928305
                      },
                      "convai_llm_service_tt_last_sentence": {
                        "elapsed_time": 0.7382965579890879
                      }
                    }
                  }
                },
                {
                  "role": "user",
                  "message": "I'm thinking say around 1 lakh rupees.",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": "audio",
                  "agent_metadata": null,
                  "original_message": null,
                  "time_in_call_secs": 61,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_asr_trailing_service_latency": {
                        "elapsed_time": 0.1772567540028831
                      }
                    }
                  }
                },
                {
                  "role": "agent",
                  "message": "And finally, what is your ideal timeline for getting a solution like this implemented?\n",
                  "feedback": null,
                  "llm_usage": {
                    "model_usage": {
                      "gemini-2.0-flash-001": {
                        "input": {
                          "price": 0.0001184,
                          "tokens": 1184
                        },
                        "output_total": {
                          "price": 0.000006800000000000001,
                          "tokens": 17
                        },
                        "input_cache_read": {
                          "price": 0,
                          "tokens": 0
                        },
                        "input_cache_write": {
                          "price": 0,
                          "tokens": 0
                        }
                      }
                    }
                  },
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": {
                    "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                    "workflow_node_id": null
                  },
                  "original_message": null,
                  "time_in_call_secs": 67,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_llm_service_ttfb": {
                        "elapsed_time": 0.3226360460103024
                      },
                      "convai_tts_service_ttfb": {
                        "elapsed_time": 0.3127467209997121
                      },
                      "convai_llm_service_ttf_sentence": {
                        "elapsed_time": 0.43684441500226967
                      },
                      "convai_llm_service_tt_last_sentence": {
                        "elapsed_time": 0.4368247920065187
                      }
                    }
                  }
                },
                {
                  "role": "user",
                  "message": "Say 2 weeks.",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": "audio",
                  "agent_metadata": null,
                  "original_message": null,
                  "time_in_call_secs": 76,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_asr_trailing_service_latency": {
                        "elapsed_time": 0.12408081999456044
                      }
                    }
                  }
                },
                {
                  "role": "agent",
                  "message": "Thank you, that's all incredibly helpful. Based on what you've described, this is DEFINITELY the kind of project our team excels at. The next step would be a complimentary discovery session with one of our lead AI strategists... Would you be open to scheduling that?\n",
                  "feedback": null,
                  "llm_usage": {
                    "model_usage": {
                      "gemini-2.0-flash-001": {
                        "input": {
                          "price": 0.0001206,
                          "tokens": 1206
                        },
                        "output_total": {
                          "price": 0.0000236,
                          "tokens": 59
                        },
                        "input_cache_read": {
                          "price": 0,
                          "tokens": 0
                        },
                        "input_cache_write": {
                          "price": 0,
                          "tokens": 0
                        }
                      }
                    }
                  },
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": {
                    "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                    "workflow_node_id": null
                  },
                  "original_message": null,
                  "time_in_call_secs": 79,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_llm_service_ttfb": {
                        "elapsed_time": 0.38657523899746593
                      },
                      "convai_tts_service_ttfb": {
                        "elapsed_time": 0.20987241200054996
                      },
                      "convai_llm_service_ttf_sentence": {
                        "elapsed_time": 0.4594701989990426
                      },
                      "convai_llm_service_tt_last_sentence": {
                        "elapsed_time": 0.637054448001436
                      }
                    }
                  }
                },
                {
                  "role": "user",
                  "message": "Yes!",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": "audio",
                  "agent_metadata": null,
                  "original_message": null,
                  "time_in_call_secs": 100,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_asr_trailing_service_latency": {
                        "elapsed_time": 0.12549964401114266
                      }
                    }
                  }
                },
                {
                  "role": "agent",
                  "message": "PERFECT. I'll send a calendar link to your email so you can pick a time that works best. We're looking forward to digging into this with you!\n",
                  "feedback": null,
                  "llm_usage": {
                    "model_usage": {
                      "gemini-2.0-flash-001": {
                        "input": {
                          "price": 0.0001267,
                          "tokens": 1267
                        },
                        "output_total": {
                          "price": 0.000014400000000000001,
                          "tokens": 36
                        },
                        "input_cache_read": {
                          "price": 0,
                          "tokens": 0
                        },
                        "input_cache_write": {
                          "price": 0,
                          "tokens": 0
                        }
                      }
                    }
                  },
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": {
                    "agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                    "workflow_node_id": null
                  },
                  "original_message": null,
                  "time_in_call_secs": 101,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": {
                    "metrics": {
                      "convai_llm_service_ttfb": {
                        "elapsed_time": 0.32276430199272
                      },
                      "convai_tts_service_ttfb": {
                        "elapsed_time": 0.1420015589974355
                      },
                      "convai_llm_service_ttf_sentence": {
                        "elapsed_time": 0.3504939279955579
                      },
                      "convai_llm_service_tt_last_sentence": {
                        "elapsed_time": 0.4730485329928342
                      }
                    }
                  }
                },
                {
                  "role": "user",
                  "message": "Alright, thank you",
                  "feedback": null,
                  "llm_usage": null,
                  "tool_calls": [],
                  "interrupted": false,
                  "llm_override": null,
                  "tool_results": [],
                  "source_medium": null,
                  "agent_metadata": null,
                  "original_message": null,
                  "time_in_call_secs": 111,
                  "multivoice_message": null,
                  "rag_retrieval_info": null,
                  "conversation_turn_metrics": null
                }
              ],
              "conversation_id": "conv_1201k6wtcpzre27tv3ncknecfvqq",
              "conversation_initiation_client_data": {
                "user_id": null,
                "source_info": {
                  "source": null,
                  "version": null
                },
                "dynamic_variables": {
                  "voiceopener": "Hi John, this is Sarah from Thinkspire AI. I noticed you requested information about automating appointment booking, and I’m here to help you with that!",
                  "system__time": "Monday, 13:13 06 October 2025",
                  "system__agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                  "system__call_sid": "CA54c75fabc12cea508b6459ac812cfdcd",
                  "system__time_utc": "2025-10-06T13:13:59.048631+00:00",
                  "system__timezone": null,
                  "system__caller_id": "+18787866860",
                  "system__called_number": "+919833046559",
                  "system__conversation_id": "conv_1201k6wtcpzre27tv3ncknecfvqq",
                  "system__current_agent_id": "agent_0501k5kszqfxe65byc7m2ebkg498",
                  "system__call_duration_secs": 115
                },
                "custom_llm_extra_body": {},
                "conversation_config_override": {
                  "tts": null,
                  "agent": null,
                  "conversation": null
                }
              }
            },
            "type": "post_call_transcription",
            "event_timestamp": 1759756444
          },
          "query": {},
          "params": {},
          "headers": {
            "host": "thinkspire.app.n8n.cloud",
            "accept": "*/*",
            "cf-ray": "98a56b7183b9f851-ORD",
            "cdn-loop": "cloudflare; loops=1; subreqs=1",
            "cf-ew-via": "15",
            "cf-worker": "n8n.cloud",
            "x-real-ip": "34.59.11.47",
            "cf-visitor": "{\"scheme\":\"https\"}",
            "user-agent": "ElevenLabs/1.0",
            "cf-ipcountry": "US",
            "content-type": "application/json",
            "x-is-trusted": "yes",
            "content-length": "13329",
            "accept-encoding": "gzip, br",
            "x-forwarded-for": "34.59.11.47, 172.70.130.205",
            "cf-connecting-ip": "34.59.11.47",
            "x-forwarded-host": "thinkspire.app.n8n.cloud",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https",
            "x-forwarded-server": "traefik-prod-users-gwc-27-56cf765df-nxh6x",
            "elevenlabs-signature": "t=1759756444,v0=01820bd4dc1f5313cf70a9cc6e79be54778365cd800326a105683c8589ada606"
          },
          "webhookUrl": "https://thinkspire.app.n8n.cloud/webhook/37e8d818-8265-43e9-803e-00119da5f3cb",
          "executionMode": "production"
        }
      }
    ]
  },
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "53e78dbd-0186-4da5-9db1-28782b50b717",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Update Call Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Look up Customer Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          },
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model1": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "Send Schedule Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Outbound Call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Look up Customer Data": {
      "main": [
        [
          {
            "node": "Message a model1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级

需要付费吗?

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

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

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

作者
Jainik Sheth

Jainik Sheth

@jainik

👋 Hey, I’m Jainik, a Product & AI Consultant who loves building smart automations and AI workflows that actually make life easier. I help businesses and individuals use n8n + AI to save time, scale faster, and get real results. Always up for a chat or collab, let’s build something awesome together!

外部链接
在 n8n.io 查看

分享此工作流