Quick overview
This workflow receives Discord messages via a webhook, looks up game prices or current deals using the IsThereAnyDeal (ITAD) API, optionally checks stored price history in an n8n Data Table, and posts a formatted reply back to a Discord channel using a bot.
How it works
- Receives a POST webhook containing the Discord message text and channel ID from an external Discord relay.
- Parses the message content to determine the requested command and extract the game name when provided.
- If a game lookup is requested, searches IsThereAnyDeal for the best matching game and fetches current prices for that game in the specified country.
- Retrieves any previously stored price history for the matched game from an n8n Data Table and builds a reply that includes current store prices and historical-low information when available.
- If a deals request is routed, pulls the current top deals from IsThereAnyDeal and formats a short list for Discord.
- If the message is unrecognized, returns a help message listing supported commands.
- Sends the formatted reply to Discord using a Discord bot.
Setup
- Create a Discord bot, add it to your server with permission to send messages, and connect it in n8n using Discord Bot credentials.
- Set up an external Discord relay (gateway listener or interaction/webhook handler) that forwards messages to this workflow’s webhook URL as JSON containing at least
content and channel_id.
- Add IsThereAnyDeal API credentials in the HTTP Request nodes (custom auth) and confirm the country code and query parameters match your needs.
- Select your target Discord guild and channel in the Discord message node (or adjust it to use the incoming
channel_id if you want dynamic replies).
- Create or select an n8n Data Table for stored game history and ensure it includes a
game_id field used to look up records.