🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Telegram + OpenAI: instant best price replies

Lisa Granqvist Partner Workflow Automation Expert

Price-checking a product sounds simple until you’re juggling search results, sponsored listings, region-specific Amazon pages, and “out of stock” traps. Then you copy a number into a chat, someone questions it, and you’re back to tab-hopping again.

This Telegram price automation is a lifesaver for marketers validating offers, founders doing quick market checks, and agency folks who need client-ready numbers without the mess. You send a product name. You get a clean “best price” reply back in Telegram. Fast.

Below, you’ll see how the workflow pulls sources reliably (without getting blocked), uses OpenAI to extract the real price, and replies in a format you can share with confidence.

How This Automation Works

See how this solves the problem:

n8n Workflow Template: Telegram + OpenAI: instant best price replies

The Challenge: Quick price checks turn into a time sink

You just want a straight answer: “What’s the lowest price for this product right now?” But manual checking usually means opening Google, scanning a page full of ads, clicking into marketplaces, and then wrestling with pages that load differently by country or account state. If you’re doing this for a team, it gets worse. One person sees a price, another sees a different seller, and now you’re debating screenshots instead of making a decision. Honestly, the mental load is the real cost, because it steals focus at the exact moment you’re trying to move fast.

It adds up fast. Here’s where it breaks down in real life.

  • Google results are noisy, and sponsored listings often look like “real” deals.
  • Amazon and similar sites frequently block scraping attempts, so DIY bots fail right when you need them.
  • Even when a page loads, the price is buried in messy HTML, which makes manual copy-paste surprisingly error-prone.
  • People share different formats (“EGP 12,999”, “12.9k”, “$260”), and the conversation turns into clarification instead of action.

The Fix: Telegram-to-AI best price replies (without blocked scraping)

This workflow turns a simple Telegram message into a reliable best-price summary you can trust. You message your bot something like “Sony XM5”. The automation builds smart search queries, asks Decodo to run a Google lookup, then collects valid product URLs. From there, it scrapes those pages through Decodo (which handles the tricky proxy and fingerprinting parts so requests don’t get blocked), cleans up the HTML, and scores how well each page matches the product you asked for. Finally, an AI extraction assistant paired with the OpenAI Chat Model reads the cleaned text, ignores clutter like ads or unrelated modules, pulls out the product name and price, and sends a clear “Best Price” reply back to Telegram.

The workflow starts in Telegram, then branches into Amazon and non-Amazon sources so each can be handled properly. It loops through results in batches, selects the top matches, and combines them into one context for OpenAI. The output is a tidy message you can forward to your team without rewriting it.

What Changes: Before vs. After

Real-World Impact

Say you check 10 products per week for campaigns or client work. Manually, you might spend about 10 minutes searching and opening pages, plus another 10 minutes confirming the price and sharing it cleanly, so call it about 20 minutes per product. That’s roughly 3 hours a week. With this workflow, you send 10 Telegram messages (maybe 2 minutes total), wait for processing, and you’re done. You get those 3 hours back, and the answers are more consistent.

Requirements

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram Bot to receive and send messages.
  • Decodo for Google lookup and reliable scraping.
  • OpenAI API key (get it from your OpenAI dashboard).

Skill level: Intermediate. You’ll connect accounts, add API keys, and tweak a prompt/query if you want different stores.

Need help implementing this? Talk to an automation expert (free 15-minute consultation).

The Workflow Flow

Telegram message triggers the lookup. You send a product name to your bot, and n8n receives it through the Telegram trigger with your webhook configured.

Search queries are composed, then Decodo runs the Google search. The workflow builds queries aimed at marketplaces (for example, Amazon.eg) and requests results through Decodo so you get usable URLs without the usual scraping headaches.

URLs are split into Amazon vs. other sources, then scraped in batches. Each branch loops over links, fetches page content safely with Decodo, and sanitizes the HTML so the next step doesn’t choke on noise.

OpenAI extracts the best price and returns a clean reply. The automation scores matches, selects top candidates, merges results into a single context, and the AI agent pulls out the product name and lowest price before sending your Telegram response.

You can easily modify the store targets in the search query to include Noon or Carrefour based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Telegram Trigger

This workflow starts when a user sends a message to Telegram. You’ll capture the incoming query and use it throughout the workflow.

  1. Add and open Telegram Intake Trigger.
  2. Keep Updates set to message.
  3. Credential Required: Connect your Telegram Bot API credentials.
  4. Leave Additional Fields empty unless you need custom filters.

The Flowpast Branding sticky note is optional and does not affect execution.

Step 2: Build Search Queries and Fetch URLs

These nodes create store-specific search queries, run a Google search, and collect valid URLs for scraping.

  1. Open Compose Search Queries and keep the provided JavaScript (it generates queries for Amazon and Jumia).
  2. In Google Lookup Request, set Query to {{ $json.query }}, Operation to google_search, and Results Limit to 1.
  3. Credential Required: Connect your Decodo credentials in Google Lookup Request.
  4. In Collect Valid URLs, keep the JavaScript that deduplicates and limits URLs to 20.

⚠️ Common Pitfall: If Decodo credentials are missing, Google Lookup Request will return empty results and the workflow will not proceed.

Step 3: Route URLs and Loop Through Amazon vs Other Stores

The workflow separates Amazon links from other stores and processes them in batches.

  1. In Route Amazon vs Others, set the condition to String → Contains with Left Value {{ $json.url }} and Right Value amazon.
  2. Ensure Route Amazon vs Others routes true to Batch Loop Amazon and false to Batch Loop Other.
  3. In both Batch Loop Amazon and Batch Loop Other, leave Options empty to iterate through all URLs.

Step 4: Scrape and Clean Page Content

Each URL is scraped and sanitized before scoring relevance. This step covers Amazon-specific and general page scraping.

  1. In Amazon Page Scraper, set URL to {{ $('Collect Valid URLs').item.json.url }}, Operation to amazon, and Parse to false.
  2. Credential Required: Connect your Decodo credentials in Amazon Page Scraper and General Page Scraper.
  3. In General Page Scraper, set URL to {{ $json.url }}.
  4. Keep the existing JavaScript in Sanitize Amazon HTML and Sanitize Other HTML to remove scripts, styles, and HTML tags.

There are multiple code nodes in this workflow (9 total). Focus on the critical ones: Compose Search Queries, Collect Valid URLs, the two Sanitize nodes, both Score nodes, and both Select Top nodes.

Step 5: Score Matches and Select the Best Result

Both Amazon and non-Amazon pages are scored for relevance against the user’s Telegram message, then the highest match is selected.

  1. Keep the JavaScript in Score Amazon Match and Score Other Match (they dynamically compare the page text against the Telegram query).
  2. Ensure Score Amazon Match routes back into Batch Loop Amazon and Score Other Match routes back into Batch Loop Other.
  3. Keep the JavaScript in Select Top Amazon and Select Top Other to select the highest scoring match.
  4. Verify Select Top Amazon and Select Top Other both feed into Combine Result Sets.

Step 6: Merge Context and Configure AI Extraction

The results are combined, formatted, and sent to an AI agent for final comparison output.

  1. In Combine Result Sets, leave the default merge behavior to unify Amazon and other results.
  2. In Assemble Context Text, keep the JavaScript that outputs text (this field name is required).
  3. In AI Extraction Assistant, set Text to User search intent: {{ $('Telegram Intake Trigger').first().json.message.text }} Scraped data (multiple sources): {{ $json.text }}.
  4. Open OpenAI Chat Model and select Model gpt-4o-mini.
  5. Credential Required: Connect your OpenAI credentials in OpenAI Chat Model. It is the language model used by AI Extraction Assistant.

Step 7: Configure the Telegram Response

The AI’s output is sent back to the Telegram user who started the workflow.

  1. Open Send Telegram Response and set Text to {{ $json.output }}.
  2. Set Chat ID to {{ $('Telegram Intake Trigger').item.json.message.chat.id }}.
  3. Credential Required: Connect your Telegram Bot API credentials in Send Telegram Response.

Step 8: Test and Activate Your Workflow

Run a manual test to confirm everything works, then activate the workflow for ongoing use.

  1. Click Execute Workflow and send a product name to your Telegram bot.
  2. Verify that Google Lookup Request returns URLs, and that AI Extraction Assistant produces a single response message.
  3. Confirm the bot replies in Telegram via Send Telegram Response.
  4. Toggle the workflow to Active to run it in production.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Watch Out For

  • Decodo credentials can expire or need specific permissions. If things break, check your Decodo API key and usage status in the Decodo dashboard first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Common Questions

How quickly can I implement this Telegram price automation automation?

About an hour if you already have your API keys.

Can non-technical teams implement this price reply automation?

Yes, but you’ll want someone comfortable with connecting accounts and pasting credentials. No coding is required unless you want to change how queries are built.

Is n8n free to use for this Telegram price automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage and your Decodo plan.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

How do I adapt this Telegram price automation solution to my specific challenges?

You can widen or narrow the store coverage by editing the query logic in the “Compose Search Queries” part of the workflow. If you prefer a different AI provider, swap the OpenAI Chat Model for Claude or Gemini in the model node and keep the same extraction instructions in the AI agent. Common tweaks include changing which domains you search (Noon, Carrefour), adjusting the reply tone, and logging searches to Google Sheets for trend tracking.

Why is my Telegram connection failing in this workflow?

Most of the time it’s a webhook issue or the bot token is wrong. Confirm the bot token in your Telegram node, then verify your webhook is actually set so the bot can “hear” messages. If it works once and then stops, regenerate the token and re-save credentials in n8n.

What’s the capacity of this Telegram price automation solution?

On a typical n8n Cloud plan, you’re mainly limited by executions per month and how many URLs you scrape per request. If you self-host, the practical limit becomes your server size plus your Decodo and OpenAI rate limits, not n8n itself. For many small teams, handling dozens of lookups a day is realistic. If you expect hundreds a day, you’ll want tighter batching and stricter filtering so you scrape fewer pages per query.

Is this Telegram price automation automation better than using Zapier or Make?

Often, yes. This workflow relies on branching, batching, and custom parsing logic, and n8n tends to handle that kind of “real workflow” better without turning every path into extra cost. Zapier or Make can still work if you keep the flow simple, but scraping + AI extraction usually gets clunky fast. Also, self-hosting n8n is a big deal if you plan to scale. If you want a sanity check, Talk to an automation expert and we’ll map it to your volume and tools.

Once this is running, price checks become a quick message instead of a mini research project. The workflow handles the repetitive digging so you can make the call and move on.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal