AI Flight Search and Comparison Assistant using DeepSeek and SerpAPI - n8n Workflow

Use this interactive n8n workflow template to deploy a conversational AI agent powered by DeepSeek and SerpApi for real-time flight searching, comparing, and booking recommendations.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Travel Technology Developers: Building prototypes for travel search engines or conversational booking systems.
n8n Automation Specialists: Looking for advanced n8n templates demonstrating LLM agent capabilities with external tools.
Customer Service Teams: Seeking to automate initial travel inquiry handling and data collection.
Users of DeepSeek AI: Wanting to integrate the DeepSeek n8n node into a practical, data-fetching automation.

Overview

This comprehensive n8n workflow solves the complexity of real-time flight data retrieval by integrating a conversational AI agent directly with a powerful search API. The agent, configured via the AI Agent n8n node, interacts with the user, intelligently collecting necessary details (departure/arrival codes, dates, trip type) step-by-step. Only once all prerequisites are met does the agent utilize the specialized SerpApi n8n node to search Google Flights data. This n8n automation delivers structured, prioritized flight options and booking links back to the user, providing a superior, personalized experience compared to traditional static forms. It is a prime example of leveraging advanced AI in an n8n workflow for high-value tasks.

How it Works

The entire process is initiated by the Chat n8n trigger, which provides a live webhook endpoint for interaction (e.g., via a chat interface).


  1. Trigger: A user sends a query to the configured Chat n8n trigger.

  2. Agent Logic: The query passes to the AI Agent n8n node. This agent is powered by the DeepSeek Chat Model n8n node and maintains context using the Simple Memory n8n node.

  3. Data Collection: The agent's system prompt dictates that it must collect five specific pieces of information (departureid, arrivalid, outbounddate, type, returndate) conversationally. It will continue prompting the user if data is missing.

  4. Tool Execution: Once all data is collected, the agent executes the Googleflights search in SerpApi n8n node.

  5. Parameter Mapping: Crucially, the SerpApi n8n node uses dynamic expressions (e.g., ={{ $fromAI('departureid') }}) to pull the collected variables directly from the AI Agent's thought process.

  6. Response Generation: The agent receives the real-time flight results and summarizes the top three options in a friendly, professional format, offering corresponding booking links if requested. This entire n8n workflow ensures a smooth, data-driven conversation.

Installation Guide

To implement this advanced n8n template, follow these steps:


  1. Import the Workflow: Copy the provided JSON and import it directly into your n8n instance using the 'New' button and 'Import from JSON' option.

  2. Set Up DeepSeek Credentials: Locate the 'DeepSeek Chat Model' n8n node. You will need to create or select your DeepSeek API credentials.

  3. Set Up SerpApi Credentials: Locate the 'Google_flights search in SerpApi' n8n node. You must provide valid SerpApi API credentials to enable the Google Flights search functionality.

  4. Activate the Trigger: The 'Chat' n8n trigger is set to 'Webhook' mode. Save the n8n workflow and click 'Activate' to generate the unique webhook URL for interaction.

  5. Test: Interact with the generated webhook URL via a client or chat interface to start the flight booking conversation. Ensure your n8n node connections are green for proper function.

Node Details

Chat (n8n trigger): This is the entry point, configured as a public webhook to initiate the conversational n8n workflow.
AI Agent (n8n node): The core intelligence. It is configured with a complex system message defining its role as a travel assistant, enforcing sequential data collection before using its attached tool.
DeepSeek Chat Model (n8n node): Serves as the Large Language Model (LLM) for the AI Agent, handling conversational reasoning and response generation.
Simple Memory (n8n node): Used to maintain the context of the ongoing conversation, ensuring the AI Agent remembers previously provided flight details throughout the n8n workflow.


  • Googleflights search in SerpApi (n8n node): Acts as the external tool the agent can call. Its function is googleflights. Key configuration involves using $fromAI expressions to dynamically map the collected departureid, arrivalid, outbounddate, and returndate from the AI Agent into the SerpApi query.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Automation expert specialized in n8n. I design and build AI-powered workflows that streamline operations, automate lead generation, and enhance customer engagement. Passionate about low-code automation and integrating tools like OpenAI, WhatsApp, Slack, and CRMs. Organizer of n8n events in Pakistan, helping businesses scale with smart, efficient automation systems.

Featured*