This powerful n8n workflow automatically finds active promo codes using an AI agent (Gemini 2.5 Pro) and SerpAPI, caches results in a Data Table, and notifies users via Telegram or Gmail.
Download this n8n workflow template and start using it instantly.
Individuals or businesses looking for powerful n8n templates that combine real-time web search with AI validation.
E-commerce marketers needing an automated tool to track competitor discounts or offer customer service via bot.
Developers wanting to study a complex n8n workflow integrating LangChain agents, multiple triggers, and internal caching mechanisms.
Users seeking to leverage the n8n Data Table functionality for efficient data storage and retrieval.
Finding valid and active discount codes manually is time-consuming. This robust n8n workflow automates the entire process. It uses a specialized AI agent, powered by the Gemini 2.5 Pro language model and the SerpAPI web search tool, to actively hunt for current vouchers. A core feature of this n8n automation is the efficiency gained through caching. Before searching, the n8n workflow checks an internal Data Table. If a valid code for the requested platform is found, it is delivered instantly, saving API costs and search latency. This versatile n8n workflow is activated by multiple n8n trigger points, making it easy to integrate into existing communication channels.
The process begins when an n8n trigger is activated, which can be a Telegram message, a submitted web form, or a direct API call (Webhook).
Set n8n node.Get row(s) n8n node to check for cached, valid promo codes for the requested platform.If n8n node checks the results.Telegram n8n node and the Gmail n8n node.Promo Seeker Agent n8n node executes a complex search strategy. It uses the Gemini 2.5Pro model and the SerpAPI n8n node to find recent codes (posted within the last 30 days) and validates their relevance.Structured Output Parser ensures the AI's natural language response is converted into a reliable JSON format, ready for database insertion.Upsert row(s) n8n node saves the newly found promo code into the Data Table, ensuring this n8n workflow is optimized for future requests.Send a message n8n node.platform (string), promoCode (string), value (string), termsConditions (string), and validUntil (dateTime). Telegram Trigger, On form submission, Webhook: These are the multiple n8n trigger points that initiate this automation. They collect the platform request from different user channels.
Set (Platform) n8n node: Prepares the data, extracting the platform query and the recipient details from the various n8n trigger inputs, ensuring consistent data flow throughout the n8n workflow.
Get row(s) n8n node (Data Table): Performs the crucial caching check. It queries the Data Table for existing, valid promo codes matching the requested platform.
If (Code Exist?) n8n node: Routes the flow. If data exists from the Data Table, it skips the AI search; otherwise, it initiates the expensive external calls.
Promo Seeker Agent n8n node: The centralized AI logic. This LangChain n8n node uses a structured system message to instruct the Gemini 2.5 Pro model (via OpenRouter) to prioritize current codes using the integrated search tool.
Gemini 2.5Pro (OpenRouter) n8n node: Provides the large language model necessary for the agent to analyze search results and synthesize a structured response.
SerpAPI n8n node: Functions as the external web search tool for the AI agent, providing real-time data on active promo codes, essential for this n8n workflow.
Structured Output Parser n8n node: Enforces a predefined JSON schema on the AI's output, ensuring that the structured data (code, value, expiration) can be reliably inserted into the database.
Upsert row(s) n8n node (Data Table): Saves the newly generated, validated promo code data into the Data Table, effectively maintaining the cache and improving future performance of the n8n workflow.
Telegram and Gmail n8n nodes: Final action nodes that format and deliver the promo code details to the user via their specified communication channel, concluding the n8n workflow.
Use this n8n workflow to automatically search Getty Images, extract image IDs, and retrieve the official embed code (iframe) for seamless integration into your CMS.

Use this advanced n8n workflow to generate realistic product visualizations via AI, convert them into dynamic videos, and instantly publish content across TikTok, Instagram, and YouTube.

Automate commercial video production. This n8n workflow uses a Telegram trigger to accept a product photo, leverages AI for image enhancement, and generates a 8-second vertical marketing video using Veo 3.1.

Use this advanced n8n workflow to analyze new YouTube videos, find relevant discussion threads on Reddit, and generate humanized, relevant promotional comments using AI and Google Sheets for an approval queue.

Use this advanced n8n workflow to harness Gemini 2.0 for precise, prompt-based object detection in images. Learn how to scale normalized coordinates using a custom n8n node.








































