Перейти к содержанию
НОВОЕМаркетплейс и trig8n Agent: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / Чат-боты и боты для мессенджеров

Чат-боты и боты для мессенджеров

Поиск товаров Amazon из Telegram с ИИ через OpenRouter

Когда приходит сообщение в Telegram, ИИ через OpenRouter определяет намерение совершить покупку, собирает данные Amazon через Apify и отвечает названиями товаров, ценами и ссылками.

Что делает

## Overview Telegram bot that scrapes Amazon products using n8n automation. Users send product queries via Telegram and receive product details (title, URL, price). ## Workflow Flow Telegram Trigger → Receives messages Clean Input → Normalizes user text (removes "in amazon", punctuation, etc.) Intent Detection → AI determines if message is product search or chat Switch → Routes to appropriate handler Product Route → Calls Apify Amazon scraper API (max 5 items) Chat Route → AI conversational response Send Response → Formatted message back to Telegram ## Key Components:- Input Processing - Removes platform mentions ("in amazon", "on flipkart") - Cleans punctuation and normalizes text - URL-encodes for search queries AI Integration - Uses OpenRouter API with GPT-3.5-turbo model - Intent classification (product vs conversation) - Shopping assistant responses Product Scraping - Apify Amazon scraper integration - Returns: title, URL, price in Indian Rupees - Limited to 5 products per query External Dependencies - Telegram Bot API - OpenRouter API (AI models) - Apify Amazon Scraper API Response Format - Title: [Product Name] - URL: [Amazon Link] - Price: ₹[Amount] Error Handling - Validates empty queries - Fallback responses for unrecognized intents

Шаги

  1. Code
  2. OpenRouter Chat Model2
  3. Intent Detection
  4. OpenRouter Chat Model
  5. Send Post request and get datset items
  6. Clean userInput
  7. Recieve Message
  8. Product Vs Response
  9. Response for General
  10. Send Response
  11. Send Amazone Products

Похожие автоматизации