使用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
使用的节点 (23)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0"
},
"nodes": [
{
"id": "d57854d1-f4d3-4361-bd0f-8c4c93043d12",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
3088,
496
],
"parameters": {
"color": 4,
"width": 540,
"height": 784,
"content": "## Was this helpful? Let me know!\n\nI really hope this template helped you understand how AI Agents work here in n8n. Your feedback is incredibly valuable and helps me create better resources for the n8n community.\n\n### **Share Your Thoughts & Ideas**\n\nWhether you have a suggestion, found a typo, or just want to say thanks, I'd love to hear from you!\nHere's a simple n8n form built for this purpose:\n\n#### ➡️ **[Click here to give feedback](https://api.ia2s.app/form/templates/feedback?template=AI%20Agent)**\n\n### **Ready to Build Something Great?**\n\nIf you're looking to take your n8n skills or business automation to the next level, I can help.\n\n**🎓 n8n Coaching:** Want to become an n8n pro? I offer one-on-one coaching sessions to help you master workflows, tackle specific problems, and build with confidence.\n#### ➡️ **[Book a Coaching Session](https://api.ia2s.app/form/templates/coaching?template=AI%20Agent)**\n\n**💼 n8n Consulting:** Have a complex project, an integration challenge, or need a custom workflow built for your business? Let's work together to create a powerful automation solution.\n#### ➡️ **[Inquire About Consulting Services](https://api.ia2s.app/form/templates/consulting?template=AI%20Agent)**\n\n---\n\nHappy Automating!\nLucas Peyrin"
},
"typeVersion": 1
},
{
"id": "62ee2512-3bf4-4bd7-b0f5-7951b8b309ff",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Get Upcoming Events",
"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": "Send Email",
"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": "Example Chat Window",
"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": "Introduction Note",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
1024,
0
],
"parameters": {
"color": 2,
"width": 632,
"height": 460,
"content": "# 🚀 Welcome to your First AI Agent!\n---\n\nThis template is your launchpad into the world of AI-powered automation. \n\n**What is an AI Agent?**\nThink of it as a smart chatbot that doesn't just talk—it *acts*. You give it a set of \"tools\" (like other n8n nodes), and it intelligently decides which tool to use to answer your questions or complete your tasks.\n\n**Try Asking It Anything!**\nAfter you activate this workflow and open the chat, try asking it things like:\n\n* `What's the weather like in Paris? this week`\n* `Give me the latest tech news.`\n* `What can n8n do for me?`\n* `How do AI Agents work?`\n\n\nIt'll use its tools to find the answer for you. Explore the other notes to see how it all works!"
},
"typeVersion": 1
},
{
"id": "b390f6d5-2972-4ee3-af35-652c2a355ae8",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Bonus Tools Note",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2016,
1008
],
"parameters": {
"color": 7,
"width": 1028,
"height": 628,
"content": "## 🚀 Bonus Tools: Add More Superpowers!\n\nThis template includes basic tools, but the real power comes from connecting your own services. Here are two examples you can add yourself!\n\nConnect any n8n tool node to your agent to give it limitless capabilities!"
},
"typeVersion": 1
},
{
"id": "341cfdd7-707f-4c56-85b0-39be5c870c11",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
1696,
0
],
"parameters": {
"color": 7,
"width": 460,
"height": 460,
"content": "## 💬 1. The Chat Interface\n\nThis is the public-facing chat window where you'll talk to your agent.\n\n**How to Test:**\n1. **Activate** the workflow.\n2. Copy the **Chat URL** from this node's panel.\n3. Open the URL in a new browser tab to start chatting!\n\n\nYou can customize the look and feel (title, colors, etc.) in the 'Options' and 'Custom CSS' tabs."
},
"typeVersion": 1
},
{
"id": "570b31c5-bdc8-4140-8c55-925b18fd613d",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2192,
0
],
"parameters": {
"color": 7,
"width": 540,
"height": 460,
"content": "## 🧠 2. The Brain: Your AI Agent\n\nThis is the most important node! It acts as the central brain of your operation.\n\n**What it does:**\n1. **Receives** your message from the chat.\n2. **Understands** your goal.\n3. **Decides** which tools (superpower) to use.\n4. **Responds** to you after using the tools.\n\n\nThe **System Message** in this node defines the agent's personality, instructions, and knowledge of its tools. This is where the real magic happens!"
},
"typeVersion": 1
},
{
"id": "cfec4e1d-117a-48c5-ac79-f357179c30c2",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
880,
496
],
"parameters": {
"color": 7,
"width": 1100,
"height": 952,
"content": "## 🤖 3. The AI Brainpower (LLM)\n\nThese nodes are the Large Language Models (LLMs) that provide the actual intelligence for your agent.\n\n**ACTION REQUIRED:**\n1. **Choose ONE model:** By default, Gemini is connected. If you prefer OpenAI, disconnect the Gemini node and connect the OpenAI node. Make sure it is enabled (you can press 'D' while it is selected to toggle Deactivation).\n2. **Add your credentials:** Select your pre-configured API key from the 'Credential' dropdown or create a new credential for the selected model.\n\n\nYour agent won't work without a brain!"
},
"typeVersion": 1
},
{
"id": "8e354a59-e904-4ec6-b214-86b2e66da85d",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2016,
496
],
"parameters": {
"color": 7,
"width": 340,
"height": 484,
"content": "## 🗂️ 4. Short-Term Memory\n\nThis node gives your agent a simple memory.\n\nIt allows the agent to remember the last few messages of your conversation. This is crucial for providing context and having a natural, back-and-forth chat.\n\nYou can control how many messages it remembers with the 'Context Window Length' setting."
},
"typeVersion": 1
},
{
"id": "d3f81153-1a03-4f0c-a689-7071d09d5e06",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note16",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2400,
496
],
"parameters": {
"color": 6,
"width": 660,
"height": 484,
"content": "## 🛠️ 5. The Agent's Toolbox (Superpowers)\n\nThese nodes are the **tools** your agent can use. They are its superpowers!\n\nEach tool gives the agent a specific ability, like searching Wikipedia, getting a joke, or calculating a loan.\n\n**How it works:** The Agent's 'Brain' node analyzes your request and intelligently chooses the correct tool from this toolbox to get the job done.\n\n**Want to add more powers?** Simply add another tool node (like the Google Calendar Tool or a custom HTTP Request Tool) and connect it to the Agent's `Tool` input!"
},
"typeVersion": 1
},
{
"id": "ad41d46b-adf5-43d9-b20b-9085dbf0c7b6",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note17",
"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": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🔑 How to Get Google Gemini Credentials\n\nTo use the Gemini model, you need a *free* API key from Google.\n\n1. **Go to Google AI Studio:**\n * Navigate to [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)\n\n2. **Get Your API Key:**\n * Click the `Create API key in new project` button.\n * Copy the generated API key.\n\n3. **Add to n8n:**\n * In the Gemini node, click the 'Credential' dropdown.\n * Select 'Create New Credential'.\n * Give it a name (e.g., \"Gemini Key\") and paste your API key into the `API Key` field.\n * Click `Save`."
},
"typeVersion": 1
},
{
"id": "dc6cd243-fa0e-434f-a510-1a701cb8529b",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note18",
"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": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🔑 How to Get OpenAI Credentials\n\nTo use an OpenAI model like GPT-4, you need an API key.\n\n1. **Go to the OpenAI Platform:**\n * Navigate to [platform.openai.com/api-keys](https://platform.openai.com/api-keys)\n\n2. **Get Your API Key:**\n * Click the `+ Create new secret key` button.\n * Give it a name and click `Create secret key`.\n * Copy the key immediately (you won't see it again).\n\n3. **Add to n8n:**\n * In the OpenAI node, click the 'Credential' dropdown.\n * Select 'Create New Credential'.\n * Give it a name and paste your API key into the `API Key` field.\n * Click `Save`.\n\n\n**Note:** Using the OpenAI API may incur costs on your OpenAI account."
},
"typeVersion": 1
},
{
"id": "0ca487b8-fc64-422d-9aec-e27362f30231",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2112,
1184
],
"parameters": {
"color": 7,
"width": 368,
"height": 400,
"content": "### **Get Upcoming Events (Google Calendar)**\n* **What it does:** Fetches your Google Calendar events for the next 7 days.\n* **How to add:** Drag the `Get Upcoming Events` tool node under the Agent, set up your Google Calendar credentials, and connect it to the agent's `Tool` input."
},
"typeVersion": 1
},
{
"id": "92cb4eda-6730-4a4f-b5e3-97ddc0c53272",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2576,
1184
],
"parameters": {
"color": 7,
"width": 368,
"height": 400,
"content": "### **Send an Email (Gmail)**\n* **What it does:** Sends an email on your behalf.\n* **How to add:** Drag the `Send Email` tool node under the Agent, set up your Gmail credentials, and connect it to the `Tool` input."
},
"typeVersion": 1
},
{
"id": "3731f4de-a300-42af-9fdd-ad328bb4a0d8",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Get News",
"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": "Get Weather",
"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": "Your First 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": "Simple Memory",
"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": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
-160,
0
],
"parameters": {
"width": 896,
"height": 1520,
"content": "# 🤔 Feeling Lost? Your Step-by-Step Guide\n\nIf this screen looks a bit overwhelming, don't worry. This note is here to help you understand what you're looking at and how to get it working, one simple step at a time.\n\n## 1. What Are All These Things on the Screen?\n\nLet's quickly define what you see.\n\n* **Workflow:** This is the entire project on your screen. It's a visual map of an automated task.\n* **Node:** A Node is a single **action block** in the workflow. Each block with an icon and a name (like the `Your First AI Agent` block or the `Get Weather` block) is a Node. It performs one specific job.\n* **Sticky Note:** These are the colored boxes with text, just like this one! They are here to explain things. They don't perform any actions.\n* **Credentials:** Think of these as **secret keys** or passwords. They let n8n securely connect to other apps (like Google).\n\n## 2. How to Make This Workflow Work (4 Simple Steps)\n\nYou don't need to change anything to get started! Just follow these steps.\n\n### **Step 1: Add Your AI Key**\nThis workflow needs an AI \"brain\" to think. By default, it uses the **Gemini** Node. You just need to give it your free key from Google.\n\n1. Find the **Gemini** Node on the screen (it has a blue and purple swirl icon).\n2. Look at the red Sticky Note right below it named `How to Get Google Gemini Credentials`.\n3. Follow the simple instructions on that note to get your key and add it to the Gemini Node.\n * *To open a Node's settings, just **double-click** it. A large window will pop up in the center of your screen.*\n\n### **Step 2: Turn the Workflow On**\nNow, let's activate the workflow.\n1. Look at the **top-right corner** of the screen.\n2. You'll see a switch that says **\"Inactive\"**. Click it.\n3. It will turn green and say **\"Active\"**. Your agent is now live!\n\n### **Step 3: Get Your Chat Link**\nTime to find the link to your chat window.\n1. Find the Node with the chat bubble icon (💬), named `Example Chat Window`.\n2. **Double-click it**. A window will pop up.\n3. Inside that window, you'll see a **Chat URL**. Just **click on the link itself**. A small message will appear in the bottom-right corner of your screen telling you it's copied.\n\n### **Step 4: Start Chatting!**\nOpen a new tab in your web browser, paste the link you just copied and press Enter. Your AI Agent's chat window will appear!\n\n## 3. What About the Grayed-Out Nodes? (Optional)\n\nYou might notice some Nodes look gray and are deactivated (like `OpenAI`, `Get Upcoming Events`, and `Send Email`).\n\n**You can ignore these completely!**\n\nThey are turned off on purpose to prevent errors. The OpenAi node can be configured with your AI Agent to use Chat GPT instead of Google Gemini. The bonus tools are optional \"superpowers\" you can add later if you want to (to give access to your Google Calendar and Gmail). The workflow is designed to work perfectly without them.\n\n## 4. Want to Learn More n8n Basics?\n\nIf you feel like this template workflow is still hard to understand, these other hands-on tutorials are the perfect next step:\n\n* [**Learn JSON Basics**](https://n8n.io/workflows/5170-learn-json-basics-with-an-interactive-step-by-step-tutorial-for-beginners/): Understand how data moves in n8n.\n* [**Learn n8n Expressions**](https://n8n.io/workflows/5271-learn-n8n-expressions-with-an-interactive-step-by-step-tutorial-for-beginners/): The real magic of making your workflows dynamic.\n* [**Learn API Fundamentals**](https://n8n.io/workflows/5171-learn-api-fundamentals-with-an-interactive-hands-on-tutorial-workflow/): See how apps talk to each other.\n* [**Learn n8n Keyboard Shortcuts**](https://n8n.io/workflows/5270-learn-n8n-keyboard-shortcuts-with-an-interactive-hands-on-tutorial-workflow/): Work faster on the canvas."
},
"typeVersion": 1
},
{
"id": "0e3fb103-fca9-413f-a88f-8c31f5c2f34b",
"cid": "Ikx1Y2FzIFBleXJpbiI",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"notes": "© 2025 Lucas Peyrin",
"creator": "Lucas Peyrin",
"position": [
2784,
0
],
"parameters": {
"color": 2,
"width": 640,
"height": 464,
"content": "## Video Tutorial\n\nComplete Video Tutorial of this Template is coming soon !\nIt will be displayed here (if you download the updated template)."
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"eb1980c5-84f8-473d-922f-f8ed0548c795": {
"ai_languageModel": [
[
{
"node": "4f4055d5-90e3-4e64-bf9e-072eb3663083",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"3731f4de-a300-42af-9fdd-ad328bb4a0d8": {
"ai_tool": [
[
{
"node": "4f4055d5-90e3-4e64-bf9e-072eb3663083",
"type": "ai_tool",
"index": 0
}
]
]
},
"4fcba687-7a04-4dcb-82a7-418a72e18b1e": {
"ai_tool": [
[
{
"node": "4f4055d5-90e3-4e64-bf9e-072eb3663083",
"type": "ai_tool",
"index": 0
}
]
]
},
"b556acc2-3f6d-457b-bc08-8a12630bcb70": {
"ai_memory": [
[
{
"node": "4f4055d5-90e3-4e64-bf9e-072eb3663083",
"type": "ai_memory",
"index": 0
}
]
]
},
"4360dfcd-6412-436a-90af-62e83e8eaddd": {
"main": [
[
{
"node": "4f4055d5-90e3-4e64-bf9e-072eb3663083",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 个人效率, AI 聊天机器人
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
构建具有聊天界面和多种工具的交互式AI助手
构建具有聊天界面和多种工具的交互式AI助手
Crypto Tool
Date Time Tool
Agent
+
Crypto Tool
Date Time Tool
Agent
17 节点Lucas Peyrin
个人效率
构建您的第一个AI代理
构建您的第一个AI代理
Agent
Http Request Tool
Rss Feed Read Tool
+
Agent
Http Request Tool
Rss Feed Read Tool
14 节点Lucas Peyrin
个人效率
高级多代理AI个人助手(250+任务能力,WhatsApp + GPT)
高级多代理AI个人助手(250+任务能力,WhatsApp + GPT)
Set
Switch
Whats App
+
Set
Switch
Whats App
213 节点Electrabot
个人效率
AI驱动的多平台助手 - Google套件、LinkedIn和Twitter
基于Google套件、LinkedIn和Twitter的AI驱动多平台助手
Code
Discord
Webhook
+
Code
Discord
Webhook
65 节点Jay Emp0
个人效率
构建带记忆、Google套件和多AI研究成像的WhatsApp助手
构建带记忆、Google套件和多AI研究成像的WhatsApp助手
If
Set
Code
+
If
Set
Code
71 节点Iniyavan JC
AI 聊天机器人
💥 使用ChatGPT-5构建您的第一个AI代理
使用GPT-5、Google日历和表格创建知识库与日程安排AI助手
Gmail Tool
Agent
Google Sheets Tool
+
Gmail Tool
Agent
Google Sheets Tool
14 节点Dr. Firas
杂项
工作流信息
难度等级
高级
节点数量23
分类2
节点类型10
作者
Lucas Peyrin
@lucaspeyrinInnovative 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 查看 →
分享此工作流