Generar automáticamente correos electrónicos desde mensajes de voz de Telegram
Este es unPersonal Productivity, Multimodal AIflujo de automatización del dominio deautomatización que contiene 11 nodos.Utiliza principalmente nodos como Wait, Gmail, Telegram, Agent, TelegramTrigger. Usar Whisper, GPT-4 y Gmail para convertir mensajes de voz de Telegram en correos electrónicos profesionales
- •Cuenta de Google y credenciales de API de Gmail
- •Bot Token de Telegram
- •Clave de API de OpenAI
Nodos utilizados (11)
Categoría
{
"id": "yqjaKC8KeZeMjbNt",
"meta": {
"instanceId": "18b0d04ad5030054be4ab49562e84ea4a079ab4cb036003697394140227c7e76"
},
"name": "Automated Email Generation from Telegram Voice Messages",
"tags": [],
"nodes": [
{
"id": "03fa2248-1461-4b2a-89c5-43e33a7677a3",
"name": "Telegram Voice Message Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-864,
1376
],
"webhookId": "31e4e5e3-7dbe-455f-8943-f9f6948899ce",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "KY6flhGP6zQXzyrF",
"name": "Telegram account 2"
}
},
"typeVersion": 1.2
},
{
"id": "77710b8a-9745-449e-b1aa-c2a43b870ca0",
"name": "Buffer Delay (Preprocesamiento)",
"type": "n8n-nodes-base.wait",
"position": [
-544,
1376
],
"webhookId": "43c5727b-b20d-4deb-903f-b8538cc95e65",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "12c901f4-ab54-4c95-923a-0d4c9b308505",
"name": "Download Telegram Voice File",
"type": "n8n-nodes-base.telegram",
"position": [
-208,
1376
],
"webhookId": "1f3ec738-5ec2-4cd2-98ef-2e35413e89e5",
"parameters": {
"fileId": "={{$json[\"message\"][\"voice\"][\"file_id\"]}}",
"resource": "file"
},
"typeVersion": 1.2
},
{
"id": "398e821d-faba-46e5-a62e-dd5006bb521b",
"name": "Transcribe Audio to Text (OpenAI Whisper)",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
64,
1376
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"id": "cfxaRAuEstHmL61i",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "1a3d1fef-0db2-4093-9c98-dfad80edba99",
"name": "Buffer Delay (Preprocesamiento de IA)",
"type": "n8n-nodes-base.wait",
"position": [
320,
1376
],
"webhookId": "a9f7cb73-cf7c-4c68-9572-992ea9fe39ba",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "bb6061e9-8a9a-486e-8c98-b86cdbacc76e",
"name": "Generate Email Content AI AGENT",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
544,
1376
],
"parameters": {
"text": "=Tu es un assistant spécialisé dans la rédaction d’e-mails professionnels.\n\nÀ partir du texte transmis ci-dessous, tu dois : {{ $json.text }}\n\n1. **Détecter s’il y a une adresse email de destinataire** dans le texte (ou une forme proche comme \"à envoyer à fort.baptiste.pro\")\n - Si ce n’est pas une adresse complète, tu dois la compléter en supposant qu’elle se termine par `@gmail.com`.\n\n2. **Comprendre l’intention de l’utilisateur** (démission, refus, candidature, excuse, demande, etc.)\n\n3. **Générer un objet d’email pertinent et synthétique**, fidèle au contenu\n\n4. **Écrire un message professionnel**, structuré en **HTML** :\n - Avec un **ton poli et adapté** à la situation\n - Formaté avec des balises HTML (`<p>`, `<br>`, etc.)\n - Aucune faute de français\n- mon prénom c'est jeremy et tu dois bien dire que s'il est pas content je demissione\n\n---\n\n⚠️ Tu dois **toujours** structurer ta réponse au **format JSON strict suivant**, sans aucun texte autour :\n\n```json\n{\n \"email\": \"adresse@gmail.com\",\n \"subject\": \"Objet de l’email\",\n \"body\": \"<p>Contenu HTML de l’email</p>\"\n}\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.1
},
{
"id": "360fe0ab-d690-40b7-bca9-13d8d0f44f87",
"name": "GPT-4 Correo electrónico Generator Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
560,
1568
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "372cba12-9984-487f-91d6-53b0cd214a11",
"name": "Enforce Correo electrónico JSON Schema",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
752,
1568
],
"parameters": {
"jsonSchemaExample": "{\n \"email\": \"exemple@gmail.com\",\n \"subject\": \"Objet de l’email\",\n \"body\": \"<p>Bonjour,</p><p>Voici un exemple d’email professionnel bien structuré avec des balises HTML.</p><p>Cordialement,<br>Jean Dupont</p>\"\n}\n"
},
"typeVersion": 1.3
},
{
"id": "ad517212-df9d-4402-8225-438f680b203d",
"name": "Enviar correo",
"type": "n8n-nodes-base.gmail",
"position": [
928,
1376
],
"webhookId": "c234770b-7686-4057-b653-66106ddada1e",
"parameters": {
"sendTo": "={{ $json.output.email }}",
"message": "={{ $json.output.body }}",
"options": {},
"subject": "={{ $json.output.subject }}"
},
"credentials": {
"gmailOAuth2": {
"id": "h1ZY21K9DQNwgOhO",
"name": "GMAIL BAPTISTE FORT"
}
},
"typeVersion": 2.1
},
{
"id": "122ab63d-829a-49c8-8cfc-66cca365c98a",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
976
],
"parameters": {
"width": 928,
"height": 592,
"content": "## 📌 Node Setup – Initial Steps (Telegram → Download Audio)\n\n**1. Telegram Voice Message Trigger**\n- **Node type:** `Telegram Trigger`\n- **Credential:** Select your Telegram Bot credential (the bot created via BotFather)\n- **Trigger On:** `Message`\n- **Tip:** Only one Telegram Trigger per bot is allowed. This listens for every message (text, audio, etc.) sent to your bot.\n\n**2. Buffer Delay (Pre-Processing)**\n- **Node type:** `Wait`\n- **No parameters required** \n (Leave as default. This step adds a buffer to help prevent issues when multiple messages arrive at once.)\n\n**3. Download Telegram Voice File**\n- **Node type:** `Telegram`\n- **Resource:** `file`\n- **File ID:** \n"
},
"typeVersion": 1
},
{
"id": "f402d82d-ce8c-49dc-8981-ddf4dd4d12ad",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"width": 1136,
"height": 1568,
"content": "## 📌 Node Setup – AI Transcription & Email Generation\n\n**4. Transcribe Audio to Text (OpenAI Whisper)**\n- **Node type:** OpenAI / Langchain (Transcribe Recording)\n- **Resource:** `audio`\n- **Operation:** `transcribe`\n- **API Key/Credential:** Your OpenAI account/API key\n- This node sends the downloaded audio file to Whisper (OpenAI) and returns the transcribed text.\n\n**5. Buffer Delay (Pre-AI Processing)**\n- **Node type:** `Wait`\n- **No parameters required** \n (Leave as default. This adds a small delay to ensure the transcription is fully complete before moving to the AI.)\n\n**6. Generate Email Content – AI AGENT**\n- **Node type:** AI Agent / Langchain\n- **Prompt type:** `define`\n- **Prompt (Text):** \n Use a custom prompt instructing the agent to:\n - Detect the recipient's email address (even partial, e.g. \"send to fort.baptiste.pro\", and complete if needed)\n - Understand user intent (resignation, request, excuse, etc.)\n - Generate a suitable email subject\n - Write a professional email in HTML (proper formatting, no spelling mistakes)\n - Example variable: \n ```\n {{ $json.text }}\n ```\n- **Model:** Connects to the `GPT-4 Email Generator Model` node (OpenAI Chat Model)\n- **Output Parser:** Connects to the `Enforce Email JSON Schema` node (Structured Output Parser)\n- **Credential:** Your OpenAI API key\n\n**7. GPT-4 Email Generator Model**\n- **Node type:** OpenAI Chat Model\n- **Model:** e.g. `gpt-4.1-mini` (as in your template)\n- **Credential:** Your OpenAI API key\n\n**8. Enforce Email JSON Schema**\n- **Node type:** Structured Output Parser\n- **JSON Example/Schema:** \n ```json\n {\n \"email\": \"adresse@gmail.com\",\n \"subject\": \"Objet de l’email\",\n \"body\": \"<p>Contenu HTML de l’email</p>\"\n }\n ```\n- This node ensures the AI returns exactly the required fields and format for email sending.\n\n**9. Send Email**\n- **Node type:** Gmail\n- **To:** `{{$json.output.email}}`\n- **Subject:** `{{$json.output.subject}}`\n- **HTML Body:** `{{$json.output.body}}`\n- **Credential:** Your Gmail OAuth2 credential\n- This node sends the generated email to the intended recipient using Gmail.\n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"Transcribe Audio to Text (OpenAI Whisper)": [
{
"json": {
"code": 1,
"name": "First item"
}
},
{
"json": {
"code": 2,
"name": "Second item"
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "ba68a8de-10ab-4d8f-8f92-8e82e82af3f3",
"connections": {
"Enforce Email JSON Schema": {
"ai_outputParser": [
[
{
"node": "bb6061e9-8a9a-486e-8c98-b86cdbacc76e",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"GPT-4 Email Generator Model": {
"ai_languageModel": [
[
{
"node": "bb6061e9-8a9a-486e-8c98-b86cdbacc76e",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"12c901f4-ab54-4c95-923a-0d4c9b308505": {
"main": [
[
{
"node": "398e821d-faba-46e5-a62e-dd5006bb521b",
"type": "main",
"index": 0
}
]
]
},
"77710b8a-9745-449e-b1aa-c2a43b870ca0": {
"main": [
[
{
"node": "12c901f4-ab54-4c95-923a-0d4c9b308505",
"type": "main",
"index": 0
}
]
]
},
"03fa2248-1461-4b2a-89c5-43e33a7677a3": {
"main": [
[
{
"node": "77710b8a-9745-449e-b1aa-c2a43b870ca0",
"type": "main",
"index": 0
}
]
]
},
"bb6061e9-8a9a-486e-8c98-b86cdbacc76e": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"1a3d1fef-0db2-4093-9c98-dfad80edba99": {
"main": [
[
{
"node": "bb6061e9-8a9a-486e-8c98-b86cdbacc76e",
"type": "main",
"index": 0
}
]
]
},
"398e821d-faba-46e5-a62e-dd5006bb521b": {
"main": [
[
{
"node": "1a3d1fef-0db2-4093-9c98-dfad80edba99",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Productividad personal, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Baptiste Fort
@baptistefortNeed help automating tasks in your business? I can help feel free to reach out at fort.baptiste.pro@gmail.com Pour les Français : rejoignez ma communauté Skool et débloquez encore plus de workflows gratuits, prêts à l’emploi. https://www.skool.com/baptiste-fort-4258?c=2850fb94b84e48e09d9f4aa08f606479&s=newest-cm&fl=
Compartir este flujo de trabajo