AutomationFlowsAI & RAG › Search and Compare Flights with Deepseek AI and Google Flights API

Search and Compare Flights with Deepseek AI and Google Flights API

ByFakhar Khan @fakharkhan on n8n.io

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Takes departure city, destination, and travel dates from the user. Searches multiple airlines for flight options and compares price, duration, and stops. Suggests flexible travel…

Chat trigger trigger★★☆☆☆ complexityAI-powered5 nodesAgentLm Chat Deep SeekN8N Nodes SerpapiMemory Buffer WindowChat Trigger
AI & RAG Trigger: Chat trigger Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7322 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c96208f6-6159-4a2d-bda6-8e45964a1b37",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        280,
        0
      ],
      "parameters": {
        "options": {
          "systemMessage": "=You are a helpful and intelligent AI travel assistant. Your job is to guide users through booking flights by collecting essential travel details step-by-step, and then using the attached SerpAPI Tool to search for real-time flight options.\n\nCurrent Date Time is: {{ $now }}\n\nBefore using the tool, you must collect the following:\n- `departure_id`: IATA code for departure airport (e.g., ISB)\n- `arrival_id`: IATA code for arrival airport (e.g., DXB)\n- `outbound_date`: Date of departure in YYYY-MM-DD format\n- `type`: Either \"one-way\" or \"round-trip\"\n- `return_date`: Only required if the trip is \"round-trip\"\n\nIf any of these fields are missing, ask the user politely and clearly to provide the missing information. Do not proceed to search until all required fields are available.\n\nOnce all fields are collected:\n1. Call the attached **SerpAPI Tool** to search for available flights.\n2. Summarize the top 3 options in the following format:\n\n---\n\u2708\ufe0f *Flights from ISB to DXB on 2025-07-25*\n\n1. Emirates \u2013 $420 \u2013 3h 40m \u2013 Nonstop  \n2. Qatar Airways \u2013 $390 \u2013 6h \u2013 1 stop (via Doha)  \n3. FlyDubai \u2013 $350 \u2013 4h 20m \u2013 Nonstop  \n\nWould you like to book one of these?\n---\n\nIf the user provided a return date, add:\n\ud83d\udeec *Return on 2025-08-01*\n\nIf no flights are found, say:\n> \u201cSorry, I couldn\u2019t find any flights for that route and date. Try a different date or nearby airport?\u201d\n\nIf the user selects a specific flight (e.g., \"book the second one\" or \"I want FlyDubai\"), respond with the corresponding **booking link** from the tool results.\n\nBe conversational, clear, and concise. Never assume \u2014 always confirm missing information before searching. Your tone should be helpful, friendly, and professional."
        }
      },
      "typeVersion": 2
    },
    {
      "id": "a9171c94-e59e-4120-9de9-7c98f1bf20c2",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        160,
        224
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "deepSeekApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "eab49a45-bd0d-4073-ad37-0ccde982aab9",
      "name": "Google_flights search in SerpApi",
      "type": "n8n-nodes-serpapi.serpApiTool",
      "position": [
        592,
        208
      ],
      "parameters": {
        "operation": "google_flights",
        "arrival_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Arrival_airport_code___location_kgmid__arrival_id_', ``, 'string') }}",
        "return_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_Date__return_date_', ``, 'string') }}",
        "departure_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Departure_airport_code___location_kgmid__departure_id_', ``, 'string') }}",
        "outbound_date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Outbound_Date__outbound_date_', ``, 'string') }}",
        "requestOptions": {},
        "descriptionType": "manual",
        "toolDescription": "Search for live flights from one city to another using Google Flights data",
        "additionalFields": {}
      },
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7f867f93-235a-46ba-8c9c-13c52e0c5945",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        368,
        224
      ],
      "parameters": {
        "contextWindowLength": 20
      },
      "typeVersion": 1.3
    },
    {
      "id": "299b9f43-ba5f-4bd0-9fb6-e16e64a40e76",
      "name": "Chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "mode": "webhook",
        "public": true,
        "options": {}
      },
      "typeVersion": 1.1
    }
  ],
  "connections": {
    "Chat": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google_flights search in SerpApi": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Takes departure city, destination, and travel dates from the user. Searches multiple airlines for flight options and compares price, duration, and stops. Suggests flexible travel…

Source: https://n8n.io/workflows/7322/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Description: Overview This workflow generates automated revenue and expense comparison reports from a structured Google Sheet. It enables users to compare financial data across the current period, las

Lm Chat Deep Seek, Memory Buffer Window, Tool Workflow +4
AI & RAG

This workflow connects SerpApi with OpenAI inside n8n to automate Google News monitoring and analysis.

N8N Nodes Serpapi, OpenAI Chat, Memory Buffer Window +2
AI & RAG

AI Agent : Google calendar assistant using OpenAI. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, googleCalendarTool. Chat trigger; 13 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +2
AI & RAG

OpenSea AI-Powered Insights via Telegram. Uses chatTrigger, telegramTrigger, lmChatOpenAi, memoryBufferWindow. Chat trigger; 13 nodes.

Chat Trigger, Telegram Trigger, OpenAI Chat +4
AI & RAG

Build an MCP server with Airtable. Uses chatTrigger, agent, memoryBufferWindow, mcpClientTool. Chat trigger; 13 nodes.

Chat Trigger, Agent, Memory Buffer Window +4