Automatisierter Rezeassistent mit Gmail, Formularen und KI-Chatmodellen

Fortgeschritten

Dies ist ein Personal Productivity, Multimodal AI-Bereich Automatisierungsworkflow mit 10 Nodes. Hauptsächlich werden Code, Gmail, FormTrigger, GmailTrigger, Agent und andere Nodes verwendet. Verwenden Sie Ollama und Llama 3.2, um Rezepte basierend auf Gmail- und Formularanfragen zu generieren

Voraussetzungen
  • Google-Konto + Gmail API-Anmeldedaten
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "xgtoa8r5NBx43ldC",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Food Recipe Assistant via Gmail, Form & AI Chat Model",
  "tags": [],
  "nodes": [
    {
      "id": "2825d5b3-bc93-4c3f-979b-9f4db3ed4198",
      "name": "Notizzettel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -180
      ],
      "parameters": {
        "height": 540,
        "content": "Starts when user sends a Gmail or submits a form with recipe request"
      },
      "typeVersion": 1
    },
    {
      "id": "a7b23e86-2fc1-4591-bf52-99aa637aef1c",
      "name": "Notizzettel1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -180
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 620,
        "content": "Understands user query and generates recipe."
      },
      "typeVersion": 1
    },
    {
      "id": "4e8e32c7-f6bc-4810-b390-f5e28ee7df74",
      "name": "Notizzettel2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        -180
      ],
      "parameters": {
        "color": 5,
        "width": 180,
        "height": 520,
        "content": "Formats the recipe (e.g., ingredients, steps)"
      },
      "typeVersion": 1
    },
    {
      "id": "503dd57d-ea7c-425d-a12c-8c7ff01d68c2",
      "name": "Notizzettel3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        -180
      ],
      "parameters": {
        "color": 4,
        "width": 200,
        "height": 520,
        "content": "Sends formatted recipe back to the user."
      },
      "typeVersion": 1
    },
    {
      "id": "cc323bc4-2d4a-4ffc-9c03-b660309676ff",
      "name": "Rezeptanfrage - Gmail",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PcTqvGU9uCunfltE",
          "name": "Gmail account - test"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "39138c17-7dd2-4d25-acdb-093ac7241c68",
      "name": "Rezeptanfrage - Webformular",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        200
      ],
      "webhookId": "c050d793-62e8-4b33-a824-99226b2ad004",
      "parameters": {
        "options": {},
        "formTitle": "🍳 Ask the AI Chef!",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Hey Dude, Tell Me fast.",
              "placeholder": "\"What is a pizza recipe?\",\"How do I make butter chicken?\"",
              "requiredField": true
            }
          ]
        },
        "formDescription": "✨ Type any food name, ingredient, or dish, and our AI Chef will give you the perfect recipe in seconds!"
      },
      "typeVersion": 2.2
    },
    {
      "id": "077be9f8-16cf-4c0e-9564-b4f4ffd51b7f",
      "name": "Ollama Rezeptgenerator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        100
      ],
      "parameters": {
        "text": "=You are a vibrant and professional chef AI tasked with creating a delicious, visually appealing recipe based on user inputs. The user has provided:\n\nQuestion: {{ $json.snippet }}\nIngredients: [Insert ingredients from form submission]\nRecipe Details: [Insert recipe details, e.g., dish name, cuisine type, dietary preferences]\nSpecial Add-Ons: [Insert special add-ons, e.g., garnishes, sauces, or twists]\n\nYour task is to:\n\nCreate a complete recipe using the provided ingredients and special add-ons.\n\nAlign the recipe with the recipe details (e.g., cuisine, dietary preferences).\n\nGenerate a catchy, descriptive title for the dish.\n\nList all ingredients with estimated quantities. Write each on a new line with no symbols or formatting characters (do not use *, -, #, or any bullet points — just plain text).\n\nProvide clear, step-by-step cooking instructions written for a beginner cook. Use numbered steps only (e.g., 1, 2, 3) with no other symbols before or after the numbers.\n\nIncorporate the special add-ons creatively, such as in garnishes, sauces, or flavor twists, listed clearly without any symbols or formatting characters.\n\nSuggest one side dish or pairing to complement the recipe with a short description.\n\nUse emojis to make the output fun and engaging (e.g., 🍕 for pizza, 🔥 for spicy, 🥗 for sides), but do not overuse them.\n\nFormat the output in Markdown using the structure below. Do not use bold (`**`) or heading (`#`) symbols anywhere in the output. Instead, write section titles in uppercase letters only.\n\nEnsure the output is concise, professional, and visually appealing with thoughtful emoji use.\n\nIf ingredients are unclear or incompatible, suggest minor adjustments and list them under a Chef’s Note section.\n\nOutput Format (in Markdown):\n\n🍽️ [RECIPE TITLE]\n\nSERVINGS: [Estimate, e.g., 2-4] 👥   \nCOOk TIME: [Estimate in minutes] 🔥\n\nINGREDIENTS  \n✪.Ingredient 1 with quantity  \n✪.Ingredient 2 with quantity  \n...\n\nINSTRUCTIONS  \n1. Step one  \n2. Step two  \n...\n\nSPECIAL ADD-ONS  \n- Describe how add-on 1 is used  \n- Describe how add-on 2 is used  \n...\n\nSUGGESTED PAIRING  \n- Side dish or pairing suggestion with brief description\n\nCHEF’S NOTE (if applicable)  \n- Note any substitutions, adjustments, or tips\n\nRULES\n- Bold all main section titles like INGREDIENTS, INSTRUCTIONS, SPECIAL ADD-ONS, SUGGESTED PAIRING, and CHEF’S NOTE using double asterisks (e.g., INGREDIENTS) but do not bold anything else.\n\n- strictly follow output formate \n\n-Make the output visually delightful by adding a few more relevant emojis to enhance each section's personality and structure. Use line spacing and section breaks to make the output look well-organized, professional, and scroll-stopping for email readers. Ensure it feels premium, exciting, and clear.\n\n\nEnsure no symbols (*, -, #, or **) are used in the ingredient list, special add-ons, or instructions. Each item must be on a new line without any prefix symbols.\n",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "45e7c74a-c0d0-4d7e-95b5-4a75c20b220d",
      "name": "Llama 3.2 - Chef-Modell",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        300,
        320
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "id": "vDhjHnEfhHheDgd6",
          "name": "Ollama-vrushti"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "df6b755f-fa56-4b3a-bae3-3c606e4250ec",
      "name": "Rezeptausgabe formatieren",
      "type": "n8n-nodes-base.code",
      "position": [
        580,
        100
      ],
      "parameters": {
        "jsCode": "const raw = $json[\"output\"] || \"\";\n\nfunction formatSection(title, content) {\n  if (!content) return \"\";\n  return `<strong>${title}</strong><br>${content}<br><br>`;\n}\n\n// Replace \\n with <br> for final formatting\nlet html = raw.replace(/\\n/g, \"<br>\");\n\n// Extract section content from RAW text\nfunction extractFromRaw(title) {\n  const regex = new RegExp(`${title}\\\\s*:?\\\\s*\\\\n([\\\\s\\\\S]*?)(\\\\n\\\\n|\\\\n[A-Z ]{3,}|$)`, \"i\");\n  const match = raw.match(regex);\n  return match && match[1] ? match[1].trim().replace(/\\n/g, \"<br>\") : \"\";\n}\n\n// Extract Servings and Cook Time\nfunction extractDetails() {\n  let servingsMatch = raw.match(/Servings\\s*[:\\-]?\\s*(.+)/i);\n  let cookTimeMatch = raw.match(/Cook\\s*Time\\s*[:\\-]?\\s*(.+)/i);\n  let servings = servingsMatch ? `SERVINGS: ${servingsMatch[1].trim()} 👥` : \"\";\n  let cookTime = cookTimeMatch ? `COOK TIME: ${cookTimeMatch[1].trim()} 🔥` : \"\";\n  return [servings, cookTime].filter(Boolean).join(\"<br>\");\n}\n\n\n// Title Line — also handles **Markdown bold** if exists\nconst firstLineRaw = raw.split(\"\\n\")[0].replace(\"🍽️ \", \"\").trim();\nconst firstLine = firstLineRaw.replace(/\\*\\*(.*?)\\*\\*/g, \"<strong>$1</strong>\");\n\nconst formatted = `\n<div style=\"font-family:Arial, sans-serif; line-height:1.6\">\n  <p>🍽️ ${firstLine}</p><br>\n  ${formatSection(\"DETAILS\", extractDetails())}\n  ${formatSection(\"INGREDIENTS\", extractFromRaw(\"INGREDIENTS\"))}\n  ${formatSection(\"INSTRUCTIONS\", extractFromRaw(\"INSTRUCTIONS\"))}\n  ${formatSection(\"SPECIAL ADD-ONS\", extractFromRaw(\"SPECIAL ADD-ONS\"))}\n  ${formatSection(\"SUGGESTED PAIRING\", extractFromRaw(\"SUGGESTED PAIRING\"))}\n  ${formatSection(\"CHEF'S NOTE\", extractFromRaw(\"CHEF'S NOTE\"))}\n</div>\n`;\n\nreturn [\n  {\n    json: {\n      formattedHtml: formatted\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "11c32fd2-8844-410e-bbae-a81e267f34da",
      "name": "Rezept per E-Mail senden",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        800,
        100
      ],
      "webhookId": "a8bc0090-8b98-4a15-8449-194516ec6e90",
      "parameters": {
        "sendTo": "={{ $('Recipe Request - Gmail').item.json.To }}",
        "message": "={{ $json.formattedHtml }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "🔥 Ready to Cook? Here’s Your Recipe from AI Chef"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PcTqvGU9uCunfltE",
          "name": "Gmail account - test"
        }
      },
      "executeOnce": true,
      "typeVersion": 2.1,
      "alwaysOutputData": true
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8bf21cb0-edf4-4908-9c46-46363df9ade8",
  "connections": {
    "df6b755f-fa56-4b3a-bae3-3c606e4250ec": {
      "main": [
        [
          {
            "node": "11c32fd2-8844-410e-bbae-a81e267f34da",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "45e7c74a-c0d0-4d7e-95b5-4a75c20b220d": {
      "ai_languageModel": [
        [
          {
            "node": "077be9f8-16cf-4c0e-9564-b4f4ffd51b7f",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "cc323bc4-2d4a-4ffc-9c03-b660309676ff": {
      "main": [
        [
          {
            "node": "077be9f8-16cf-4c0e-9564-b4f4ffd51b7f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "077be9f8-16cf-4c0e-9564-b4f4ffd51b7f": {
      "main": [
        [
          {
            "node": "df6b755f-fa56-4b3a-bae3-3c606e4250ec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "39138c17-7dd2-4d25-acdb-093ac7241c68": {
      "main": [
        [
          {
            "node": "077be9f8-16cf-4c0e-9564-b4f4ffd51b7f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Persönliche Produktivität, Multimodales KI

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes10
Kategorie2
Node-Typen7
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
Oneclick AI Squad

Oneclick AI Squad

@oneclick-ai

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34