{
  "name": "Meeting Preparation Agent",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        -256,
        -16
      ],
      "id": "c5c5d484-2f44-48ca-9a3c-2fb1679394f0",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful meeting preparation agent who helps people find a specific company's information, fetch the latest news from any company, and prepare interview questions for a specific company (for a specific role). Your task is to find company info, Recent company news, and generate the most asked interview questions in a specific company (for a specific role also) for the user. \n\nUser query: {{ $json.chatInput }}\n\nTools Definition\n----------------\n\nYou have access to LLM, memory, and all connected tools. This is a recommended thing to do: \n\n1. If a user asks to find basic information about any company or interview questions from a specific company, then it is recommended to use the Tavily API tool. Send a query, get a web search API response, analyze, and answer the user. \n\n2. If a user asks about the latest news from any company, then its recommanded to use another node, which is the NewsAPI HTTP request node. \n\nImportant query parameters that you can consider and set for fetching the latest company news with NewsAPI:\n\nq \u2013 Company name or keyword(s) to search in title and body; supports exact phrases with quotes, boolean operators, and +/- for required/excluded words\n\nfrom \u2013 Oldest article date (ISO 8601: YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ) to limit results to recent news (e.g., last 7 days)\n\nto \u2013 Newest article date (optional; leave blank to get up-to-the-minute latest)\n\nsortBy \u2013 Sort order: relevancy (most related to q), popularity (popular sources), or publishedAt (newest first); default is publishedAt\n\nlanguage \u2013 2-letter ISO language code (e.g., en, in, de) to restrict articles to a specific language\n\nsearchIn \u2013 Fields to restrict q search to: title, description, content (comma-separated, e.g., title, content)\n\nqInTitle \u2013 Search keyword(s) only in the article title (e.g., \"Tesla Inc\" for stricter company match)\n\nsources \u2013 Comma-separated list of news source IDs (max 20) to restrict results to specific publishers\n\n----\n\nKeep output straightforward, and include emojis for an engaging reading experience. Use bullet points when required. If possible, you can add references to web sources at the end of the response. "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        -48,
        -16
      ],
      "id": "6ff6fb69-a422-4ce4-85dc-c161ecd0fe7f",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1.1,
      "position": [
        -192,
        192
      ],
      "id": "6b7ae17f-b0b1-4f86-8a2b-dd1d9e999346",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.4,
      "position": [
        -32,
        192
      ],
      "id": "bff6bf21-8eae-432c-a239-3d1afb669f1b",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
        "options": {
          "max_results": 10
        }
      },
      "type": "@tavily/n8n-nodes-tavily.tavilyTool",
      "typeVersion": 1,
      "position": [
        336,
        176
      ],
      "id": "5070baf2-5c74-4fdd-8296-da486aef2363",
      "name": "Search in Tavily",
      "credentials": {
        "tavilyApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "https://newsapi.org/v2/everything",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}"
            },
            {
              "name": "from",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', ``, 'string') }}"
            },
            {
              "name": "to",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters2_Value', ``, 'string') }}"
            },
            {
              "name": "shortBy",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters3_Value', ``, 'string') }}"
            },
            {
              "name": "language",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters4_Value', ``, 'string') }}"
            },
            {
              "name": "searchIn",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters5_Value', ``, 'string') }}"
            },
            {
              "name": "qInTitle",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters6_Value', ``, 'string') }}"
            },
            {
              "name": "sources",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters7_Value', ``, 'string') }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "YOUR_NEWSAPI_KEY"
            }
          ]
        },
        "options": {},
        "optimizeResponse": true
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.4,
      "position": [
        160,
        176
      ],
      "id": "bab2d011-e7e3-45fc-b38f-83a2ec5c7566",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "content": "NewsAPI (https://newsapi.org/account):\n YOUR_NEWSAPI_KEY\n\n\nTavily Web Search API (https://app.tavily.com/home): \n\nYOUR_TAVILY_API_KEY",
        "height": 256,
        "width": 352,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -16
      ],
      "typeVersion": 1,
      "id": "31337bc3-e4a5-412a-b906-490b5799a163",
      "name": "Sticky Note"
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Search in Tavily": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "staticData": null,
  "triggerCount": 0,
  "meta": {
    "templateCredsSetupCompleted": true
  }
}