This workflow corresponds to n8n.io template #14330 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "cjFtpkavkWHqy0Bm",
"name": "Best Price",
"tags": [],
"nodes": [
{
"id": "9f9e28a8-eac9-4c40-a656-95f108df1d73",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-800,
272
],
"parameters": {
"width": 948,
"height": 620,
"content": "## \ud83d\uded2 Find the Best Product Price Across Amazon, Walmart & Google Shopping\n\nSend a product name to Telegram, compare offers across Amazon, Walmart, and Google Shopping, and get the best sensible buying recommendation with confidence level, price range, and a direct purchase link.\n\n**What this template does**\nThis template turns Telegram into a smart product price comparison tool. When a user sends a product name, the workflow simultaneously queries Amazon, Walmart, and Google Shopping, standardizes all results into a unified format, and delivers the most practical buying recommendation \u2014 filtering out suspicious listings and weak matches using an AI step.\n\n**How it works**\n1. A user sends a product name to the Telegram bot\n2. The workflow queries Walmart, Amazon, and Google Shopping in parallel\n3. Each marketplace response is cleaned and mapped into a consistent offer structure\n4. All offers are merged and consolidated into a single dataset\n5. An AI agent evaluates price, seller, reviews, and match quality to identify the best sensible offer\n6. A Telegram message is sent back with the recommended price, seller, price range, offer count, confidence level, reasoning, and a direct purchase link\n\n**Requirements:** Telegram API \u00b7 OpenAI \u00b7 SerpApi \u2014 add your SerpApi key and review any fixed location/region values in the HTTP Request nodes before use.\n\n**Good to know:** More specific product names yield more accurate results. If no strong match is found, the workflow prompts the user to refine their query."
},
"typeVersion": 1
},
{
"id": "e8b6c840-01f0-437c-8613-c850297dc3d3",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
128
],
"parameters": {
"color": 4,
"width": 220,
"height": 200,
"content": "## \ud83d\udce8 Input\n\nUser sends a product name via Telegram to trigger the workflow."
},
"typeVersion": 1
},
{
"id": "9b6abf88-03a3-48a0-b5e8-e0d01727003d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
800
],
"parameters": {
"color": 6,
"width": 524,
"height": 232,
"content": "## \ud83d\udd0d Marketplace Search\n\nSearches Google Shopping, Amazon, and Walmart in parallel via SerpApi.\n\nEach response is cleaned and normalized into a shared offer structure for consistent comparison.\n\n\u2699\ufe0f Add your **SerpApi** key to each HTTP Request node and adjust any fixed location or region values as needed."
},
"typeVersion": 1
},
{
"id": "5ba3de21-bce6-4ca6-bcd9-7b586392b799",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
112
],
"parameters": {
"color": 3,
"width": 660,
"height": 200,
"content": "## \ud83e\udd16 AI Offer Comparison\n\nMerges all marketplace results, then uses an AI agent (GPT-4) to evaluate price, seller reputation, reviews, and title match quality.\n\nAvoids suspiciously cheap listings, weak matches, and clearly different variants \u2014 recommending the best sensible buying option."
},
"typeVersion": 1
},
{
"id": "c6658c67-1e3d-47fe-b196-90deb7eed0e2",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1984,
128
],
"parameters": {
"color": 5,
"width": 480,
"height": 200,
"content": "## \ud83d\udce4 Output\n\nFormats the AI recommendation and sends a Telegram message with: best price, seller, price range, offer count, confidence level, reasoning, and purchase link."
},
"typeVersion": 1
},
{
"id": "b8c51f8b-9865-41a2-bb78-e15c813c9b1b",
"name": "Parse Walmart Response",
"type": "n8n-nodes-base.code",
"position": [
864,
576
],
"parameters": {
"jsCode": "const results = $input.first().json.organic_results;\nconst blocked = [\"at&t\", \"at&t\", \"verizon\", \"t-mobile\"];\n\nreturn results\n .filter(item => item.seller_name != null && item.seller_name !== \"\")\n .filter(item => {\n const title = (item.title ?? \"\").toLowerCase();\n return !blocked.some(word => title.includes(word))})\n .map(item => ({\n json: {\n seller_name: item.seller_name ?? null,\n product_id: item.product_id ?? item.us_item_id ?? null,\n offer_id: item.primary_offer?.offer_id ?? null,\n title: item.title ?? null,\n offer_price: item.primary_offer?.offer_price ?? null,\n reviews: item.reviews ?? null, \n badge: null,\n product_url: item.product_page_url ?? null\n }\n }));"
},
"typeVersion": 2
},
{
"id": "f87281b3-6d73-4a83-9c4d-18bbc9aa0bdd",
"name": "Parse Amazon Response",
"type": "n8n-nodes-base.code",
"position": [
864,
352
],
"parameters": {
"jsCode": "const results = $input.first().json.organic_results;\nconst blocked = [\"Clear\",\"Case\"];\n\nreturn results\n .filter(item => item.price != null && item.price !== \"\")\n .filter(item => {\n const title = (item.title ?? \"\").toLowerCase();\n return !blocked.some(word => title.includes(word))})\n\n .map(item => ({\n json: {\n marketplace: \"Amazon\",\n product_id: item.asin ?? null,\n offer_id: item.asin ?? null,\n title: item.title ?? null,\n offer_price: item.extracted_price ?? null,\n reviews: item.reviews ?? null,\n seller_name: \"Amazon\",\n badge: \"Overall Pick\",\n product_url: item.link_clean ?? item.link ?? null\n }\n }));\n"
},
"typeVersion": 2
},
{
"id": "cbe2baa7-bcde-42a5-bdf9-e626a0386bfe",
"name": "Format AI Recommendation",
"type": "n8n-nodes-base.code",
"position": [
2000,
352
],
"parameters": {
"jsCode": "\nconst raw = $input.first().json.output ?? \"{}\";\nlet data;\n\ntry {\n data = JSON.parse(raw);\n} catch {\n return [{\n json: {\n message: [\n \"I couldn't parse the recommendation result.\",\n \"Please try again with a more specific product name.\"\n ].join(\"\\n\")\n }\n }];\n}\n\nconst formatPrice = (value) =>\n value === null || value === undefined || value === \"\" || isNaN(Number(value))\n ? \"N/A\"\n : `$${Number(value).toFixed(2)}`;\n\nconst confidence = data.confidence || \"Unknown\";\nconst reasoning = data.reasoning || \"No explanation available.\";\nconst comparableCount = data.comparable_offer_count ?? \"N/A\";\nconst productName = data.product_name || \"Unknown product\";\nconst recommendedPrice = formatPrice(data.recommended_price);\nconst minPrice = formatPrice(data.min_price);\nconst maxPrice = formatPrice(data.max_price);\nconst seller = data.recommended_seller || \"Unknown seller\";\nconst link = data.recommended_url || \"N/A\";\n\nif (\n !data.recommended_price &&\n !data.recommended_url &&\n (!data.comparable_offer_count || Number(data.comparable_offer_count) === 0)\n) {\n return [{\n json: {\n message: [\n `\ud83d\udd0e ${productName}`,\n \"I could not find a confident product match.\",\n \"Try a more specific name with brand, model, storage, color, or bundle.\"\n ].join(\"\\n\")\n }\n }];\n}\n\nconst message = [\n `\ud83d\udd0e ${productName}`,\n `\u2705 Best Price: ${recommendedPrice}`,\n `\ud83c\udfea Seller: ${seller}`,\n `\ud83d\udcca Range: ${minPrice} - ${maxPrice}`,\n `\ud83e\udde9 Comparable Offers: ${comparableCount}`,\n `\ud83c\udfaf Confidence: ${confidence}`,\n `\ud83d\udcdd Why this was chosen: ${reasoning}`,\n `\ud83d\udd17 Link: ${link}`\n].join(\"\\n\");\n\nreturn [{ json: { message } }];\n"
},
"typeVersion": 2
},
{
"id": "ea6e989e-5708-492d-9725-feb65ecdc6ee",
"name": "Telegram Product Request",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
320,
352
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "d91a60b9-652d-46d7-a036-0988130c23c5",
"name": "Search Walmart via SerpApi",
"type": "n8n-nodes-base.httpRequest",
"position": [
608,
576
],
"parameters": {
"url": "https://serpapi.com/search",
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "engine",
"value": "walmart"
},
{
"name": "query",
"value": "={{ $json.message.text }}"
},
{
"name": "api_key"
}
]
}
},
"typeVersion": 4.4
},
{
"id": "f32b7a10-39d1-4131-a61d-9f9e33e1bf08",
"name": "Search Amazon via SerpApi",
"type": "n8n-nodes-base.httpRequest",
"position": [
608,
352
],
"parameters": {
"url": "https://serpapi.com/search",
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "engine",
"value": "amazon"
},
{
"name": "k",
"value": "={{ $json.message.text }}"
},
{
"name": "amazon_domain",
"value": "amazon.com"
},
{
"name": "api_key"
}
]
}
},
"typeVersion": 4.4
},
{
"id": "6167982f-bf8d-4a0f-a297-d621d3098273",
"name": "Search Google Shopping via SerpApi",
"type": "n8n-nodes-base.httpRequest",
"position": [
608,
128
],
"parameters": {
"url": "https://serpapi.com/search",
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "engine",
"value": "google_shopping"
},
{
"name": "q",
"value": "={{ $json.message.text }}"
},
{
"name": "location",
"value": "United+States"
},
{
"name": "api_key"
}
]
}
},
"typeVersion": 4.4
},
{
"id": "6d7de77b-6c20-4f24-b09e-e8bb53efc25f",
"name": "Merge Marketplace Offers",
"type": "n8n-nodes-base.merge",
"position": [
1168,
336
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "f5475b85-0812-473c-b4ed-23f7af14a83e",
"name": "Aggregate Offer Data",
"type": "n8n-nodes-base.aggregate",
"position": [
1408,
352
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "865661c0-aeef-4b85-9961-c8643fb73880",
"name": "AI: Choose Best Offer",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1648,
352
],
"parameters": {
"text": "=Act as a product price analyst.\n\nYour task is to review all marketplace offers for the same product and suggest the best lowest price to buy.\n\nUse only the input data provided.\nDo not use external knowledge.\nDo not guess missing values.\n\nInput:\n{{ JSON.stringify($json.data) }}\n\nRules:\n1. Compare all offers by title, price, seller, reviews, and product URL.\n2. Treat offers as comparable only if they refer to the same product family and close variant.\n3. Exclude offers that are clearly different variants, such as different model, storage, Pro/Pro Max, carrier status, or bundle.\n4. Exclude offers with unclear or invalid prices.\n5. Mark condition from the title when possible, such as New, Refurbished, Restored, Used, Pre-Owned, Renewed, or Unknown.\n6. Recommend the lowest sensible price to buy.\n7. Do not automatically choose the absolute cheapest offer if it looks risky due to very low reviews, suspicious title, weak seller signal, or poor match quality.\n8. If the cheapest offer is still a valid and sensible choice, recommend it.\n9. Keep the reasoning short and practical.\n10. Return valid JSON only.\n11. No markdown, no code fences, no extra text.\n\nReturn this exact JSON schema:\n{\n \"product_name\": \"\",\n \"total_offers_reviewed\": 0,\n \"comparable_offer_count\": 0,\n \"min_price\": null,\n \"max_price\": null,\n \"avg_price\": null,\n \"median_price\": null,\n \"recommended_price\": null,\n \"recommended_seller\": \"\",\n \"recommended_url\": \"\",\n \"condition_summary\": \"\",\n \"confidence\": \"\",\n \"reasoning\": \"\"\n}\n",
"options": {},
"promptType": "define"
},
"typeVersion": 3.1
},
{
"id": "3f7483d2-bb9d-4e23-97d1-01744962655d",
"name": "Price Analysis Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1504,
576
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-mini"
},
"options": {},
"builtInTools": {}
},
"typeVersion": 1.3
},
{
"id": "63ad1712-fe57-4c2d-b951-890b06f8d01b",
"name": "Send Telegram Recommendation",
"type": "n8n-nodes-base.telegram",
"position": [
2160,
352
],
"parameters": {
"text": "={{ $json.message }}",
"chatId": "={{ $('Telegram Product Request').item.json.message.chat.id }}",
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "8fdac8b6-63fd-4db1-8420-5409aa81a14a",
"name": "Parse Google Shopping Response",
"type": "n8n-nodes-base.code",
"position": [
864,
128
],
"parameters": {
"jsCode": "const results =\n $input.first().json.shopping_results ||\n $input.first().json.inline_shopping_results ||\n $input.first().json.products ||\n [];\n\nreturn results\n .filter(item => item.title && item.extracted_price)\n .map(item => ({\n json: {\n marketplace: item.source ?? \"Google\",\n product_id: item.product_id ?? null,\n offer_id: item.product_id ?? null,\n title: item.title ?? null,\n offer_price: item.extracted_price ?? null,\n reviews: item.reviews ?? null,\n seller_name: item.source ?? null,\n badge: null,\n product_url: item.product_link ?? item.link ?? null\n }\n }));"
},
"typeVersion": 2
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "2fb2d17b-e6ba-4fa8-a731-f43ab5f4f010",
"connections": {
"Aggregate Offer Data": {
"main": [
[
{
"node": "AI: Choose Best Offer",
"type": "main",
"index": 0
}
]
]
},
"Price Analysis Model": {
"ai_languageModel": [
[
{
"node": "AI: Choose Best Offer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI: Choose Best Offer": {
"main": [
[
{
"node": "Format AI Recommendation",
"type": "main",
"index": 0
}
]
]
},
"Parse Amazon Response": {
"main": [
[
{
"node": "Merge Marketplace Offers",
"type": "main",
"index": 1
}
]
]
},
"Parse Walmart Response": {
"main": [
[
{
"node": "Merge Marketplace Offers",
"type": "main",
"index": 0
}
]
]
},
"Format AI Recommendation": {
"main": [
[
{
"node": "Send Telegram Recommendation",
"type": "main",
"index": 0
}
]
]
},
"Merge Marketplace Offers": {
"main": [
[
{
"node": "Aggregate Offer Data",
"type": "main",
"index": 0
}
]
]
},
"Telegram Product Request": {
"main": [
[
{
"node": "Search Walmart via SerpApi",
"type": "main",
"index": 0
},
{
"node": "Search Amazon via SerpApi",
"type": "main",
"index": 0
},
{
"node": "Search Google Shopping via SerpApi",
"type": "main",
"index": 0
}
]
]
},
"Search Amazon via SerpApi": {
"main": [
[
{
"node": "Parse Amazon Response",
"type": "main",
"index": 0
}
]
]
},
"Search Walmart via SerpApi": {
"main": [
[
{
"node": "Parse Walmart Response",
"type": "main",
"index": 0
}
]
]
},
"Parse Google Shopping Response": {
"main": [
[
{
"node": "Merge Marketplace Offers",
"type": "main",
"index": 2
}
]
]
},
"Search Google Shopping via SerpApi": {
"main": [
[
{
"node": "Parse Google Shopping Response",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Send a product name to Telegram, compare offers across Amazon, Walmart, and Google Shopping, and get the best sensible buying recommendation with confidence level, price range, and a direct purchase link.
Source: https://n8n.io/workflows/14330/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I
This template is designed for marketers, content creators, and e-commerce brands who want to automate the creation of professional ad videos at scale. It’s ideal for teams looking to generate consiste