Track daily exchange rates in a sheet with Slack alerts

By General Input

Every weekday morning, log your currency pairs to a spreadsheet and get a Slack ping only when one moves more than one percent.

Integrations

  • Open Exchange Rates
  • Google Sheets
  • Slack

Type

Deterministic Code

Categories

  • Finance
  • Operations

Every weekday at 6am, log the exchange rates I care about to a Google Sheet and ping me in Slack when one of them jumps. This should be a plain deterministic job with no commentary and no AI-written summary, so the sheet stays clean enough to chart and pivot over time.

Let me configure my watchlist of currency pairs as an input, each written as BASE/QUOTE (for example EUR/USD, GBP/USD, USD/JPY), along with the spreadsheet ID and tab name of my tracking sheet, the Slack channel to alert, and the move threshold, which should default to 1 percent.

Use the Open Exchange Rates Get Latest Rates operation to fetch today's rates. Free Open Exchange Rates plans are USD base only and return 400 invalid_base if you ask for anything else, so always request rates against USD and pass the set of currency codes from my watchlist as the symbols filter. Derive each cross rate by dividing USD quotes: the rate for BASE/QUOTE is the USD rate for QUOTE divided by the USD rate for BASE.

Then work out the previous business day and use Get Historical Rates for that date to fetch the same currencies the same way. Previous business day means weekends are skipped: on a Monday go back to the Friday, otherwise use yesterday. Derive the baseline from this historical call rather than by reading old rows back out of the spreadsheet, so the job stays stateless and still produces correct numbers after a missed run. Do not use Convert Amount or Get Time-Series, which require higher Open Exchange Rates plans. Fetching the previous day as its own Get Historical Rates call is exactly why the workflow is built this way. Note that historical values are the last rate published up to 23:59:59 UTC on the requested day, and that two requests per run keeps this well inside the monthly request quota.

For each pair in my watchlist, append one dated row to my tracking sheet using the Google Sheets Append Values operation, with columns in this order: date, pair, rate, previous rate, percent change. Percent change is (rate minus previous rate) divided by previous rate, multiplied by 100. Write the date as YYYY-MM-DD, and write rate, previous rate, and percent change as real numbers rather than preformatted strings, so the columns stay chartable and pivotable. Round rates to six decimal places and percent change to two. Append all of the day's rows in a single call so each run adds one clean block.

After the sheet is updated, check whether any pair moved more than the threshold in either direction. If any did, send one Slack message using Send a Message to my alert channel, listing just those pairs with their percent change and whether the move was up or down. Keep it to a plain list with no analysis or commentary. If nothing crossed the threshold, do not send a message at all, so the channel stays quiet on normal days.

If either rates lookup fails, or the historical date returns no data for a currency in my watchlist, stop without writing partial rows to the sheet so I never end up with a half-written day.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats