Generador de correos con IA con selección de tono

Intermedio

Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 15 nodos.Utiliza principalmente nodos como Set, Code, Form, FormTrigger, Agent. Usar OpenAI GPT para generar correos electrónicos profesionales con tono personalizado

Requisitos previos
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "zQkM15rEmD23HAeW",
  "meta": {
    "instanceId": "8e5c0196cd9c25c3b614ccc37109266dd4ae7fef2aa858eab9011bdc62218bf1",
    "templateCredsSetupCompleted": true
  },
  "name": "AI Email Generator with Tone Selection",
  "tags": [
    {
      "id": "sBLDO4c3ubWvhiSj",
      "name": "n8n creator",
      "createdAt": "2025-09-30T20:55:34.201Z",
      "updatedAt": "2025-09-30T20:55:34.201Z"
    }
  ],
  "nodes": [
    {
      "id": "a7d25cbb-f1f1-451c-bb89-7dcfaa5f8915",
      "name": "Formulario del Generador de Correos",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        416,
        288
      ],
      "webhookId": "email-gen-form",
      "parameters": {
        "options": {},
        "formTitle": "AI Email Generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Recipient Name",
              "requiredField": true
            },
            {
              "fieldLabel": "Email Subject",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Email Context",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Tone",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Professional"
                  },
                  {
                    "option": "Friendly"
                  },
                  {
                    "option": "Formal"
                  },
                  {
                    "option": "Casual"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Generate professional emails with your chosen tone"
      },
      "typeVersion": 2.2
    },
    {
      "id": "336e7273-30ca-4800-a8b2-01eaadaa0e32",
      "name": "Extraer Datos del Formulario",
      "type": "n8n-nodes-base.set",
      "position": [
        640,
        288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "recipient-field",
              "name": "recipient",
              "type": "string",
              "value": "={{ $json['Recipient Name'] }}"
            },
            {
              "id": "subject-field",
              "name": "subject",
              "type": "string",
              "value": "={{ $json['Email Subject'] }}"
            },
            {
              "id": "context-field",
              "name": "context",
              "type": "string",
              "value": "={{ $json['Email Context'] }}"
            },
            {
              "id": "tone-field",
              "name": "tone",
              "type": "string",
              "value": "={{ $json['Tone'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "fd094524-76b1-45cd-ac72-402aefc39ff9",
      "name": "Construir Prompt de IA",
      "type": "n8n-nodes-base.code",
      "position": [
        864,
        288
      ],
      "parameters": {
        "jsCode": "const recipient = $input.item.json.recipient;\nconst subject = $input.item.json.subject;\nconst context = $input.item.json.context;\nconst tone = $input.item.json.tone.toLowerCase();\n\nlet toneInstructions = '';\n\nswitch(tone) {\n  case 'professional':\n    toneInstructions = 'Use a professional, business-appropriate tone. Be clear, concise, and respectful. Maintain a balance between friendliness and formality.';\n    break;\n  case 'friendly':\n    toneInstructions = 'Use a warm, friendly tone while remaining appropriate. Be conversational and approachable, but maintain professionalism.';\n    break;\n  case 'formal':\n    toneInstructions = 'Use a highly formal, diplomatic tone. Use proper salutations and maintain strict formality throughout. Be respectful and courteous.';\n    break;\n  case 'casual':\n    toneInstructions = 'Use a casual, relaxed tone. Be conversational and natural, as if writing to a colleague or friend.';\n    break;\n  default:\n    toneInstructions = `Use a ${tone} tone.`;\n}\n\nconst prompt = `Write a complete email with the following details:\n\nRecipient: ${recipient}\nSubject: ${subject}\nContext: ${context}\n\nTone Instructions: ${toneInstructions}\n\nFormat the email properly with:\n- An appropriate greeting\n- A clear body that addresses the context\n- A professional closing\n- Do not include a signature line (the user will add their own)\n\nWrite only the email content, nothing else.`;\n\nreturn {\n  json: {\n    prompt: prompt,\n    recipient: recipient,\n    subject: subject,\n    tone: tone\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "a34dcc52-0851-406d-8197-e47458bba309",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1072,
        496
      ],
      "parameters": {
        "model": "gpt-3.5-turbo",
        "options": {
          "maxTokens": 500,
          "temperature": 0.7
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "N0CW82ghPMjVVpjB",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cffb3447-a441-4c94-9eb4-bdada01d4124",
      "name": "Generar Correo Electrónico",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1104,
        288
      ],
      "parameters": {
        "text": "={{ $json.prompt }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "e35fba09-e164-4333-9caa-5928f0f028dc",
      "name": "Formatear Salida",
      "type": "n8n-nodes-base.set",
      "position": [
        1408,
        288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "email-body",
              "name": "email_body",
              "type": "string",
              "value": "={{ $json.output }}"
            },
            {
              "id": "email-subject",
              "name": "subject",
              "type": "string",
              "value": "={{ $('Extract Form Data').item.json.subject }}"
            },
            {
              "id": "email-tone",
              "name": "tone",
              "type": "string",
              "value": "={{ $('Extract Form Data').item.json.tone }}"
            },
            {
              "id": "email-recipient",
              "name": "recipient",
              "type": "string",
              "value": "={{ $('Extract Form Data').item.json.recipient }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7b0de931-82fa-46f6-aaa2-565c41bfceb5",
      "name": "Mostrar Correo Generado",
      "type": "n8n-nodes-base.form",
      "position": [
        1632,
        288
      ],
      "webhookId": "email-completion",
      "parameters": {
        "options": {},
        "operation": "completion",
        "completionTitle": "✅ Email Generated Successfully!",
        "completionMessage": "=**Subject:** {{ $json.subject }}\n\n**Tone:** {{ $json.tone }}\n\n**Recipient:** {{ $json.recipient }}\n\n---\n\n{{ $json.email_body }}\n\n---\n\n*Copy the email above and add your signature before sending.*"
      },
      "typeVersion": 1
    },
    {
      "id": "c5bc8234-00b1-4af0-a2e4-f6b9a547aaf0",
      "name": "Descripción Principal",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 844,
        "height": 1033,
        "content": "![5min Logo](https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=175,q=95/d9573nnb9LioR05g/logo_tr-Yleq6B4J5WtDk64q.png)\n\n## AI Email Generator with Tone Selection\n**Made by [Biznova](https://www.biznova.tech/en)**\n **on [Tiktok](https://www.tiktok.com/@biznova_tech)**\n\n\n\n### 📧 What This Does\nThis workflow creates a professional email generator that allows users to:\n- Choose from multiple tones (Professional, Friendly, Formal, Casual)\n- Input recipient details, subject, and context\n- Generate a complete, well-formatted email using AI\n\n### 👥 Who's It For\n- Business professionals who need to write emails quickly\n- Customer support teams responding to inquiries\n- Sales teams crafting outreach messages\n- Anyone who wants help writing professional emails\n\n### 🎯 How It Works\n1. User fills out a form with email details and selects a tone\n2. The workflow processes the input and creates an AI prompt\n3. OpenAI generates a complete email based on the tone\n4. The formatted email is displayed for the user to copy\n\n### ⚙️ Setup Requirements\n- OpenAI API key (get one at https://platform.openai.com)\n- n8n instance (cloud or self-hosted)\n\n### 🚀 How to Use\n1. Set up your OpenAI credentials in the \"OpenAI Chat Model\" node\n2. Activate the workflow\n3. Share the form URL with users\n4. Users fill out the form and receive a generated email instantly"
      },
      "typeVersion": 1
    },
    {
      "id": "daec94b3-1af5-4305-baca-75a2b05bdc34",
      "name": "Instrucciones de Configuración",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        512
      ],
      "parameters": {
        "color": 4,
        "width": 396,
        "height": 457,
        "content": "### 🔧 Setup Steps\n\n**1. OpenAI API Key**\n   - Go to https://platform.openai.com/api-keys\n   - Create a new API key\n   - Add it to the \"OpenAI Chat Model\" node credentials\n\n**2. Customize Tones (Optional)**\n   - Edit the \"Build AI Prompt\" node\n   - Modify the tone instructions to match your needs\n   - Add new tones to the form dropdown\n\n**3. Adjust AI Settings (Optional)**\n   - In \"OpenAI Chat Model\" node:\n   - Change model (gpt-4 for better quality)\n   - Adjust temperature (0.5-0.9)\n   - Modify max tokens for longer/shorter emails\n\n**4. Test the Workflow**\n   - Click \"Test workflow\" button\n   - Fill out the form\n   - Check the generated email\n\n**5. Share the Form**\n   - Activate the workflow\n   - Copy the form URL\n   - Share with your team or customers"
      },
      "typeVersion": 1
    },
    {
      "id": "fc3da369-ac70-420d-bcf4-aca4c1eb9b6d",
      "name": "Paso 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 218,
        "height": 98,
        "content": "**Step 1:** User Input\nForm collects email details and tone preference"
      },
      "typeVersion": 1
    },
    {
      "id": "fa8e49fc-63bc-4df2-8d11-0124509d233a",
      "name": "Paso 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 218,
        "height": 98,
        "content": "**Step 2:** Extract & Organize\nPrepare data for AI processing"
      },
      "typeVersion": 1
    },
    {
      "id": "7574b96c-cff4-42c9-a128-bf82a9b971d0",
      "name": "Paso 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 218,
        "height": 98,
        "content": "**Step 3:** Build Prompt\nCreate AI instructions based on selected tone"
      },
      "typeVersion": 1
    },
    {
      "id": "2c9c5651-cb91-447a-9b27-5d2cf72142d0",
      "name": "Paso 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 218,
        "height": 98,
        "content": "**Step 4:** AI Generation\nOpenAI creates the email content"
      },
      "typeVersion": 1
    },
    {
      "id": "1c68f2f6-f826-4798-9ffe-64653475122f",
      "name": "Paso 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 258,
        "height": 98,
        "content": "**Step 5:** Format & Display\nShow the generated email to the user"
      },
      "typeVersion": 1
    },
    {
      "id": "8992c076-cc45-48f4-af4c-494622cb72cc",
      "name": "API Key Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        624
      ],
      "parameters": {
        "color": 3,
        "height": 80,
        "content": "⚙️ **Configure Your API Key Here**\nAdd your OpenAI credentials"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a7bf2666-fe9a-4709-87d6-e6f8874f169f",
  "connections": {
    "e35fba09-e164-4333-9caa-5928f0f028dc": {
      "main": [
        [
          {
            "node": "7b0de931-82fa-46f6-aaa2-565c41bfceb5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cffb3447-a441-4c94-9eb4-bdada01d4124": {
      "main": [
        [
          {
            "node": "e35fba09-e164-4333-9caa-5928f0f028dc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fd094524-76b1-45cd-ac72-402aefc39ff9": {
      "main": [
        [
          {
            "node": "cffb3447-a441-4c94-9eb4-bdada01d4124",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "336e7273-30ca-4800-a8b2-01eaadaa0e32": {
      "main": [
        [
          {
            "node": "fd094524-76b1-45cd-ac72-402aefc39ff9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a34dcc52-0851-406d-8197-e47458bba309": {
      "ai_languageModel": [
        [
          {
            "node": "cffb3447-a441-4c94-9eb4-bdada01d4124",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "a7d25cbb-f1f1-451c-bb89-7dcfaa5f8915": {
      "main": [
        [
          {
            "node": "336e7273-30ca-4800-a8b2-01eaadaa0e32",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7b0de931-82fa-46f6-aaa2-565c41bfceb5": {
      "main": [
        []
      ]
    }
  }
}
Preguntas frecuentes

¿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 - Creación de contenido, 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

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos15
Categoría2
Tipos de nodos7
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
Biznova

Biznova

@biznova

Automating your biz, one workflow at a time. I build and share powerful n8n workflows to save you hours and boost productivity. All workflows are completely free. Streamline your operations with no-code.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34