あなたの最初のAIエージェントを構築する

中級

これはPersonal Productivity, AI Chatbot分野の自動化ワークフローで、14個のノードを含みます。主にAgent, HttpRequestTool, RssFeedReadTool, ChatTrigger, LmChatGoogleGeminiなどのノードを使用。 最初のAIエージェントを構築する

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Gemini API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "creator": "Lucas Peyrin",
    "instanceId": "e409ea34548a2afe2dffba31130cd1cf2e98ebe2afaeed2a63caf2a0582d1da0",
    "fingerprint": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjcmVhdG9yIjoiIiwiaXNzIjoibjhuIiwiaWF0IjoxNzUzMTg2MDc5fQ.gRNpFsXu1gvbRjF8go3KFo3jb2QzVaW8xxpHyokvtL0"
  },
  "nodes": [
    {
      "id": "304155b6-fa12-4b99-972c-4f209010f6b3",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "イントロダクションノート",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        -128,
        -16
      ],
      "parameters": {
        "width": 392,
        "height": 524,
        "content": "## 🚀 Try It Out!\n\n### Launch your first AI Agent—an AI-powered chatbot that uses tools in your workflow.\n\nBy using other apps or services, your AI Agent can get up-to-date info, send emails, or do tasks for you automatically.\n\n### How it works\n* Uses Google Gemini (just add your Google AI key).\n* Comes ready to fetch weather updates, tech news, or answer questions about n8n.\n* Add tools like Gmail or Calendar to let your agent send emails or manage your schedule.\n\n\n### Need Help?\n🎓 **[Book Coaching](https://api.ia2s.app/form/templates/coaching?template=Very%20First%20AI%20Agent)** to level up your n8n skills\n✍️ **[Submit feedback](https://api.ia2s.app/form/templates/feedback?template=Very%20First%20AI%20Agent)** to help improve this template\n\n\n*Happy Automating! —Lucas Peyrin*\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2041cd29-7c6f-4a96-a9a6-ea6b45e0e075",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート12",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        336,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 316,
        "height": 412,
        "content": "## 💬 The Chat Interface\n\nFirst connect Gemini (see red sticky note below). Then click the **🗨 Open chat** button and try asking:\n\n* “What’s the weather in Paris?”\n* “Get me the latest tech news.”\n* “Give me ideas for n8n AI agents.”"
      },
      "typeVersion": 1
    },
    {
      "id": "786635f6-6fe8-429a-95de-179c6006c33b",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート13",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        720,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 620,
        "height": 364,
        "content": "## 🤖 Your AI Agent\n\nThis is the heart of the workflow. It powers your AI by:\n\n1. **Receiving** messages from the chat window\n2. **Choosing** the right tools (like weather, news, or email)\n3. **Replying** with helpful answers based on real-time data\n\n\nTweak the **System Message** to shape how your agent thinks, acts, and responds!\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a6dcf475-a714-41b6-8317-a4280bfc5709",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート15",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        720,
        544
      ],
      "parameters": {
        "color": 7,
        "width": 324,
        "height": 276,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis node lets your agent remember the last few messages to stay on topic. Adjust with the **Context Window Length** setting."
      },
      "typeVersion": 1
    },
    {
      "id": "254547dd-a977-46a3-9ddb-7980600ef68f",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート16",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1104,
        544
      ],
      "parameters": {
        "color": 7,
        "width": 436,
        "height": 324,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThese tools let your agent bring in real-world data.\n\nIt can check the current weather or fetch the latest news and blog posts—great for creating more helpful and relevant responses"
      },
      "typeVersion": 1
    },
    {
      "id": "b2439d89-7411-4e78-a5cf-d69e83eb7156",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート17",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "width": 380,
      "height": 380,
      "creator": "Lucas Peyrin",
      "position": [
        336,
        544
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 528,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n⚠️ To use Gemini, you’ll need a *free* API key from Google:\n\n1. **Visit Google AI Studio**\n   Go to [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)\n\n2. **Create Your Key**\n   Click **“Create API key in new project”** and copy the key.\n\n3. **Add It to n8n**\n   In the Gemini node:\n\n   * Click **Credential → Create New**\n   * Paste the key into the **API Key** field\n   * Click **Save**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "34121307-276d-449c-8f05-f223358748a2",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート1",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1552,
        544
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 320,
        "content": "### ➕ Connect More Tools\n\nYou can make your agent more useful by adding extra tools:\n\n* **Get Upcoming Events (Google Calendar):** Shows your events for the next 7 days.\n* **Send an Email (Gmail):** Sends an email for you.\n\nTo add a tool, click the ➕ icon under the Agent’s `Tool` input, pick a tool, and set up a connection.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "bdf6dfb4-4a4a-48f6-b53e-d246c81028f5",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "ニュース取得",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1376,
        576
      ],
      "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": "7bc90c6b-aae8-4956-9ee7-3993f0586a09",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "天気取得",
      "type": "n8n-nodes-base.httpRequestTool",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        1184,
        576
      ],
      "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": "0bc33a3d-df28-4f4e-9616-15b6f50db721",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "初めてのAIエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        880,
        224
      ],
      "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. 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 their requests. 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.\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</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. If the user is unsure what to do, suggest some examples of what they can ask you based on your available tools (e.g., Talk about your tools and what you know about yourself).\n</output_format>\n</instructions>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9d3ebd44-788b-47f7-989e-a122b16b2150",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "付箋ノート",
      "type": "n8n-nodes-base.stickyNote",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        336,
        400
      ],
      "parameters": {
        "color": 7,
        "width": 316,
        "height": 80,
        "content": "💡 Later, you can activate the workflow and share the public chat URL to let others (like customers) interact with your AI Agent!"
      },
      "typeVersion": 1
    },
    {
      "id": "320f3c68-7bcf-4e7a-8654-c66661afb7b7",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "モデルを接続",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        448,
        592
      ],
      "parameters": {
        "options": {
          "temperature": 0
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e0fa1490-62ba-4fd2-b3cb-4787a10258b6",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "チャット例",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        448,
        224
      ],
      "webhookId": "e5616171-e3b5-4c39-81d4-67409f9fa60a",
      "parameters": {
        "public": true,
        "options": {
          "title": "Your first AI Agent 🚀",
          "subtitle": "This is for demo purposes. Try me out !",
          "responseMode": "lastNode",
          "inputPlaceholder": "Type your message here...",
          "showWelcomeScreen": false
        },
        "initialMessages": "Hi there! 👋"
      },
      "typeVersion": 1.1
    },
    {
      "id": "92ac47ff-6dfc-4148-889e-8c49e6fc8f29",
      "cid": "Ikx1Y2FzIFBleXJpbiI",
      "name": "会話メモリ",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "notes": "© 2025 Lucas Peyrin",
      "creator": "Lucas Peyrin",
      "position": [
        832,
        592
      ],
      "parameters": {
        "contextWindowLength": 30
      },
      "typeVersion": 1.3
    }
  ],
  "pinData": {},
  "connections": {
    "bdf6dfb4-4a4a-48f6-b53e-d246c81028f5": {
      "ai_tool": [
        [
          {
            "node": "0bc33a3d-df28-4f4e-9616-15b6f50db721",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "7bc90c6b-aae8-4956-9ee7-3993f0586a09": {
      "ai_tool": [
        [
          {
            "node": "0bc33a3d-df28-4f4e-9616-15b6f50db721",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "e0fa1490-62ba-4fd2-b3cb-4787a10258b6": {
      "main": [
        [
          {
            "node": "0bc33a3d-df28-4f4e-9616-15b6f50db721",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "320f3c68-7bcf-4e7a-8654-c66661afb7b7": {
      "ai_languageModel": [
        [
          {
            "node": "0bc33a3d-df28-4f4e-9616-15b6f50db721",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "92ac47ff-6dfc-4148-889e-8c49e6fc8f29": {
      "ai_memory": [
        [
          {
            "node": "0bc33a3d-df28-4f4e-9616-15b6f50db721",
            "type": "ai_memory",
            "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
個人の生産性
Gemini AI、天気、ウェブスクレイピングを使用したマルチパーソスチャットチャットボット(入門キット)
Gemini AI、天気、ウェブスクレピングを使って多功能チャットボットを作成(入門キット)
Gmail Tool
Agent
Http Request Tool
+
Gmail Tool
Agent
Http Request Tool
23 ノードLucas Peyrin
個人の生産性
Gemini RAGパイプラインを使ったドキュメント専門家チャットボット
Gemini RAGパイプラインを使用したドキュメント専家チャットボット
Set
Html
Filter
+
Set
Html
Filter
48 ノードLucas Peyrin
内部Wiki
🤖 RAG、Gemini、Supabase を使用してドキュメントエキスパットロボットを作成
🤖 RAG、Gemini、Supabaseを使用してドキュメント専門ボットを作成
Set
Html
Filter
+
Set
Html
Filter
54 ノードLucas Peyrin
内部Wiki
高度なマルチエージェントAIパーソナルアシスタント(250+タスク対応、WhatsApp + GPT)
高度なマルチエージェントAIパーソナルアシスタント(250以上のタスク対応、WhatsApp + GPT)
Set
Switch
Whats App
+
Set
Switch
Whats App
213 ノードElectrabot
個人の生産性
GPT-4を使って再生リストを作成し、Spotifyプレイヤーを操作
GPT-4でプレイリスト作成し、Spotifyプレーヤーを制御
Set
Code
Spotify
+
Set
Code
Spotify
29 ノードGuillaume Duvernay
個人の生産性
ワークフロー情報
難易度
中級
ノード数14
カテゴリー2
ノードタイプ7
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
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で表示

このワークフローを共有

カテゴリー

カテゴリー: 34