Daily FX exposure digest for open Xero invoices in Slack

Every weekday at 8am, see how exchange rate moves have changed what your unpaid foreign currency invoices are really worth.

Agentic Task
Open Exchange RatesXeroSlackFinanceAI ReportsNotifications & AlertsDaily Digests
PromptCreate

Every weekday at 8am, review my open foreign currency invoices in Xero and tell me how my FX exposure has shifted since each invoice was raised, then post the result to Slack.

Treat my Xero organisation's base currency as my home currency, and default to USD if you cannot determine it. Use the Xero List Invoices operation to pull accounts receivable invoices with status AUTHORISED that still have an amount outstanding, then keep only the ones whose currency code differs from my home currency. Filter server side with the where parameter where you can, and page through the full result set rather than stopping at the first page. Use the amount still due rather than the invoice total, so partly paid invoices are measured correctly. Xero returns dates in .NET format like /Date(1551830400000+0000)/, so parse each invoice date into a plain YYYY-MM-DD value before using it.

Get today's rates with the Open Exchange Rates Get Latest Rates operation, and the rate for each invoice date with Get Historical Rates. My plan is USD base only, so do not pass a base parameter: an unsupported base returns a 400 invalid_base error. Instead take the USD quotes and derive each cross rate by division. To convert an amount in currency C into my home currency H, multiply by the USD quote for H divided by the USD quote for C. Do not use the Convert Amount operation, which is Unlimited plan only, and do not use Get Time-Series, which is Enterprise only. Do the arithmetic in the workflow instead. Collect the distinct invoice dates first and make one historical call per date rather than one per invoice, because every call counts against my monthly quota. Note that historical values are the last rate published up to 23:59:59 UTC on the requested day.

For every invoice, compute the outstanding amount in my home currency at the invoice date rate and again at today's rate. The difference is the unrealised gain or loss. For a receivable, a foreign currency that has strengthened against my home currency since the invoice date is a gain, and one that has weakened is a loss. Compute the percentage change as well as the absolute change.

Only call out invoices that have moved more than 2 percent or more than 500 in my home currency, whichever is crossed first, so the digest stays short. Invoices below the threshold still count toward the totals, they just do not get their own line.

Post one message using the Slack Send a Message operation containing three sections. First, the invoices that crossed the threshold, ranked by the absolute size of the gain or loss, each showing the customer, invoice number, currency, amount outstanding, invoice date, the rate then versus the rate now, and the gain or loss in my home currency with a clear plus or minus sign. Second, subtotals of the swing grouped by currency. Third, the net swing across the whole open receivables book since invoice date, including the invoices below the threshold so the total is complete. Keep it scannable and lead with the numbers.

If no invoice crosses either threshold, stay silent apart from a single all clear line, for example: FX check, no material movement across 9 open foreign currency invoices. If I have no open foreign currency invoices at all, say that in one line instead.

Example output

FX exposure check, 9 open foreign currency invoices, home currency GBP Moved more than 2% or GBP 500 since invoice date: 1. Northwind GmbH, INV-1042, EUR 48,000 due, raised 12 May. 0.8412 then vs 0.8689 now. +GBP 1,330 (+3.3%) 2. Kaito Retail KK, INV-1067, JPY 4,200,000 due, raised 2 Jun. 0.00521 then vs 0.00498 now. -GBP 966 (-4.4%) 3. Bluepeak Inc, INV-1071, USD 62,500 due, raised 18 Jun. 0.7803 then vs 0.7688 now. -GBP 719 (-1.5%, over the 500 limit) By currency: EUR +GBP 1,412, USD -GBP 804, JPY -GBP 966 Net swing across the whole open book since invoice date: -GBP 358

What does this prompt do?

  • Each weekday morning it pulls every approved, unpaid invoice you have raised in a currency other than your home currency.
  • Compares today's exchange rate against the rate on the day each invoice was raised, so you can see the gain or loss that has quietly built up while the invoice sits open.
  • Ranks the biggest movers, subtotals the swing by currency, and gives you one net figure for the whole receivables book.
  • Stays quiet with a single all clear line on days when nothing has moved enough to be worth your attention.

What do I need to use this?

  • A Xero organisation that invoices customers in more than one currency
  • An Open Exchange Rates account (the free plan is enough)
  • A Slack workspace and the channel where your finance team should get the digest
  • Your home currency, which is normally the base currency your Xero organisation reports in

How can I customize it?

  • Change when it runs. Weekday mornings at 8am suits most finance teams, but month end only or every Monday works just as well.
  • Move the thresholds. The digest calls out anything that has moved more than 2 percent or more than 500 in your home currency, and you can tighten or loosen either number.
  • Narrow the scope. Limit it to particular currencies, your largest customers, or invoices above a certain value if your book is long.
  • Send it somewhere else, such as a private channel for the CFO instead of a shared finance channel.

FAQs

Does this work on the free Open Exchange Rates plan?
Yes. Free accounts quote every currency against the US dollar, so the workflow works out the pair rates itself by comparing the two dollar quotes. You do not need a paid plan for this digest.
Will this change anything in my Xero account?
No. It only reads your invoice list. Nothing is created, edited, or reconciled in Xero, so it is safe to run against your live organisation.
Why doesn't Xero already show me this?
Accounting systems record a currency gain or loss when an invoice is actually paid and reconciled. Until that happens, the drift on an invoice sitting open is invisible. This digest fills the gap between the day you invoice and the day you get paid.
What counts as a big enough move to get reported?
By default an invoice is called out if its value has moved more than 2 percent or more than 500 in your home currency, whichever happens first. Everything else is still counted in the totals, just not listed line by line.
What happens on a quiet day when rates barely moved?
You get a single all clear line confirming the book was checked and nothing crossed the threshold, so the digest never becomes noise you learn to ignore.
Can I use this for supplier bills as well as customer invoices?
Yes. It is set up for money owed to you, but the same approach works for what you owe, with the gain and loss signs reversed.

Related templates

Auto-fix your calendar when a flight slips, and flag what's at risk

When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.

Google Calendar
AviationStack
Slack
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Turn each week's football fixtures into a venue staffing plan

Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.

API-Sports
Google Calendar
Slack
Agentic Task
Turn 5 star Yotpo reviews into a weekly marketing content queue

Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.

Yotpo
Notion
Slack
Agentic Task
Catch bad shipping addresses before you buy the label

Every weekday morning, unfulfilled orders get an address check: harmless typos fixed automatically, risky addresses held with a note to the customer.

Shippo
Shopify
Gmail
+1
Agentic Task

Stop discovering currency losses on the day you get paid.

Put a two minute check on your calendar every weekday morning and know exactly what your foreign currency receivables are worth today.