8
n8n 中文网amn8n.com

使用Gemini AI、天气和网页抓取创建多功能聊天机器人(入门套件)

高级

这是一个Personal Productivity, AI Chatbot领域的自动化工作流,包含 23 个节点。主要使用 GmailTool, Agent, HttpRequestTool, RssFeedReadTool, GoogleCalendarTool 等节点。 使用Gemini AI、天气和网页抓取创建多功能聊天机器人(入门套件)

前置要求
  • Google 账号和 Gmail API 凭证
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0"
  },
  "nodes": [
    {
      "id": "d57854d1-f4d3-4361-bd0f-8c4c93043d12",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 10",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        3088,
        496
      ],
      "parameters": {
        "color": 4,
        "width": 540,
        "height": 784,
        "content": "## 这对您有帮助吗?请告诉我!"
      },
      "typeVersion": 1
    },
    {
      "id": "62ee2512-3bf4-4bd7-b0f5-7951b8b309ff",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "获取即将发生的事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "disabled": true,
      "position": [
        2256,
        1392
      ],
      "parameters": {
        "options": {},
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "operation": "getAll",
        "returnAll": true
      },
      "typeVersion": 1.3
    },
    {
      "id": "9779b40c-e7f8-41dc-a58d-f2dea7960a6f",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "发送邮件",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "disabled": true,
      "position": [
        2720,
        1392
      ],
      "webhookId": "f072a160-8e66-4b24-a055-bfa892c1835f",
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "appendAttribution": true
        },
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "4360dfcd-6412-436a-90af-62e83e8eaddd",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "示例聊天窗口",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1968,
        320
      ],
      "webhookId": "e5616171-e3b5-4c39-81d4-67409f9fa60a",
      "parameters": {
        "public": true,
        "options": {
          "title": "Your first AI Agent 🚀",
          "subtitle": "This is for demo purposes. Try me out !",
          "customCss": "/* === THEME OVERRIDE: n8n Glass & Glow (Revised) === */\n\n/*\n  This theme is built upon the default n8n chat CSS variables.\n  We'll use your desired branding and layout, and then add\n  the \"glass\" effect using a semi-transparent background\n  and a backdrop-filter on the main window class.\n*/\n\n:root {\n  /* --- 1. CORE BRANDING & FONTS --- */\n  /* Your choices for font and primary color are applied here. */\n  --chat--font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n  --chat--color-primary: #EA4B71; /* n8n Red */\n  --chat--color-primary-shade-50: #D93A60;\n  --chat--color-primary-shade-100: #C82A50;\n  --chat--color-secondary: #20b69e; /* Kept default secondary for things like file uploads */\n  --chat--color-secondary-shade-50: #1ca08a;\n  --chat--color-white: #ffffff;\n  --chat--color-light: #f2f4f8;\n  --chat--color-dark: #1F2937; /* Darker, more modern text color */\n  --chat--color-disabled: #9CA3AF;\n  --chat--color-typing: #404040;\n\n  /* --- 2. WINDOW & LAYOUT --- */\n  /* Your dimensions and rounded corners. The actual glass effect is handled in the class override below. */\n  --chat--window--width: 430px;\n  --chat--window--height: 80vh;\n  --chat--window--border-radius: 16px;\n  --chat--window--border: 1px solid rgba(255, 255, 255, 0.3);\n  --chat--spacing: 1rem; /* 16px base spacing */\n  --chat--window--z-index: 9999;\n  --chat--window--bottom: var(--chat--spacing);\n  --chat--window--right: var(--chat--spacing);\n  --chat--window--margin-bottom: var(--chat--spacing);\n\n  /* --- 3. GLASSMORPHISM BACKGROUNDS --- */\n  /* We make the main sections transparent to let the glass window show through. */\n  --chat--header--background: transparent;\n  --chat--body--background: transparent;\n  --chat--footer--background: transparent;\n\n  /* --- 4. HEADER STYLING --- */\n  --chat--header-height: auto;\n  --chat--header--padding: 20px;\n  --chat--header--color: var(--chat--color-dark);\n  --chat--header--border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Subtle divider */\n  --chat--heading--font-size: 1.5rem;\n  --chat--subtitle--font-size: 0.875rem;\n  --chat--subtitle--line-height: 1.4;\n  --chat--close--button--color-hover: var(--chat--color-primary);\n\n  /* --- 5. MESSAGE BUBBLES --- */\n  --chat--message--font-size: 0.875rem;\n  --chat--message--padding: 12px 16px;\n  --chat--message--border-radius: 12px;\n  --chat--message-line-height: 1.6;\n  --chat--message--margin-bottom: calc(var(--chat--spacing) * 0.75);\n  --chat--messages-list--padding: var(--chat--spacing);\n  --chat--message--bot--background: var(--chat--color-white);\n  --chat--message--bot--color: #111827;\n  --chat--message--bot--border: none;\n  --chat--message--user--background: var(--chat--color-primary);\n  --chat--message--user--color: var(--chat--color-white);\n  --chat--message--user--border: none;\n\n  /* --- 6. INPUT AREA --- */\n  --chat--textarea--height: 50px;\n  --chat--textarea--max-height: 10rem;\n  --chat--input--font-size: 0.9rem;\n  --chat--input--border: 0;\n  --chat--input--border-radius: 12px; /* Rounded input field */\n  --chat--input--padding: 12px 16px;\n  --chat--input--background: rgba(255, 255, 255, 0.5); /* Semi-transparent input */\n  --chat--input--text-color: #111827;\n  --chat--input--line-height: 1.5;\n  --chat--input--border-active: 0;\n\n  /* --- 7. SEND & FILE BUTTONS --- */\n  --chat--input--send--button--background: transparent;\n  --chat--input--send--button--color: var(--chat--color-primary);\n  --chat--input--send--button--background-hover: transparent;\n  --chat--input--send--button--color-hover: var(--chat--color-primary-shade-50);\n  --chat--input--file--button--background: transparent;\n  --chat--input--file--button--color: var(--chat--color-secondary);\n  --chat--input--file--button--background-hover: transparent;\n  --chat--input--file--button--color-hover: var(--chat--color-secondary-shade-50);\n\n  /* --- 8. TOGGLE BUTTON & OTHERS --- */\n  /* Using your primary brand color for the main toggle button */\n  --chat--toggle--size: 64px;\n  --chat--toggle--width: var(--chat--toggle--size);\n  --chat--toggle--height: var(--chat--toggle--size);\n  --chat--toggle--border-radius: 50%;\n  --chat--toggle--background: var(--chat--color-primary);\n  --chat--toggle--hover--background: var(--chat--color-primary-shade-50);\n  --chat--toggle--active--background: var(--chat--color-primary-shade-100);\n  --chat--toggle--color: var(--chat--color-white);\n}\n\n/* === CLASS OVERRIDES === */\n/*\n  These are essential for effects that CSS variables can't control,\n  like the glass blur, shadows, and max-height.\n*/\n\n.chat-window {\n  /* This is the magic for the glass effect! */\n  background-color: rgba(249, 243, 245, 0.6); /* A semi-transparent background color */\n  backdrop-filter: blur(20px);\n  -webkit-backdrop-filter: blur(20px); /* For Safari compatibility */\n\n  /* A subtle shadow helps lift the window off the page */\n  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);\n\n  /* Here we apply the max-height you wanted */\n  max-height: 750px;\n}\n\n/* Make user messages slightly wider for better balance */\n.chat-message.is-user {\n\tmax-width: 70%;\n}\n\n.chat-message.is-bot {\n\tmax-width: 80%;\n}\n\n/* Add a subtle glow to messages on hover */\n.chat-message {\n    transition: transform 0.2s ease, box-shadow 0.2s ease;\n}\n.chat-message:hover {\n    transform: translateY(-2px);\n    box-shadow: 0 0 25px 0 rgba(234, 75, 113, 0.2);\n}\n\n/* === PAGE BACKGROUND === */\n/* Your dotted background to simulate the n8n canvas. Perfect as is! */\nbody {\n    background-color: #FDFBFF;\n    background-image:\n        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.07) 1px, transparent 0),\n        linear-gradient(135deg, #F9F3F5 0%, #EFF3FB 100%);\n    background-size: 25px 25px, 100% 100%;\n}",
          "responseMode": "lastNode",
          "inputPlaceholder": "Type your message here..",
          "showWelcomeScreen": false
        },
        "initialMessages": "Hi there! 👋"
      },
      "typeVersion": 1.1
    },
    {
      "id": "10332915-08c6-42a0-b20c-db0546cab813",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "介绍说明",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1024,
        0
      ],
      "parameters": {
        "color": 2,
        "width": 632,
        "height": 460,
        "content": "# 🚀 欢迎使用您的第一个 AI Agent!"
      },
      "typeVersion": 1
    },
    {
      "id": "b390f6d5-2972-4ee3-af35-652c2a355ae8",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "额外工具说明",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2016,
        1008
      ],
      "parameters": {
        "color": 7,
        "width": 1028,
        "height": 628,
        "content": "## 🚀 额外工具:添加更多超能力!"
      },
      "typeVersion": 1
    },
    {
      "id": "341cfdd7-707f-4c56-85b0-39be5c870c11",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 12",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1696,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 460,
        "content": "## 💬 1. 聊天界面"
      },
      "typeVersion": 1
    },
    {
      "id": "570b31c5-bdc8-4140-8c55-925b18fd613d",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 13",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2192,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 540,
        "height": 460,
        "content": "## 🧠 2. 大脑:您的 AI Agent"
      },
      "typeVersion": 1
    },
    {
      "id": "cfec4e1d-117a-48c5-ac79-f357179c30c2",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签14",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        880,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 1100,
        "height": 952,
        "content": "## 🤖 3. AI 智能 (LLM)"
      },
      "typeVersion": 1
    },
    {
      "id": "8e354a59-e904-4ec6-b214-86b2e66da85d",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签15",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2016,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 340,
        "height": 484,
        "content": "## 🗂️ 4. 短期记忆"
      },
      "typeVersion": 1
    },
    {
      "id": "d3f81153-1a03-4f0c-a689-7071d09d5e06",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 16",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2400,
        496
      ],
      "parameters": {
        "color": 6,
        "width": 660,
        "height": 484,
        "content": "## 🛠️ 5. Agent 的工具箱 (超能力)"
      },
      "typeVersion": 1
    },
    {
      "id": "ad41d46b-adf5-43d9-b20b-9085dbf0c7b6",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 17",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "width": 380,
      "height": 380,
      "creator": "Lucas Peyrin",
      "position": [
        1440,
        752
      ],
      "parameters": {
        "color": 3,
        "width": 512,
        "height": 656,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "dc6cd243-fa0e-434f-a510-1a701cb8529b",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 18",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "width": 380,
      "height": 460,
      "creator": "Lucas Peyrin",
      "position": [
        912,
        752
      ],
      "parameters": {
        "color": 7,
        "width": 512,
        "height": 656,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0ca487b8-fc64-422d-9aec-e27362f30231",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2112,
        1184
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 400,
        "content": "### **获取即将发生的事件 (Google Calendar)**"
      },
      "typeVersion": 1
    },
    {
      "id": "92cb4eda-6730-4a4f-b5e3-97ddc0c53272",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2576,
        1184
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 400,
        "content": "### **发送电子邮件 (Gmail)**"
      },
      "typeVersion": 1
    },
    {
      "id": "3731f4de-a300-42af-9fdd-ad328bb4a0d8",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "获取新闻",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2800,
        800
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `Use one of:\n- https://feeds.bbci.co.uk/news/world/rss.xml (BBC World – global headlines)\n- https://www.aljazeera.com/xml/rss/all.xml (Al Jazeera English – in‑depth global coverage)\n- http://rss.cnn.com/rss/edition_world.rss (CNN World – breaking news worldwide)\n- https://techcrunch.com/feed/ (TechCrunch – global tech & startup news)\n- http://news.ycombinator.com/rss (Hacker News – tech community headlines)\n- https://n8n.io/blog/rss (n8n Blog – updates & tutorials)\n- https://www.bonappetit.com/feed/recipes-rss-feed/rss (Bon Appétit – recent recipes list)\n- https://www.endsreport.com/rss/news-and-analysis (ENDS Report – environmental law & policy news)\n- https://medlineplus.gov/groupfeeds/new.xml (MedlinePlus – health topics & wellness updates)`, 'string') }}",
        "options": {},
        "toolDescription": "Gets the latest blog posts about any rss feed."
      },
      "typeVersion": 1.2
    },
    {
      "id": "4fcba687-7a04-4dcb-82a7-418a72e18b1e",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "获取天气",
      "type": "n8n-nodes-base.httpRequestTool",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2576,
        800
      ],
      "parameters": {
        "url": "https://api.open-meteo.com/v1/forecast",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "latitude",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `Latitude of the location, e.g. 45.75 for Lyon. Do not ask the user just infer it automatically.`, 'string') }}"
            },
            {
              "name": "longitude",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `Longitude of the location, e.g. 4.85 for Lyon. Do not ask the user just infer it automatically.`, 'string') }}"
            },
            {
              "name": "current",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters2_Value', `Comma-separated list of current weather variables (no whitespace).\n\nExample: temperature_2m,windspeed_10m,rain.\n\nOptions: temperature_2m,relative_humidity_2m,apparent_temperature,is_day,precipitation,rain,showers,snowfall,weathercode,cloudcover_total,pressure_msl,surface_pressure,windspeed_10m,winddirection_10m,windgusts_10m.`, 'string') }}"
            },
            {
              "name": "hourly",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters3_Value', `Comma-separated list of hourly weather variables (no whitespace). Hourly is only useful to get one day's information. For weakly overview please use daily.\n\nExample: temperature_2m,precipitation.\n\nOptions: temperature_2m,relative_humidity_2m,dewpoint_2m,apparent_temperature,precipitation,rain,showers,snowfall,snow_depth,pressure_msl,surface_pressure,cloudcover_total,cloudcover_low,cloudcover_mid,cloudcover_high,windspeed_10m,winddirection_10m,windgusts_10m,visibility,is_day,sunshine_duration,soil_temperature,soil_moisture,PM10,PM2_5,carbon_monoxide,ozone,us_aqi,UV_index.`, 'string') }}"
            },
            {
              "name": "daily",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters4_Value', `Comma-separated list of daily weather variables (no whitespace).\n\nExample: temperature_2m_max,precipitation_sum.\n\nOptions: weathercode,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,precipitation_sum,rain_sum,showers_sum,snowfall_sum,precipitation_hours,sunrise,sunset,daylight_duration,sunshine_duration,pressure_msl_max,pressure_msl_min,surface_pressure_max,surface_pressure_min,windgusts_10m_max,windspeed_10m_max,winddirection_10m_dominant,shortwave_radiation_sum.`, 'string') }}"
            },
            {
              "name": "start_date",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters5_Value', `Start date in YYYY-MM-DD format. Example: 2025-07-15`, 'string') }}"
            },
            {
              "name": "end_date",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters6_Value', `End date in YYYY-MM-DD format. Must be after start_date. Example: 2025-07-18`, 'string') }}"
            },
            {
              "name": "temperature_unit",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters7_Value', `Unit for temperature. Options: celsius (default), fahrenheit.`, 'string') }}"
            }
          ]
        },
        "toolDescription": "Get weather forecast anywhere, anytime. You can make requests by assuming most information, the only thing you need is the location (use the city name to infer lat and long automatically) and time period (assume today if not specified)"
      },
      "typeVersion": 4.2
    },
    {
      "id": "4f4055d5-90e3-4e64-bf9e-072eb3663083",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "您的第一个 AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2320,
        320
      ],
      "parameters": {
        "options": {
          "systemMessage": "=<role>\nYou are the n8n Demo AI Agent, a friendly and helpful assistant designed to showcase the power of AI agents within the n8n automation platform. You were created by Lucas Peyrin as part of the \"Your First AI Agent Blueprint\" template. Your personality is encouraging, slightly educational, and enthusiastic about automation. Your primary function is to demonstrate your capabilities by using your available tools to answer user questions and fulfill requests, focusing on exploring n8n agent workflows and AI capabilities. You are conversational.\n</role>\n\n<instructions>\n<goal>\nYour primary goal is to act as a live demonstration of an AI Agent built with n8n. You will interact with users, answer their questions by intelligently using your available tools, and explain the concepts behind AI agents to help them understand their potential based on their situation and explore the capabilities of an n8n agent workflow for them.\n</goal>\n\n<context>\n### How I Work\nI am an AI model operating within a simple n8n workflow. This workflow gives me two key things:\n1.  **A set of tools:** These are functions I can call to get information or perform actions.\n2.  **Simple Memory:** I can remember the immediate past of our current conversation to understand context.\n\n### My Purpose\nMy main purpose is to be a showcase. I demonstrate how you can give a chat interface to various functions (my tools) without needing complex UIs. This is a great way to make powerful automations accessible to anyone through simple conversation.\n\n### My Tools Instructions\nYou must choose one of your available tools if the user's request matches its capability. You cannot perform these actions yourself; you must call the tool.\n\n### About AI Agents in n8n\n- **Reliability:** While I can use one tool at a time effectively, more advanced agents can perform multi-step tasks. However, for complex, mission-critical processes, it's often more reliable to build structured, step-by-step workflows in n8n rather than relying solely on an agent's reasoning. Agents are fantastic for user-facing interactions, but structured workflows are king for backend reliability.\n- **Best Practices:** A good practice is to keep an agent's toolset focused, typically under 10-15 tools, to ensure reliability and prevent confusion.\n\n### Current Date & Time\n{{ $now }}\n\n### Handling Errors & Providing Resources\nYour creator is Lucas Peyrin. If you encounter an error during our interaction, or if the user reports an issue with the template, you should apologize for the inconvenience and suggest they provide feedback to the template's creator using this form:\n[Give Feedback about this Template](https://api.ia2s.app/form/templates/feedback?template=AI%20Agent)\n\nIf a user specifically asks for help with n8n, how to get coaching, or how to hire an expert for a project, you have the following resources available to share. **Do not offer these proactively.**\n- For one-on-one sessions: [Get Personalized n8n Coaching](https://api.ia2s.app/form/templates/coaching?template=AI%20Agent)\n- For complex projects and custom workflows: [Get an Expert to do my n8n Project](https://api.ia2s.app/form/templates/consulting?template=AI%20Agent)\n- To see more templates from the creator: [More n8n Templates](https://n8n.io/creators/lucaspeyrin)\n</context>\n\n<output_format>\n- Respond in a friendly, conversational, and helpful tone.\n- When a user's request requires a tool, first select the appropriate tool. Then, present the result of the tool's execution to the user in a clear and understandable way.\n- Be proactive in helping the user explore your capabilities. If the user is unsure what to do, suggest some examples of what they can ask you based on your available tools (e.g., \"You can ask me to use my tools to...\").\n- If you or a tool encounters an error, inform the user and provide the feedback link as instructed in the context.\n</output_format>\n</instructions>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b556acc2-3f6d-457b-bc08-8a12630bcb70",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2144,
        800
      ],
      "parameters": {
        "contextWindowLength": 30
      },
      "typeVersion": 1.3
    },
    {
      "id": "eb1980c5-84f8-473d-922f-f8ed0548c795",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1632,
        800
      ],
      "parameters": {
        "options": {
          "temperature": 0
        }
      },
      "credentials": {
        "googlePalmApi": {
          "id": "AXawYbABK5aZbGBE",
          "name": "IA2S"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4d39197d-8087-4159-9e80-9a9a0f15502c",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "disabled": true,
      "position": [
        1104,
        800
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {
          "temperature": 0
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "df0ff1f1-c250-498b-a752-a118fc9ce37b",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        -160,
        0
      ],
      "parameters": {
        "width": 896,
        "height": 1520,
        "content": "# 🤔 感到困惑?您的分步指南"
      },
      "typeVersion": 1
    },
    {
      "id": "0e3fb103-fca9-413f-a88f-8c31f5c2f34b",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        2784,
        0
      ],
      "parameters": {
        "color": 2,
        "width": 640,
        "height": 464,
        "content": "## 视频教程"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Your First AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get News": {
      "ai_tool": [
        [
          {
            "node": "Your First AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Weather": {
      "ai_tool": [
        [
          {
            "node": "Your First AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Your First AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Example Chat Window": {
      "main": [
        [
          {
            "node": "Your First AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 个人效率, AI 聊天机器人

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量23
分类2
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Lucas Peyrin

Lucas Peyrin

@lucaspeyrin

Innovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.

外部链接
在 n8n.io 查看

分享此工作流