Reprice FX-sensitive international packages with Claude, Google Sheets and Slack
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 Runs every hour on a scheduled trigger. Fetches the latest USD-based FX rates from frankfurter.app and reads the Packages sheet from Google Sheets via the Sheets API. 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. Filters to only packages whose margin drift exceeds the configured threshold. 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). 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 Add an Anthropic API credential and select the Claude model used by the workflow. Configure Google OAuth2 credentials for the Google Sheets API requests and replace YOUR_SHEET_ID in all Sheets API URLs. Create a Google Sheets spreadsheet with two tabs named Packages and RepricingLog and ensure the Packages tab has the expected columns (A–I). Add a Slack credential and replace YOUR_SLACK_CHANNEL_ID with the channel ID to receive repricing alerts. (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.
Related Templates
Send structured logs to BetterStack from any workflow using HTTP Request
Send structured logs to BetterStack from any workflow using HTTP Request Who is this for? This workflow is perfect for...
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Verify Linkedin Company Page by Domain with Airtop
Automating LinkedIn Company URL Verification Use Case This automation verifies that a given LinkedIn URL actually belo...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments