Transcription audio - n8n Creator (template)

Avancé

Ceci est unDocument Extraction, Multimodal AIworkflow d'automatisation du domainecontenant 22 nœuds.Utilise principalement des nœuds comme If, Set, Switch, Telegram, HttpRequest. Transcription audio avec Telegram et Groq Whisper

Prérequis
  • Token Bot Telegram
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "BN02jX48DXzgyJFd",
  "meta": {
    "instanceId": "733e9abfd67f4f2666a76557fe5d7598ae7705aa1e6ff21081cb972137b3c8b4",
    "templateCredsSetupCompleted": true
  },
  "name": "Audio Transcript - n8n Creator (Template)",
  "tags": [
    {
      "id": "K8YLAjjyi0ToB8gy",
      "name": "playground",
      "createdAt": "2025-10-09T12:08:34.847Z",
      "updatedAt": "2025-10-09T12:08:34.847Z"
    }
  ],
  "nodes": [
    {
      "id": "ddd06891-12f5-4227-81cd-03fd55b864fe",
      "name": "Telegram: Recevoir le message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -864,
        48
      ],
      "webhookId": "823f9309-3b41-4ed6-995f-cf5b657970ee",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {
          "chatIds": "8464412504"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "s9JmQ5AGImJ32oBQ",
          "name": "abhiman1bot - Telegram"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fb897823-f7ef-4400-9e43-cf2b25b1c6c8",
      "name": "Switch (Vérifier le type de message)",
      "type": "n8n-nodes-base.switch",
      "position": [
        -432,
        32
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "audio",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "da43a983-aec8-424c-956d-a4f335ec3639",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.audio.file_id }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "voice",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b5b7d9ac-0a1a-4b65-bde4-8ab98ca2d8f4",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.voice.file_id }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "error",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "68cd3161-3841-402d-8df7-6b5e0aa062e0",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "2ff93d32-9942-47d4-9500-91fb50a62d9d",
      "name": "Telegram: Message type non supporté",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -448,
        320
      ],
      "webhookId": "b0f48834-4a46-4378-9f52-ab563c2ccc8d",
      "parameters": {
        "text": "Yo! I only take audio😅, drop a audio message instead!",
        "chatId": "={{ $('Telegram: Receive Message').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "s9JmQ5AGImJ32oBQ",
          "name": "abhiman1bot - Telegram"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ed090526-76d4-417d-9e2b-9eb5a1043192",
      "name": "Set Node (type audio)",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        -48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ed1a6e35-7378-4907-be8d-70946ffd0326",
              "name": "fileid",
              "type": "string",
              "value": "={{ $('Telegram: Receive Message').item.json.message.audio.file_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "60c0e970-e175-481d-9cd4-d50a83ae67f6",
      "name": "Set Node (type vocal)",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ed1a6e35-7378-4907-be8d-70946ffd0326",
              "name": "fileid",
              "type": "string",
              "value": "={{ $('Telegram: Receive Message').item.json.message.voice.file_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4a1dd34d-aadd-4b4a-be92-1090529d111c",
      "name": "Telegram: Télécharger le fichier audio",
      "type": "n8n-nodes-base.telegram",
      "position": [
        400,
        32
      ],
      "webhookId": "b4d5787b-b958-4d86-b0bb-98b5f6703dba",
      "parameters": {
        "fileId": "={{ $json.fileid }}",
        "download": false,
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "s9JmQ5AGImJ32oBQ",
          "name": "abhiman1bot - Telegram"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1f20c4c9-fea0-4bc0-b424-1bb04813f40d",
      "name": "HTTP - Transcrire l'audio (Groq)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        32
      ],
      "parameters": {
        "url": "https://api.groq.com/openai/v1/audio/transcriptions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "=https://api.telegram.org/file/bot{{ $('Set Credentials (Groq + Telegram)').item.json.Telegram_access_token }}/{{ $('Telegram: Download Audio File').item.json.result.file_path }}"
            },
            {
              "name": "model",
              "value": "whisper-large-v3"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set Credentials (Groq + Telegram)').item.json.Groq_API }}"
            },
            {
              "name": "Content-Type",
              "value": "multipart/form-data"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "af9c037a-6b23-4570-b71b-3f1cb24b31fd",
      "name": "Set Credentials (Groq + Telegram)",
      "type": "n8n-nodes-base.set",
      "position": [
        848,
        32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "51f14a4d-3941-40f1-8990-f339f975fbe6",
              "name": "Groq_API",
              "type": "string",
              "value": "YOUR_GROQ_API_KEY"
            },
            {
              "id": "4359c1e6-d3e9-4456-8dca-da0162c54942",
              "name": "Telegram_access_token",
              "type": "string",
              "value": "YOUR_TELEGRAM_BOT_ACCESS_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c8c763af-dd67-448c-8d2c-cb6add5a1419",
      "name": "Telegram: Envoyer les options de sortie",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1488,
        32
      ],
      "webhookId": "d26b66fd-68ef-48a8-889c-4961108c02a7",
      "parameters": {
        "chatId": "={{ $('Telegram: Receive Message').item.json.message.chat.id }}",
        "message": "=Which format do you want? 👇",
        "options": {
          "appendAttribution": false
        },
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double",
            "approveLabel": "Text message",
            "disapproveLabel": "Text file"
          }
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "s9JmQ5AGImJ32oBQ",
          "name": "abhiman1bot - Telegram"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "77cda3ba-1c15-4c59-88a5-6f29bece5df9",
      "name": "If: Type de sortie sélectionné",
      "type": "n8n-nodes-base.if",
      "position": [
        1696,
        32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9d302e0c-44e2-4b9e-a3ed-8d21e67945ed",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9346c0a9-6f5e-4f01-b156-ef0945b85bed",
      "name": "Telegram: Envoyer le message de transcription",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2048,
        -240
      ],
      "webhookId": "c27aae61-d82e-4bd5-ba6e-89d4fad05dc6",
      "parameters": {
        "text": "={{ $('HTTP - Transcribe Audio (Groq)').item.json.text }}",
        "chatId": "={{ $('Telegram: Receive Message').item.json.message.from.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "s9JmQ5AGImJ32oBQ",
          "name": "abhiman1bot - Telegram"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "95e83cb8-1db4-46c7-ab23-288bba951bf4",
      "name": "Set: Texte audio transcrit",
      "type": "n8n-nodes-base.set",
      "position": [
        2224,
        256
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "20342409-f694-48b6-a09d-3607fed653ed",
              "name": "text",
              "type": "string",
              "value": "={{ $('HTTP - Transcribe Audio (Groq)').item.json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e74b6a79-5e27-4f36-962d-cda423db241e",
      "name": "Convertir en fichier TXT",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2432,
        256
      ],
      "parameters": {
        "options": {
          "fileName": "transcription.txt"
        },
        "operation": "toText",
        "sourceProperty": "text",
        "binaryPropertyName": "=transcription"
      },
      "typeVersion": 1.1
    },
    {
      "id": "cfa6abb9-e7ec-4c13-beec-18bf88f9977f",
      "name": "Envoyer le fichier de transcription",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2640,
        256
      ],
      "webhookId": "3eeca011-cdd1-457b-ba1d-8806dfa0e5d2",
      "parameters": {
        "chatId": "={{ $('Telegram: Receive Message').item.json.message.from.id }}",
        "operation": "sendDocument",
        "binaryData": true,
        "additionalFields": {},
        "binaryPropertyName": "transcription"
      },
      "credentials": {
        "telegramApi": {
          "id": "s9JmQ5AGImJ32oBQ",
          "name": "abhiman1bot - Telegram"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a65deb4c-a125-4ca2-9966-bf9c4f8fcb73",
      "name": "Note autocollante",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 432,
        "content": "# Telegram Trigger\n\n- Triggers workflow when a message is received in your Telegram bot.\n- Setup:\n  1. Create a bot via BotFather.\n  2. Add bot token in this node.\n  3. Choose event type (Message or Command)."
      },
      "typeVersion": 1
    },
    {
      "id": "f3f96946-1b21-4e3e-a973-84aba1c22f8f",
      "name": "Note autocollante 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -288
      ],
      "parameters": {
        "color": 5,
        "width": 752,
        "height": 816,
        "content": "# Audio/Voice Switch\n\n- Checks if the incoming Telegram message is an audio file or a voice message.  \n- If valid, sets the file ID for further processing.  \n- If the message is not audio/voice:\n  - Sends a \"Wrong file type. Please send an audio or voice message.\" notification back to the user via Telegram.  \n  - Stops the workflow immediately to prevent further execution.  \n- Routes messages based on type for downstream nodes."
      },
      "typeVersion": 1
    },
    {
      "id": "1433aed5-6a96-47b3-84a1-88c76c743f34",
      "name": "Note autocollante 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -176
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 416,
        "content": "# Telegram Download\n\n- Downloads the audio/voice file from Telegram using the file ID.  \n- Outputs the **file path** for use in downstream nodes."
      },
      "typeVersion": 1
    },
    {
      "id": "1911d9ab-b858-4dd3-a40e-9cc9bc3e4ee1",
      "name": "Note autocollante 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -512
      ],
      "parameters": {
        "color": 5,
        "width": 608,
        "height": 736,
        "content": "# Set & HTTP Nodes for Transcription\n\n- **Purpose:** Prepares credentials and transcribes audio using OpenAI Whisper via Groq API.  \n\n### Set Node\n- Contains fields for your credentials:  \n  - `Groq_API` → Enter your **Groq API key** (can be created for free at [Groq Console](https://console.groq.com/keys)).  \n  - `Telegram_access_token` → Enter your **Telegram bot token**.  \n- Both fields are **mandatory** for this automation to work.  \n- Ensures downstream nodes have the necessary authentication to access Telegram and Groq API.\n\n### HTTP Node\n- Sends the audio file to the **Groq API** for transcription using the OpenAI Whisper model.  \n- Uses credentials set in the Set node (`Groq_API`) for authorization.  \n- Outputs the transcribed text for further processing in the workflow.  \n\n> ⚠️ **Important:** Without entering the Telegram access token and the Groq API key in the Set node, the workflow will **not function**."
      },
      "typeVersion": 1
    },
    {
      "id": "1dc3c2c2-fdff-4454-9b9c-eedfcda542bf",
      "name": "Note autocollante 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        -256
      ],
      "parameters": {
        "color": 5,
        "width": 448,
        "height": 496,
        "content": "# Telegram Reply Option & Switch\n\n- Lets user choose how to receive the transcription:  \n  - As a **Telegram message**  \n  - As a **.txt file**  \n- Switch node routes workflow into two branches based on the selected option."
      },
      "typeVersion": 1
    },
    {
      "id": "26477433-02a0-4651-98b6-c1f96a522889",
      "name": "Note autocollante 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        -480
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 448,
        "content": "# Telegram Send Message\n\n- Sends the transcribed text directly to the user as a Telegram message.  \n- Triggered when the user chooses the **message** option in the previous switch node."
      },
      "typeVersion": 1
    },
    {
      "id": "2e97dee2-0493-4be7-af26-aacf5dd50418",
      "name": "Note autocollante 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        16
      ],
      "parameters": {
        "color": 5,
        "width": 736,
        "height": 448,
        "content": "# Set, Convert & Send Transcript as File\n\n- **Set Node:** Stores the transcribed text in a field.  \n- **Convert to File Node:** Converts the text field into a `.txt` file.  \n- **Telegram Send Document Node:** Sends the `.txt` file to the user.  \n- Triggered when the user chooses the **.txt file** option in the switch node."
      },
      "typeVersion": 1
    },
    {
      "id": "897b05e5-b03c-43e7-a4d5-4a8fe3418517",
      "name": "Note autocollante 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -320
      ],
      "parameters": {
        "color": 3,
        "width": 704,
        "height": 736,
        "content": "# Description\nTranscribe Telegram voice/audio to text using Groq's OpenAI-compatible Whisper endpoint, then return the transcript either as a Telegram message or as a `.txt` file.\n\n## How it works (brief)\n1. **Telegram Trigger** — receives incoming message.  \n2. **Switch (Audio/Voice)** — if `voice` or `audio` → set `file_id`; else send \"Wrong file type\" and stop.  \n3. **Telegram Download** — download audio using `file_id`, output **file path/binary**.  \n4. **Set Node (credentials)** — **must** set `Groq_API` and `Telegram_access_token` fields for the workflow to work.  \n5. **HTTP Node → Groq (Whisper)** — POST audio (multipart) to Groq’s transcription endpoint; get text.  \n6. **Reply Switch** — choose **message** or **.txt file**.  \n   - **Message branch:** Telegram Send Message → sends transcript text.  \n   - **File branch:** Set transcript → Convert to `.txt` → Telegram Send Document → sends file.\n\n## Requirements\n- n8n instance with internet access  \n- Telegram bot token (BotFather)  \n- Groq API key (https://console.groq.com/keys)  \n\n## Notes / Security\n- Enter `Groq_API` and `Telegram_access_token` in the **Set** node (or n8n Credentials).  \n- Do **not** hardcode keys in public nodes.  \n- Workflow stops after sending \"Wrong file type\" when incoming message is not audio/voice."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8f44217a-1e75-4f99-b539-164737cf6451",
  "connections": {
    "e74b6a79-5e27-4f36-962d-cda423db241e": {
      "main": [
        [
          {
            "node": "cfa6abb9-e7ec-4c13-beec-18bf88f9977f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ed090526-76d4-417d-9e2b-9eb5a1043192": {
      "main": [
        [
          {
            "node": "4a1dd34d-aadd-4b4a-be92-1090529d111c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "60c0e970-e175-481d-9cd4-d50a83ae67f6": {
      "main": [
        [
          {
            "node": "4a1dd34d-aadd-4b4a-be92-1090529d111c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "77cda3ba-1c15-4c59-88a5-6f29bece5df9": {
      "main": [
        [
          {
            "node": "9346c0a9-6f5e-4f01-b156-ef0945b85bed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "95e83cb8-1db4-46c7-ab23-288bba951bf4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ddd06891-12f5-4227-81cd-03fd55b864fe": {
      "main": [
        [
          {
            "node": "fb897823-f7ef-4400-9e43-cf2b25b1c6c8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "95e83cb8-1db4-46c7-ab23-288bba951bf4": {
      "main": [
        [
          {
            "node": "e74b6a79-5e27-4f36-962d-cda423db241e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fb897823-f7ef-4400-9e43-cf2b25b1c6c8": {
      "main": [
        [
          {
            "node": "ed090526-76d4-417d-9e2b-9eb5a1043192",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "60c0e970-e175-481d-9cd4-d50a83ae67f6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "2ff93d32-9942-47d4-9500-91fb50a62d9d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a1dd34d-aadd-4b4a-be92-1090529d111c": {
      "main": [
        [
          {
            "node": "af9c037a-6b23-4570-b71b-3f1cb24b31fd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c8c763af-dd67-448c-8d2c-cb6add5a1419": {
      "main": [
        [
          {
            "node": "77cda3ba-1c15-4c59-88a5-6f29bece5df9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1f20c4c9-fea0-4bc0-b424-1bb04813f40d": {
      "main": [
        [
          {
            "node": "c8c763af-dd67-448c-8d2c-cb6add5a1419",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "af9c037a-6b23-4570-b71b-3f1cb24b31fd": {
      "main": [
        [
          {
            "node": "1f20c4c9-fea0-4bc0-b424-1bb04813f40d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Extraction de documents, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds22
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Abhiman

Abhiman

@abhimangs

Automation consultant helping creators and small teams streamline their workflows using Notion and n8n. I build systems that save time, boost productivity, and keep everything running smoothly. Check my LinkedIn to connect or collaborate on custom automations.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34