Telegram + Amazon, smarter product picks via Gemini
Amazon research looks easy until you’re 12 tabs deep, comparing “similar” products with weird naming, missing context, and reviews that don’t actually answer your question.
Telegram Amazon picks hits hardest when you’re moving fast. A marketing lead planning giveaways, an e-commerce operator sizing up competitors, or a consultant putting together options for a client all run into the same time sink.
This workflow lets you message a product query in Telegram and get Gemini-ranked recommendations back in under a minute, with clean links and categories. You’ll see what it automates, the results you can expect, and what you need to run it reliably.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Telegram + Amazon, smarter product picks via Gemini
flowchart LR
subgraph sg0["Telegram Intake Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram Intake Trigger"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Derive Chat and Search", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Decodo Product Lookup", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Transform Product Records"]
n5@{ icon: "mdi:robot", form: "rounded", label: "Compose Recommendations", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Dispatch Final Reply"]
n7@{ icon: "mdi:robot", form: "rounded", label: "Validate Item Query", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Parse Validation Result", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Verify Query Status", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send Invalid Notice"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Post Processing Update"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send Valid Acknowledgement"]
n13@{ icon: "mdi:brain", form: "rounded", label: "Gemini Flash Model", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Pause Briefly", pos: "b", h: 48 }
n3 --> n4
n14 --> n11
n13 -.-> n5
n13 -.-> n7
n0 --> n7
n0 --> n14
n2 --> n3
n4 --> n5
n9 --> n2
n9 --> n12
n9 --> n10
n7 --> n9
n8 -.-> n7
n5 --> n6
end
subgraph sg1["Failure Event Flow"]
direction LR
n1@{ icon: "mdi:play-circle", form: "rounded", label: "Failure Event Trigger", pos: "b", h: 48 }
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Build Error Alert"]
n16["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Alert Administrator"]
n1 --> n15
n15 --> n16
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0,n1 trigger
class n5,n7,n8 ai
class n13 aiModel
class n9 decision
class n4,n15 code
classDef customIcon fill:none,stroke:none
class n0,n4,n6,n10,n11,n12,n15,n16 customIcon
The Problem: Amazon research turns into tab chaos
You start with a simple ask: “Find a good laptop backpack” or “Which iPhone case is worth it?” Then the spiral begins. You open a few listings, realize prices don’t match features, check reviews, get distracted by sponsored results, and lose the thread of what you were comparing in the first place. If you’re doing this for work, it’s worse, because now you also need to explain your picks to someone else. That’s how a five-minute decision quietly becomes 45 minutes of messy, error-prone research.
It adds up fast. Here’s where it breaks down in real life.
- You end up comparing products one-by-one, which makes it easy to miss the actual “best value” option that sits in the middle.
- Copying links, names, and prices into a doc takes long enough that you stop doing it, so your “research” stays in your browser history.
- Amazon titles are bloated, so sharing options with your team looks sloppy and gets ignored.
- When you repeat the same research next week, you basically start from zero again.
The Solution: Telegram-to-Gemini Amazon recommendations (ranked and categorized)
This n8n workflow turns a Telegram message into a structured product shortlist. You send a query (like “wireless earbuds” or “standing desk converter”), and the workflow first validates the request with Gemini 2.5 Flash so vague or nonsense inputs don’t waste API calls. Once it’s a valid query, it pulls Amazon search results through Decodo, collects useful fields (price, rating, reviews, sales volume, URLs), and then cleans the dataset with a transformation step that removes duplicates and calculates value signals. Finally, an AI agent composes a Telegram-friendly response with short product names, clean links, and categories like budget, premium, best value, and most popular. The end result is something you can act on or forward immediately.
The workflow starts in Telegram and responds in Telegram, so there’s no dashboard to babysit. In the middle, Decodo gathers the raw Amazon data and the AI layer turns that into ranked picks you can actually use.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you research one product category for a client twice a week, and you normally review about 20 listings. Even if you spend just 2 minutes per listing, that’s about 40 minutes, plus another 10 minutes cleaning up links and notes. With this workflow, you send “laptop backpack” in Telegram, wait under 40 seconds, then forward the categorized picks. Call it 2 minutes total, and you’ve saved roughly 45 minutes per research request.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram Bot for the chat-based request and reply.
- Decodo to scrape Amazon search results reliably.
- Google Gemini API key (get it from Google AI Studio) for validation and ranking.
Skill level: Intermediate. You will connect credentials, paste API keys, and edit one or two text fields like a chat ID.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Telegram message triggers the run. You send a product query to your bot, and the workflow grabs the chat ID plus the search phrase so it knows where to reply.
Gemini checks the query quality. The AI validation step extracts the “real” product keywords and flags unclear inputs, which prevents wasted scraping and confusing outputs.
Amazon results get pulled and cleaned. Decodo retrieves listings, then a transformation step removes duplicates, normalizes fields, and prepares the list for scoring and categorization.
A ranked Telegram-ready answer is generated and delivered. The AI agent formats the recommendations with short names, clean URLs, and clear buckets like best value and premium, then sends the message back to you.
You can easily modify the recommendation categories to match your buying criteria based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Telegram Trigger
Set up the Telegram trigger to start the workflow when a user sends a message.
- Add and open Telegram Intake Trigger.
- Set Updates to
message. - Credential Required: Connect your telegramApi credentials.
Telegram Intake Trigger outputs to both Validate Item Query and Pause Briefly in parallel.
Step 2: Set Up Query Validation with AI
Validate user input and extract a clean product keyword using the AI chain and structured parser.
- Open Validate Item Query and set Text to
={{ $json.message.text }}. - Ensure Has Output Parser is enabled and connect Parse Validation Result as the output parser.
- Open Parse Validation Result and set JSON Schema Example to
{ "keyword": "<product_name_or_empty>", "status": "VALID or INVALID" }. - Open Gemini Flash Model and connect it to both Validate Item Query and Compose Recommendations as the language model.
- Credential Required: Connect your googlePalmApi credentials in Gemini Flash Model.
AI tool note: Parse Validation Result is an AI sub-node; add credentials to Gemini Flash Model, not the parser.
Step 3: Route Valid vs Invalid Queries
Use conditional logic to branch the workflow for valid and invalid product queries.
- Open Verify Query Status and set the condition Left Value to
={{ $json.output.status }}and Right Value to=VALID. - Connect the “true” output to Derive Chat and Search and Send Valid Acknowledgement in parallel.
- Connect the “false” output to Send Invalid Notice.
- Credential Required: Connect your telegramApi credentials to all Telegram nodes (grouped: Send Valid Acknowledgement, Send Invalid Notice, Post Processing Update, Dispatch Final Reply, Alert Administrator).
Verify Query Status outputs to both Derive Chat and Search and Send Valid Acknowledgement in parallel.
Step 4: Connect Product Lookup and Data Transformation
Transform the validated keyword into a search query, fetch product data, and prepare it for AI summarization.
- Open Derive Chat and Search and set chatId to
={{ $('Telegram Intake Trigger').item.json.message.chat.id }}. - In Derive Chat and Search, set message to
={{ $json.output.keyword.replaceAll(' ','+') }}. - Open Decodo Product Lookup and set URL to
=https://www.amazon.com/s?k={{ $json.message }}and Operation toamazon. - Credential Required: Connect your decodoApi credentials in Decodo Product Lookup.
- Open Transform Product Records and keep the provided JavaScript Code to clean, dedupe, score, and categorize products for AI.
Decodo Product Lookup flows into Transform Product Records, which then feeds Compose Recommendations.
Step 5: Configure AI Recommendations and Final Response
Generate the Telegram-formatted recommendation message and send it to the user.
- Open Compose Recommendations and keep the Text prompt as provided to control formatting and output length.
- Open Dispatch Final Reply and set Text to
={{ $json.text }}. - Set Chat ID in Dispatch Final Reply to
={{ $('Derive Chat and Search').item.json.chatId }}.
Compose Recommendations outputs to Dispatch Final Reply to deliver the final message.
Step 6: Add Processing Updates and Wait Behavior
Notify users during processing with a short wait and update message.
- Open Pause Briefly and set Amount to
2seconds. - Open Post Processing Update and set Text to
=Processing your input.... - Set Chat ID in Post Processing Update to
={{ $('Telegram Intake Trigger').item.json.message.chat.id }}.
Pause Briefly flows into Post Processing Update to send the interim message.
Step 7: Add Error Handling
Capture errors and alert an administrator with a formatted Telegram message.
- Open Failure Event Trigger to ensure it is connected to Build Error Alert.
- Open Build Error Alert and keep the provided JavaScript Code to format the alert.
- Open Alert Administrator and set Text to
={{ $json.message }}. - Set Chat ID in Alert Administrator to
[YOUR_ID].
Failure Event Trigger flows into Build Error Alert, then to Alert Administrator.
Step 8: Test and Activate Your Workflow
Run end-to-end tests to confirm validation, product lookup, AI recommendations, and Telegram delivery.
- Click Execute Workflow and send a Telegram message like
wireless earbudsto your bot. - Confirm you receive Send Valid Acknowledgement and later a formatted response from Dispatch Final Reply.
- Send an invalid message (e.g.,
something nice) and confirm Send Invalid Notice triggers. - Check the error flow by forcing a failure and ensure Alert Administrator receives a message.
- When satisfied, toggle the workflow to Active for production use.
Common Gotchas
- Telegram credentials can expire or the bot can be misconfigured. If things break, check @BotFather token validity and the n8n Telegram credential settings 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.
- Decodo can rate limit or Amazon can temporarily block scraping. If you get empty results, check your Decodo dashboard status and slow requests down (waiting about a minute between runs helps).
Frequently Asked Questions
About 30 minutes if you already have your API keys.
No. You’ll connect accounts and paste a few keys. The only “techy” bit is updating a chat ID for admin alerts.
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 Gemini API usage plus Decodo scraping costs (your bill depends on how often you search).
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.
Yes, but you’ll add one extra place to store results. Log the returned products into Google Sheets, then compare today’s price to the last saved price and trigger a Telegram alert when it drops. Most people also tweak the “Generate Recommendations” prompt so the message highlights discounts more aggressively.
Usually it’s an expired or wrong bot token in your n8n Telegram credentials. It can also be a webhook mismatch (common after re-importing a workflow) or the bot not having permission to message the chat you’re testing in. If replies suddenly stop, check the execution logs in n8n first, then confirm the bot still works in Telegram by sending a simple message.
A lot, as long as your n8n plan and scraping/API limits support it.
For this use case, n8n is easier to keep “end-to-end” because you can validate the query, branch on invalid inputs, transform the dataset, and format a Telegram-ready response in one workflow without paying extra for every conditional path. Self-hosting is also a real advantage if you expect lots of searches and don’t want per-task pricing to creep up. Zapier or Make can be fine if you only need a simple “message in, message out” flow, but the moment you want deduping, scoring, and error alerts, you’ll feel the limits. Honestly, most teams choose based on volume and how picky they are about formatting. Talk to an automation expert if you want a quick recommendation.
Set it up once and your next “what should we buy?” thread becomes a single Telegram message. The workflow handles the repetitive research so you can focus on the decision.
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.