🤖 Promo seeker: Auto-find promo codes with SerpAPI, Gemini & Telegram

⚡ 455 views · 🤖 AI Chatbots & Agents

💡 Pro Tip — HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it — it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

Never pay full price from ignorance again. Promo Seeker finds, verifies, and delivers active promo codes via Telegram or email using SerpAPI + Gemini (OpenRouter). A 2-hour manual hunt becomes a 5-minute query, with results deduplicated into an n8n Data Table for instant reuse.

Last updated: September 2026.

Why Use This Workflow?

Time Savings: Manual promo hunting drops from ~2 hours to ~5 minutes per query.

Cost Reduction: Less need for paid scraping tools or manual services. Potential savings of $50–$200/month.

Error Prevention: Cross-referenced sources plus a 30-day recency filter cut expired-code hits by ~60% versus single-source checks.

Scalability: Hundreds of queries per day with Data Table upserts and optional scheduling for continuous discovery.

Ideal For

How It Works

  1. Trigger: Incoming request via Webhook, Telegram message, Google Form submission, or scheduled run.
  2. Data Collection: The LangChain agent uses SerpAPI search results and Gemini (OpenRouter) to locate recent promo codes.
  3. Processing: Filter for recency (last 30 days), extract code, value, terms, and expiry.
  4. Intelligence Layer: Gemini 2.5 Pro (OpenRouter) + LangChain agent structure and verify results, outputting standardized JSON.
  5. Output & Delivery: If a code exists in the Data Table, notify the requester via Telegram and Gmail; otherwise, return results and upsert them into the Data Table.
  6. Storage & Logging: Results stored and upserted in an n8n Data Table to prevent duplicates and enable fast lookups.

Setup Guide

Prerequisites

RequirementTypePurpose
n8n instanceEssentialExecute the workflow. Import the JSON and begin configuration
SerpAPI accountEssentialWeb search results for promo code discovery
OpenRouter (Gemini) accountEssentialLanguage model (Gemini 2.5 Pro) for extraction and verification
Telegram Bot (BotFather)EssentialReceive queries and send promo notifications
Gmail OAuth2EssentialSend rich email notifications
n8n Data TablesEssentialStore and deduplicate promo code records

Installation Steps

  1. Import the JSON workflow into your n8n instance.
  2. Configure credentials (use n8n’s Credentials UI — do NOT paste keys into nodes):
    • SerpAPI: paste your SerpAPI API Key from your SerpAPI dashboard.
    • OpenRouter API: paste your OpenRouter API Key (for Gemini 2.5 Pro).
    • Telegram API: create bot via @BotFather, then add Bot Token to Telegram credentials.
    • Gmail OAuth2: use n8n’s Gmail OAuth2 credential flow and authorize the account.
  3. Update environment-specific values:
    • Webhook path: /v1/promo-seeker (configured in the Webhook node) or replace with your preferred path.
    • Data Table ID: point to your own Data Table
    • Form/webhook recipient fields (email/chatId mappings).
  4. Customize settings:
    • Adjust the LangChain agent prompt (Promo Seeker Agent) for different recency windows or regional focus.
    • Change max results/limit on the Data Table node (default limit = 3).
  5. Test execution:
    • Trigger via Telegram or a POST to the webhook with sample payload:
      { "platform":"example.com", "email":"you@domain.com" }
    • Confirm notifications arrive and Data Table rows are upserted.

Technical Details

Core Nodes

NodePurposeKey Configuration
SerpAPIFetch web search resultsProvide credential; adjust search params in agent prompt
Gemini 2.5Pro (OpenRouter)Extract & verify promo detailsUse OpenRouter credential; model google/gemini-2.5-pro
Promo Seeker Agent (LangChain)Orchestrates search + parsingSystem prompt enforces 30‑day recency & result format
Structured Output ParserValidates agent outputJSON schema example for platform/code/value/terms/validUntil
Data Table (Get row(s))Lookup existing promosFilters by platform; limit = 3
If (Code Exist?)Branching logicChecks existence of platform field
Data Table (Upsert row(s))Insert or update promoMapping from agent output to Data Table columns
Telegram Trigger / TelegramReceive queries & notify usersWebhook-based trigger; parse_mode = HTML for messages
GmailSend rich HTML emailsUses Gmail OAuth2 credential
Webhook / Form TriggerAlternate inputsWebhook path /v1/promo-seeker and Form trigger for manual submissions

Workflow Logic

Customization Options

Basic Adjustments

Advanced Enhancements

Performance & Optimization

MetricExpected PerformanceOptimization Tips
Execution time8–30s per new search (depends on SerpAPI + LM response)Reduce SerpAPI page depth; cache recent results
API calls3–10 SerpAPI calls per complex queryBatch queries; use higher-quality search params
Error handlingAgent retries on malformed outputUse retry nodes and set onError strategy for downstream nodes

Troubleshooting

ProblemCauseSolution
No results returnedQuery too vague or rate-limited APIImprove query specificity; check SerpAPI quota
Gmail send failsOAuth scope not granted or token expiredReconnect Gmail OAuth2 credential in n8n
Telegram webhook not firingIncorrect bot token or webhook setupRecreate Telegram credential and check bot permissions
Duplicate rowsUpsert mapping mismatchEnsure promoCode mapping in Upsert matches structured output
Agent returns malformed JSONLM prompt too permissiveTighten the agent system prompt and validate with Structured Output Parser

Quick Answers

How fresh are the codes?
Results pass a 30-day recency filter, cutting expired-code hits by ~60% versus single-source checks.
Do I get duplicates?
No. Every result is upserted into a Data Table keyed for deduplication and fast lookup.
How do I ask for codes?
Via Telegram message, Google Form, webhook POST, or scheduled runs. Answers come back on Telegram and Gmail.

Made by: khmuhtadin Category: Marketing Automation

Tags: promo-codes, coupons, serpapi, telegram, gmail, openrouter, data-tables

Need custom workflows or help adapting this template? Contact me

Additional info

Built with n8n. Need an assessment on your business? Feel free to reach out at https://khmuhtadin.com/consultation/

🔗 Nodes Used

Webhook, Telegram, Telegram Trigger, Gmail, Schedule Trigger, AI Agent

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup