Reprice FX-sensitive international packages with Claude, Google Sheets and Slack
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI - Generate FX Risk Reasoning For Flagged Packages (v1.6), AI - Generate Slack Repricing Summary & Recommendation (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Wait
n8n-nodes-base.wait
What it does
Quick overview This workflow runs on a schedule to fetch live FX rates and a package price list from Google Sheets, recalculates margin drift in USD, uses Anthropic Claude to finalize rounded repricing decisions, writes updated prices and an audit log back to Google Sheets, and posts a Slack alert. How it works 1. Runs every hour on a scheduled trigger. 2. Fetches the latest USD-based FX rates from frankfurter.app and reads the Packages sheet from Google Sheets via the Sheets API. 3. Calculates each package’s FX-adjusted USD cost, current margin, margin drift versus the target, and a recommended USD list price, then evaluates each package individually. 4. Filters to only packages whose margin drift exceeds the configured threshold. 5. Sends each flagged package to Anthropic Claude to apply conservative psychological rounding and return a JSON repricing decision with reasoning (and an optional customer note). 6. Updates the package’s USD list price, target margin, and repriced timestamp in the Packages sheet, appends an audit row to the RepricingLog sheet, and posts a summary message to a Slack channel. Setup 1. Add an Anthropic API credential and select the Claude model used by the workflow. 2. Configure Google OAuth2 credentials for the Google Sheets API requests and replace YOURSHEETID in all Sheets API URLs. 3. Create a Google Sheets spreadsheet with two tabs named Packages and RepricingLog and ensure the Packages tab has the expected columns (A–I). 4. Add a Slack credential and replace YOURSLACKCHANNELID with the channel ID to receive repricing alerts. 5. (Optional) Update the schedule interval and the margin drift threshold in the pricing calculation code to match how frequently and aggressively you want repricing to occur.