AI 音声通話ボット - OpenAI GPT-4o + ElevenLabs + Twilio インテグレーション

中級

これはSupport Chatbot, AI Chatbot分野の自動化ワークフローで、10個のノードを含みます。主にIf, OpenAi, Webhook, ElevenLabs, HttpRequestなどのノードを使用。 GPT-4o、ElevenLabs、およびTwilioを使用してマルチ言語音声通話ボットを作成

前提条件
  • OpenAI API Key
  • HTTP Webhookエンドポイント(n8nが自動生成)
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "ai-voice-calling-bot",
  "meta": {
    "instanceId": "12345abcde67890fghij",
    "templateCredsSetupCompleted": true
  },
  "name": "AI Voice Calling Bot - OpenAI GPT-4o + ElevenLabs + Twilio Integration",
  "tags": [
    {
      "id": "ai-voice-bot",
      "name": "AI Voice Bot",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z"
    }
  ],
  "nodes": [
    {
      "id": "webhook-start",
      "name": "Twilio Voice Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        240,
        300
      ],
      "webhookId": "voice-webhook-start",
      "parameters": {
        "path": "voice-webhook",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1
    },
    {
      "id": "check-speech-input",
      "name": "音声入力チェック",
      "type": "n8n-nodes-base.if",
      "position": [
        460,
        300
      ],
      "parameters": {
        "conditions": {
          "options": {
            "leftValue": "={{ $json.SpeechResult }}",
            "operation": "exists",
            "caseSensitive": true
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "openai-gpt",
      "name": "OpenAI GPT-4o応答生成",
      "type": "n8n-nodes-base.openAi",
      "position": [
        680,
        200
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {
          "maxTokens": 150,
          "temperature": 0.7
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a helpful AI assistant for a service business. You can help customers:\n1. Schedule appointments (collect name, phone, preferred date/time, service type)\n2. Order pizza (collect size, toppings, address, phone)\n3. Book other services (collect relevant details)\n\nAlways be polite, concise, and gather necessary information step by step. Keep responses under 100 words for voice calls. End with a clear question or next step."
            },
            {
              "role": "user",
              "content": "={{ $json.SpeechResult || 'Hello, how can I help you today?' }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "openai-creds",
          "name": "OpenAI API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "elevenlabs-tts",
      "name": "ElevenLabs 音声合成",
      "type": "n8n-nodes-base.elevenLabs",
      "position": [
        900,
        200
      ],
      "parameters": {
        "text": "={{ $json.choices[0].message.content }}",
        "model_id": "eleven_monolingual_v1",
        "voice_id": "21m00Tcm4TlvDq8ikWAM",
        "voice_settings": {
          "style": 0,
          "stability": 0.75,
          "similarity_boost": 0.75,
          "use_speaker_boost": true
        }
      },
      "credentials": {
        "elevenLabsApi": {
          "id": "elevenlabs-creds",
          "name": "ElevenLabs API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "upload-audio",
      "name": "音声ファイル保存",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        200
      ],
      "parameters": {
        "operation": "upload",
        "additionalFields": {
          "fileName": "response.mp3",
          "contentType": "audio/mpeg"
        },
        "binaryPropertyName": "data"
      },
      "typeVersion": 3
    },
    {
      "id": "twilio-response",
      "name": "Twilio TwiML応答",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1340,
        200
      ],
      "parameters": {
        "twiml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n  <Play>{{ $json.audio_url }}</Play>\n  <Gather input=\"speech\" timeout=\"10\" speechTimeout=\"auto\" action=\"{{ $node.webhook.getWebhookUrl() }}\" method=\"POST\">\n    <Say voice=\"alice\">Please speak after the tone.</Say>\n  </Gather>\n  <Say voice=\"alice\">I didn't hear anything. Goodbye!</Say>\n  <Hangup/>\n</Response>"
      },
      "typeVersion": 1
    },
    {
      "id": "initial-greeting",
      "name": "初期挨拶",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        680,
        400
      ],
      "parameters": {
        "twiml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n  <Say voice=\"alice\">Hello! I'm your AI assistant. I can help you schedule appointments, order pizza, or book services. How can I help you today?</Say>\n  <Gather input=\"speech\" timeout=\"10\" speechTimeout=\"auto\" action=\"{{ $node['Twilio Voice Webhook'].getWebhookUrl() }}\" method=\"POST\">\n    <Say voice=\"alice\">Please speak after the tone.</Say>\n  </Gather>\n  <Say voice=\"alice\">I didn't hear anything. Please call back. Goodbye!</Say>\n  <Hangup/>\n</Response>"
      },
      "typeVersion": 1
    },
    {
      "id": "log-conversation",
      "name": "会話ログ記録",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        900,
        400
      ],
      "parameters": {
        "columns": {
          "value": {
            "call_sid": "={{ $json.CallSid }}",
            "caller_id": "={{ $json.From }}",
            "timestamp": "={{ $now }}",
            "ai_response": "={{ $json.choices[0].message.content }}",
            "speech_input": "={{ $json.SpeechResult }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": "Call_Logs",
        "documentId": "your-google-sheet-id"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "google-sheets-creds",
          "name": "Google Sheets"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "check-appointment",
      "name": "予約確認",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        400
      ],
      "parameters": {
        "conditions": {
          "options": {
            "leftValue": "={{ $json.choices[0].message.content.toLowerCase() }}",
            "operation": "contains",
            "rightValue": "appointment",
            "caseSensitive": false
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "save-appointment",
      "name": "予約リクエスト保存",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1340,
        500
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "pending",
            "call_sid": "={{ $json.CallSid }}",
            "caller_id": "={{ $json.From }}",
            "timestamp": "={{ $now }}",
            "request_details": "={{ $json.SpeechResult }}"
          },
          "mappingMode": "defineBelow"
        },
        "operation": "append",
        "sheetName": "Appointments",
        "documentId": "your-appointments-sheet-id"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "google-sheets-creds",
          "name": "Google Sheets"
        }
      },
      "typeVersion": 3
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1",
  "connections": {
    "log-conversation": {
      "main": [
        [
          {
            "node": "check-appointment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check-speech-input": {
      "main": [
        [
          {
            "node": "openai-gpt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "initial-greeting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "webhook-start": {
      "main": [
        [
          {
            "node": "check-speech-input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check-appointment": {
      "main": [
        [
          {
            "node": "save-appointment",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "openai-gpt": {
      "main": [
        [
          {
            "node": "elevenlabs-tts",
            "type": "main",
            "index": 0
          },
          {
            "node": "log-conversation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload-audio": {
      "main": [
        [
          {
            "node": "twilio-response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "elevenlabs-tts": {
      "main": [
        [
          {
            "node": "upload-audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - サポートチャットボット, AIチャットボット

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

高度なSEO、Core Web Vitals、チャットボット自動化実装
GPT-4 コンサルタント、PageSpeed Insights、Slack アラートを使って SEO パフォーマンスを監査しモニタリング
If
Set
Cron
+
If
Set
Cron
22 ノードCandra Reza
市場調査
航空公司のFAQボット
GPT-4と質問分類を使った航空会社カスタマーサポートの自動化
If
Code
Merge
+
If
Code
Merge
27 ノードOneclick AI Squad
サポートチャットボット
WhatsApp AI アシスタントとGoogleドキュメント、Gemini を使って顧客サポートを自動化
WhatsApp AIアシスタントとGoogleドキュメント、Geminiを使って顧客サポートを自動化
If
Code
Webhook
+
If
Code
Webhook
14 ノードJamot
サポートチャットボット
マルチチャンネルDHLステータスボット
Webフォームおよびメール照会に対応する自動化DHLパッケージ追跡ボット
If
Code
Gmail
+
If
Code
Gmail
15 ノードYusuke Yamamoto
サポートチャットボット
AIを活用した会話型旅行予約ツール:飛行機とホテルの予約を自動化
対話型旅行予約システム:GPT-3.5 を使用した航空券とホテルの自動予約
Code
Open Ai
Switch
+
Code
Open Ai
Switch
21 ノードOneclick AI Squad
サポートチャットボット
AI駆動の食品注文処理システム、Facebook Messenger、Googleスプレッドシート、カレンダーとの統合
AI駆動の食品注文処理システム、Facebook Messenger、Googleスプレッドシート、カレンダーとの統合
If
Code
Webhook
+
If
Code
Webhook
26 ノードHans Wilhelm Radam
リードナーチャリング
ワークフロー情報
難易度
中級
ノード数10
カテゴリー2
ノードタイプ7
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者

Several years of Experience in AI, LLMs, Robotics, Electronics. I create N8N templates which are open-source and free!!

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34