{
  "id": "b5pgfYnFyn0bY6iI",
  "name": "Automatic Call & Voicemail Transcription",
  "tags": [],
  "nodes": [
    {
      "id": "50c1e725-7eac-4bf5-9b0a-766d60e5b272",
      "name": "Twilio Trigger",
      "type": "n8n-nodes-base.twilioTrigger",
      "position": [
        128,
        -112
      ],
      "parameters": {
        "updates": [
          "com.twilio.voice.insights.call-summary.complete"
        ]
      },
      "typeVersion": 1
    },
    {
      "id": "79b82a00-302e-436b-b815-fd21265a64e7",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        752,
        128
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "46270483-b4e2-45ce-b34e-07bd5196ddb9",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1104,
        -112
      ],
      "parameters": {
        "text": "=A new call from {{ $('Twilio Trigger').item.json.From }}\n\\n \\n\nSummary: {{ $json.output }}",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U02CS8VM15J",
          "cachedResultName": "zainkhan"
        },
        "select": "user",
        "otherOptions": {}
      },
      "typeVersion": 2.3
    },
    {
      "id": "84c1af60-a1b6-405d-92ee-27a95205554d",
      "name": "Create an opportunity",
      "type": "n8n-nodes-base.highLevel",
      "position": [
        1312,
        -112
      ],
      "parameters": {
        "name": "=A new call from:  {{ $('Twilio Trigger').item.json.From }}, summary: {{ $('Call Summary AI Agent').item.json.output }}",
        "resource": "opportunity",
        "requestOptions": {},
        "additionalFields": {}
      },
      "typeVersion": 2
    },
    {
      "id": "c7ec8f81-01ae-4583-9aa0-5a0de235e01a",
      "name": "Download recording",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        336,
        -112
      ],
      "parameters": {
        "url": "={{ $json.RecordingUrl }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "twilioApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "4a658a4e-6ba5-41a0-80cc-f273caf3861f",
      "name": "Transcribe recording",
      "type": "n8n-nodes-smallestai.smallestai",
      "position": [
        544,
        -112
      ],
      "parameters": {
        "resource": "stt",
        "additionalOptions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "d17394fd-3d53-4a52-b066-c597ed8f5500",
      "name": "Call Summary AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        752,
        -112
      ],
      "parameters": {
        "text": "=Caller: {{ $('Twilio Trigger').item.json.From }}\nDuration: {{ $('Twilio Trigger').item.json.RecordingDuration }}\n\nTranscript:\n{{ $json.transcription ?? '' }}",
        "options": {
          "systemMessage": "You are a sales/support call assistant. From the transcript, return: (1) a 2-3 sentence summary, (2) overall caller sentiment (positive / neutral / negative), and (3) the single best suggested next step. Keep it short and skimmable."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "3d3bdaa4-d90e-48ac-b9bc-e1d5186eb9d8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -176
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 480,
        "content": "## AI Intelligence Layer\n"
      },
      "typeVersion": 1
    },
    {
      "id": "530f8ae6-9be1-4b1a-b8be-a1e23a9754f8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -176
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 272,
        "content": "## Fetch & Transcribe Media\n"
      },
      "typeVersion": 1
    },
    {
      "id": "15c5db6d-fd30-4175-b69b-6097e7d5a9e6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -288
      ],
      "parameters": {
        "width": 528,
        "height": 656,
        "content": "## Automatic Call & Voicemail Transcription\n\n### How it works\nThis workflow automatically streamlines inbound call management by tracking finished call recordings from Twilio. It downloads the raw audio binary file, routes it through Smallest.ai to generate high-accuracy transcripts, and passes the text to an AI Agent powered by Google Gemini.\n\n### Setup steps\n* Connect your **Twilio** account credentials in the Trigger and HTTP Request download nodes.\n* Connect your **Smallest.ai** API credentials inside the transcription node.\n* Authenticate your **Google Gemini** configuration within the LangChain Chat Model node.\n* Link your target **Slack** and **GoHighLevel** credentials to ensure delivery of notifications and pipeline entry creations.\n\n### Customization\nModify the system prompt inside the **Call Summary AI Agent** if you want to alter the strict data extraction format or require different structured data properties (like extracting pricing quotes, feature requests, or routing urgency tags)."
      },
      "typeVersion": 1
    },
    {
      "id": "fbb56b0d-235e-4592-9fe0-fce95a504651",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -176
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 256,
        "content": "## CRM & Team Alerting\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "d10a83e3-cbbb-4442-8650-da0043f7bd42",
  "nodeGroups": [],
  "connections": {
    "Send a message": {
      "main": [
        [
          {
            "node": "Create an opportunity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Twilio Trigger": {
      "main": [
        [
          {
            "node": "Download recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download recording": {
      "main": [
        [
          {
            "node": "Transcribe recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe recording": {
      "main": [
        [
          {
            "node": "Call Summary AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Summary AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Call Summary AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}