{
  "id": "WHO9KFGwh8Km3BhP",
  "name": "Transcribe Telegram Voice Messages with Palatine Speech",
  "tags": [],
  "nodes": [
    {
      "id": "8844f61f-35a7-4c62-92e2-f8d8f223c8a0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -1088
      ],
      "parameters": {
        "width": 892,
        "height": 791,
        "content": "## Transcribe Telegram Voice Messages with Palatine Speech\n\n**Who's it for:** Anyone who would rather send a voice note to their Telegram bot than type.\n\nTranscribes Telegram voice messages to text and replies with the transcript (text messages are echoed back).\n\n### How it works\n1. Telegram Trigger receives a new message\n2. Switch routes voice vs. text\n3. Download the voice file from Telegram\n4. Palatine Speech transcribes the audio\n5. Bot replies with the transcript\n\n### Setup\n1. Install `n8n-nodes-palatine-speech` in **Settings \u2192 Community Nodes**.\n2. Add credentials: Telegram Bot API \u00b7 Palatine Speech API.\n3. Set the folder / chat / database IDs on the trigger and destination nodes.\n4. Activate the workflow.\n\n### Customization\n- Reply with an AI summary instead of the raw transcript\n- Log every transcript to Google Sheets\n- Restrict the bot to specific chat IDs\n\n**Requirements:** Telegram Bot API \u00b7 Palatine Speech API\n\n_Uses the community node **Palatine Speech** (`n8n-nodes-palatine-speech`). Install it from the nodes panel: press **+**, search `Palatine`, open the node and click **Install node**._"
      },
      "typeVersion": 1
    },
    {
      "id": "545eea56-5596-4381-8235-0380fc42fef7",
      "name": "Section 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 712,
        "height": 472,
        "content": "## 1. Receive the audio\nTrigger and fetch the file that needs transcribing."
      },
      "typeVersion": 1
    },
    {
      "id": "dcbc5f87-eee8-4fa2-8874-c82311ffab5c",
      "name": "Section 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 280,
        "content": "## 2. Process with Palatine Speech"
      },
      "typeVersion": 1
    },
    {
      "id": "11db6b00-c941-4c4a-b54e-5440feef19a6",
      "name": "Section 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -208
      ],
      "parameters": {
        "color": 7,
        "height": 280,
        "content": "## 3. Deliver the result"
      },
      "typeVersion": 1
    },
    {
      "id": "2e81ae7d-1719-4308-a951-cddfcf1d9da1",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -416,
        0
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "74140a35-d67d-46e8-bae6-4c7e6d514fbb",
      "name": "Voice or Text?",
      "type": "n8n-nodes-base.switch",
      "position": [
        -192,
        0
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Voice",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "voice-cond",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.voice?.file_id }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "text-cond",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "9a9990e9-e7c9-4587-afe8-bd5371350353",
      "name": "Download Voice File",
      "type": "n8n-nodes-base.telegram",
      "position": [
        32,
        -96
      ],
      "parameters": {
        "fileId": "={{ $json.message.voice.file_id }}",
        "resource": "file",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b1589e51-3ce5-4c9b-81b2-45ce812980b4",
      "name": "Echo Text Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        32,
        96
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b379e9d1-288f-45bd-bd7b-c9a8007620b3",
      "name": "Palatine Speech Transcription",
      "type": "n8n-nodes-palatine-speech.palatineSpeech",
      "position": [
        256,
        -96
      ],
      "parameters": {
        "model": "palatine_large_highspeed",
        "polling": {},
        "requestOptions": {}
      },
      "credentials": {
        "palatineSpeechNodeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "d3a31744-c455-4059-93fe-d15f85d7ff40",
      "name": "Send Transcription Reply",
      "type": "n8n-nodes-base.telegram",
      "position": [
        480,
        -96
      ],
      "parameters": {
        "text": "={{ $json.transcription }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": true,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "3946a75e-8c24-4881-940c-eb74a04bd8c9",
  "nodeGroups": [],
  "connections": {
    "Voice or Text?": {
      "main": [
        [
          {
            "node": "Download Voice File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Echo Text Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Voice or Text?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Voice File": {
      "main": [
        [
          {
            "node": "Palatine Speech Transcription",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Palatine Speech Transcription": {
      "main": [
        [
          {
            "node": "Send Transcription Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}