Every Monday, one email with your Mercury cash, monthly burn and months of runway, last week's money in and out, and where it went.

UsesGmailMercury

Start every week knowing your cash and runway

Cash, burn and runway usually get checked only when someone logs into the bank and builds a spreadsheet, so it happens rarely and surprises arrive late. Every Monday at 07:00 this reads your Mercury accounts and sends one email that leads with the numbers that matter: cash, months of runway and monthly burn. Under them come last week's money in and money out against the average of the four weeks before, the five places most money went, the largest payment in, and the balance of every account, Treasury included.

Burn is money out minus money in, averaged over the last three full months, and runway is cash divided by burn, rounded down. A company bringing in more than it spends is told it is cash-flow positive instead. Moves between your own Mercury accounts and failed, canceled or reversed payments are left out, and payments still pending are taken off cash straight away. With less than a full month of history the email says so rather than guessing. If Mercury cannot be read, no email is sent and the run is marked as failed, so a partial figure never reaches your inbox.

You need Mercury and Gmail connected, and the email address the report should go to.

Run every Monday at 07:00.Run every Monday at 07:00.
Set recipientEmail to blank.Set recipientEmail to blank.
Trim recipientEmail and save it as sendTo.Trim recipientEmail and save it as sendTo.
If sendTo doesn't contain “@”If sendTo doesn't contain “@”
Yes
Stop and report a problem: '@sendTo' in the 'recipientEmail' step does not look like an email address. Put the address the report should go to there, such as you@yourcompany.com, then run it again.Stop and report a problem: '@sendTo' in the 'recipientEmail' step does not look like an email address. Put the address the report should go to there, such as you@yourcompany.com, then run it again.
No
No steps
Get today's date and save it as today.Get today's date and save it as today.
Get the start of the month for today and save it as thisMonthStart.Get the start of the month for today and save it as thisMonthStart.
Get the date 3 months before thisMonthStart and save it as burnWindowStart.Get the date 3 months before thisMonthStart and save it as burnWindowStart.
Get the date 1 day before thisMonthStart and save it as lastMonthEnd.Get the date 1 day before thisMonthStart and save it as lastMonthEnd.
Get the date 7 days before today and save it as weekAgo.Get the date 7 days before today and save it as weekAgo.
Get the start of the week for weekAgo and save it as lastWeekStart.Get the start of the week for weekAgo and save it as lastWeekStart.
Get the end of the week for weekAgo and save it as lastWeekEnd.Get the end of the week for weekAgo and save it as lastWeekEnd.
Get the date 28 days before lastWeekStart and save it as priorWeeksStart.Get the date 28 days before lastWeekStart and save it as priorWeeksStart.
Get the date 1 day before lastWeekStart and save it as priorWeeksEnd.Get the date 1 day before lastWeekStart and save it as priorWeeksEnd.
Get the date 1 day before burnWindowStart and save it as fetchFrom.Get the date 1 day before burnWindowStart and save it as fetchFrom.
Set accountList to an empty record.Set accountList to an empty record.
If a step below fails, save the error as accountsErrorIf a step below fails, save the error as accountsError
Try
MercuryMercuryList accounts Save it as accountList.List accounts Save it as accountList.
On error
Stop and report a problem: Lodol could not read your Mercury accounts, so no report was sent. Check under Apps that Mercury is still connected, then run this again. Mercury said: accountsError.message.Stop and report a problem: Lodol could not read your Mercury accounts, so no report was sent. Check under Apps that Mercury is still connected, then run this again. Mercury said: accountsError.message.
Set treasuryList to an empty record.Set treasuryList to an empty record.
If a step below fails, save the error as treasuryErrorIf a step below fails, save the error as treasuryError
Try
MercuryMercuryList treasury accounts Save it as treasuryList.List treasury accounts Save it as treasuryList.
On error
Stop and report a problem: Lodol could not read your Mercury Treasury balance, so no report was sent rather than one with your cash understated. Check under Apps that Mercury is still connected, then run this again. Mercury said: treasuryError.message.Stop and report a problem: Lodol could not read your Mercury Treasury balance, so no report was sent rather than one with your cash understated. Check under Apps that Mercury is still connected, then run this again. Mercury said: treasuryError.message.
Get “id” from every item in treasuryList.items and save it as treasuryIds.Get “id” from every item in treasuryList.items and save it as treasuryIds.
Keep each item in accountList.items where item.status is “active” and treasuryIds doesn't contain item.id and save it as bankAccounts.Keep each item in accountList.items where item.status is “active” and treasuryIds doesn't contain item.id and save it as bankAccounts.
If bankAccounts is emptyIf bankAccounts is empty
Yes
Stop and report a problem: Mercury lists no open accounts for this login, so there is no cash to report and no report was sent. Check that Mercury is connected under Apps with an API token from your company's Mercury account, then run this again.Stop and report a problem: Mercury lists no open accounts for this login, so there is no cash to report and no report was sent. Check that Mercury is connected under Apps with an API token from your company's Mercury account, then run this again.
No
No steps
Keep each item in treasuryList.items where item.status is “active” and save it as treasuryAccounts.Keep each item in treasuryList.items where item.status is “active” and save it as treasuryAccounts.
Get “id” from every item in bankAccounts and save it as bankAccountIds.Get “id” from every item in bankAccounts and save it as bankAccountIds.
Get “currentBalance” from every item in bankAccounts and save it as bankBalances.Get “currentBalance” from every item in bankAccounts and save it as bankBalances.
Add up bankBalances and save it as bankTotal.Add up bankBalances and save it as bankTotal.
Get “currentBalance” from every item in treasuryAccounts and save it as treasuryBalances.Get “currentBalance” from every item in treasuryAccounts and save it as treasuryBalances.
Add up treasuryBalances and save it as treasuryTotal.Add up treasuryBalances and save it as treasuryTotal.
Set settledCash to bankTotal plus treasuryTotal.Set settledCash to bankTotal plus treasuryTotal.
Sort accountList.items by createdAt, smallest first and save it as accountsByAge.Sort accountList.items by createdAt, smallest first and save it as accountsByAge.
Set firstOpened to accountsByAge[0].createdAt.Set firstOpened to accountsByAge[0].createdAt.
Set burnFrom to burnWindowStart.Set burnFrom to burnWindowStart.
If firstOpened is greater than burnWindowStartIf firstOpened is greater than burnWindowStart
Yes
Get the date 1 month after firstOpened and save it as monthAfterOpening.Get the date 1 month after firstOpened and save it as monthAfterOpening.
Get the start of the month for monthAfterOpening and save it as burnFrom.Get the start of the month for monthAfterOpening and save it as burnFrom.
No
No steps
Count the months from burnFrom to thisMonthStart and save it as burnMonths.Count the months from burnFrom to thisMonthStart and save it as burnMonths.
Set transactions to an empty list.Set transactions to an empty list.
Set nextPage to nothing.Set nextPage to nothing.
Set morePages to true.Set morePages to true.
Set pagesRead to 0.Set pagesRead to 0.
While morePages is yes:While morePages is yes:
Set page to an empty record.Set page to an empty record.
If a step below fails, save the error as transactionsErrorIf a step below fails, save the error as transactionsError
Try
MercuryMercuryList transactions Save it as page.List transactions Save it as page.
On error
Stop and report a problem: Lodol could not read your Mercury transactions, so no report was sent rather than one with burn and runway worked out from part of the picture. Check under Apps that Mercury is still connected, then run this again. Mercury said: transactionsError.message.Stop and report a problem: Lodol could not read your Mercury transactions, so no report was sent rather than one with burn and runway worked out from part of the picture. Check under Apps that Mercury is still connected, then run this again. Mercury said: transactionsError.message.
Combine transactions and page.items into one list and save it as transactions.Combine transactions and page.items into one list and save it as transactions.
Add 1 to pagesRead.Add 1 to pagesRead.
Change morePages to false.Change morePages to false.
If the length of page.items is greater than or equal to 500If the length of page.items is greater than or equal to 500
Yes
If page.next_cursor is nextPageIf page.next_cursor is nextPage
Yes
Stop and report a problem: Mercury sent the same page of transactions twice, so the totals could not be trusted and no report was sent. Run it again later; if it keeps happening, contact Lodol support.Stop and report a problem: Mercury sent the same page of transactions twice, so the totals could not be trusted and no report was sent. Run it again later; if it keeps happening, contact Lodol support.
No
No steps
If pagesRead is greater than or equal to 40If pagesRead is greater than or equal to 40
Yes
Stop and report a problem: There are more than 20,000 Mercury transactions in the last three months, more than this report can total in one run, so no report was sent rather than one with payments missing.Stop and report a problem: There are more than 20,000 Mercury transactions in the last three months, more than this report can total in one run, so no report was sent rather than one with payments missing.
No
No steps
Change nextPage to page.next_cursor.Change nextPage to page.next_cursor.
Change morePages to true.Change morePages to true.
No
No steps
Keep each item in transactions where item.kind is not “internalTransfer” and item.kind is not “treasuryTransfer”… and save it as countedTransactions.Keep each item in transactions where item.kind is not “internalTransfer” and item.kind is not “treasuryTransfer”… and save it as countedTransactions.
Keep each item in countedTransactions where item.status is “pending” and bankAccountIds contains item.accountId and save it as pendingFromAccounts.Keep each item in countedTransactions where item.status is “pending” and bankAccountIds contains item.accountId and save it as pendingFromAccounts.
Get “amount” from every item in pendingFromAccounts and save it as pendingAmounts.Get “amount” from every item in pendingFromAccounts and save it as pendingAmounts.
Add up pendingAmounts and save it as pendingTotal.Add up pendingAmounts and save it as pendingTotal.
Calculate the absolute value of pendingTotal and save it as pendingOut.Calculate the absolute value of pendingTotal and save it as pendingOut.
Set cash to settledCash minus pendingOut.Set cash to settledCash minus pendingOut.
Keep each item in countedTransactions where item.createdAt is greater than or equal to lastWeekStart and item.createdAt… and save it as lastWeek.Keep each item in countedTransactions where item.createdAt is greater than or equal to lastWeekStart and item.createdAt… and save it as lastWeek.
Keep each item in lastWeek where item.amount is greater than 0 and save it as moneyInLastWeek.Keep each item in lastWeek where item.amount is greater than 0 and save it as moneyInLastWeek.
Keep each item in lastWeek where item.amount is less than 0 and save it as moneyOutLastWeek.Keep each item in lastWeek where item.amount is less than 0 and save it as moneyOutLastWeek.
Get “amount” from every item in moneyInLastWeek and save it as inLastWeekAmounts.Get “amount” from every item in moneyInLastWeek and save it as inLastWeekAmounts.
Add up inLastWeekAmounts and save it as inLastWeekTotal.Add up inLastWeekAmounts and save it as inLastWeekTotal.
Get “amount” from every item in moneyOutLastWeek and save it as outLastWeekAmounts.Get “amount” from every item in moneyOutLastWeek and save it as outLastWeekAmounts.
Add up outLastWeekAmounts and save it as outLastWeekTotal.Add up outLastWeekAmounts and save it as outLastWeekTotal.
Calculate the absolute value of outLastWeekTotal and save it as outLastWeek.Calculate the absolute value of outLastWeekTotal and save it as outLastWeek.
Keep each item in countedTransactions where item.createdAt is greater than or equal to priorWeeksStart and item.createdAt… and save it as priorWeeks.Keep each item in countedTransactions where item.createdAt is greater than or equal to priorWeeksStart and item.createdAt… and save it as priorWeeks.
Keep each item in priorWeeks where item.amount is greater than 0 and save it as moneyInPriorWeeks.Keep each item in priorWeeks where item.amount is greater than 0 and save it as moneyInPriorWeeks.
Keep each item in priorWeeks where item.amount is less than 0 and save it as moneyOutPriorWeeks.Keep each item in priorWeeks where item.amount is less than 0 and save it as moneyOutPriorWeeks.
Get “amount” from every item in moneyInPriorWeeks and save it as inPriorWeeksAmounts.Get “amount” from every item in moneyInPriorWeeks and save it as inPriorWeeksAmounts.
Add up inPriorWeeksAmounts and save it as inPriorWeeksTotal.Add up inPriorWeeksAmounts and save it as inPriorWeeksTotal.
Get “amount” from every item in moneyOutPriorWeeks and save it as outPriorWeeksAmounts.Get “amount” from every item in moneyOutPriorWeeks and save it as outPriorWeeksAmounts.
Add up outPriorWeeksAmounts and save it as outPriorWeeksTotal.Add up outPriorWeeksAmounts and save it as outPriorWeeksTotal.
Calculate the absolute value of outPriorWeeksTotal and save it as outPriorWeeks.Calculate the absolute value of outPriorWeeksTotal and save it as outPriorWeeks.
Set inWeeklyAverage to inPriorWeeksTotal divided by 4.Set inWeeklyAverage to inPriorWeeksTotal divided by 4.
Set outWeeklyAverage to outPriorWeeks divided by 4.Set outWeeklyAverage to outPriorWeeks divided by 4.
Format inLastWeekTotal as US dollars with 0 decimal places and save it as inLastWeekText.Format inLastWeekTotal as US dollars with 0 decimal places and save it as inLastWeekText.
Format outLastWeek as US dollars with 0 decimal places and save it as outLastWeekText.Format outLastWeek as US dollars with 0 decimal places and save it as outLastWeekText.
Format inWeeklyAverage as US dollars with 0 decimal places and save it as inAverageText.Format inWeeklyAverage as US dollars with 0 decimal places and save it as inAverageText.
Format outWeeklyAverage as US dollars with 0 decimal places and save it as outAverageText.Format outWeeklyAverage as US dollars with 0 decimal places and save it as outAverageText.
Build the text “(average of the 4 weeks before: @inAverageText)” and save it as inComparison.Build the text “(average of the 4 weeks before: @inAverageText)” and save it as inComparison.
Build the text “(average of the 4 weeks before: @outAverageText)” and save it as outComparison.Build the text “(average of the 4 weeks before: @outAverageText)” and save it as outComparison.
Set averageNote to blank.Set averageNote to blank.
If firstOpened is greater than priorWeeksStartIf firstOpened is greater than priorWeeksStart
Yes
Change inComparison to blank.Change inComparison to blank.
Change outComparison to blank.Change outComparison to blank.
Change averageNote to:Change averageNote to:Your Mercury history is too short to compare with the 4 weeks before yet.
No
No steps
Set weekNet to inLastWeekTotal minus outLastWeek.Set weekNet to inLastWeekTotal minus outLastWeek.
Calculate the absolute value of weekNet and save it as weekNetSize.Calculate the absolute value of weekNet and save it as weekNetSize.
Format weekNetSize as US dollars with 0 decimal places and save it as weekNetText.Format weekNetSize as US dollars with 0 decimal places and save it as weekNetText.
Set weekNetSentence to “Money in and money out were level.”.Set weekNetSentence to “Money in and money out were level.”.
If lastWeek is emptyIf lastWeek is empty
Yes
Change weekNetSentence to “No money came in or went out.”.Change weekNetSentence to “No money came in or went out.”.
Else if @weekNet is greater than 0
Build the text “More came in than went out, by @weekNetText.” and save it as weekNetSentence.Build the text “More came in than went out, by @weekNetText.” and save it as weekNetSentence.
Else if @weekNet is less than 0
Build the text “@weekNetText more went out than came in.” and save it as weekNetSentence.Build the text “@weekNetText more went out than came in.” and save it as weekNetSentence.
Otherwise
No steps
Make lastWeekStart readable as “Mon Nov 2” and save it as lastWeekStartText.Make lastWeekStart readable as “Mon Nov 2” and save it as lastWeekStartText.
Make lastWeekEnd readable as “Mon Nov 2” and save it as lastWeekEndText.Make lastWeekEnd readable as “Mon Nov 2” and save it as lastWeekEndText.
Group the items in moneyOutLastWeek by “counterpartyName”, with the total “amount” of each and save it as payees.Group the items in moneyOutLastWeek by “counterpartyName”, with the total “amount” of each and save it as payees.
Sort payees by total, smallest first and save it as payeesBySpend.Sort payees by total, smallest first and save it as payeesBySpend.
Take the first 5 items of payeesBySpend and save it as topPayees.Take the first 5 items of payeesBySpend and save it as topPayees.
Set topPayeeLines to an empty list.Set topPayeeLines to an empty list.
Set rank to 0.Set rank to 0.
For each payee in topPayees:For each payee in topPayees:
Add 1 to rank.Add 1 to rank.
Calculate the absolute value of payee.total and save it as payeeSpend.Calculate the absolute value of payee.total and save it as payeeSpend.
Format payeeSpend as US dollars with 0 decimal places and save it as payeeSpendText.Format payeeSpend as US dollars with 0 decimal places and save it as payeeSpendText.
Set payeeName to payee.key.Set payeeName to payee.key.
If payeeName is emptyIf payeeName is empty
Yes
Change payeeName to “Payee not named by Mercury”.Change payeeName to “Payee not named by Mercury”.
No
No steps
Set paymentCount to blank.Set paymentCount to blank.
If payee.count is greater than 1If payee.count is greater than 1
Yes
Build the text “(@payee.count payments)” and save it as paymentCount.Build the text “(@payee.count payments)” and save it as paymentCount.
No
No steps
Add rank. payeeName: payeeSpendText@paymentCount to the end of topPayeeLines and save it as topPayeeLines.Add rank. payeeName: payeeSpendText@paymentCount to the end of topPayeeLines and save it as topPayeeLines.
Join topPayeeLines with a new line and save it as topPayeesText.Join topPayeeLines with a new line and save it as topPayeesText.
If moneyOutLastWeek is emptyIf moneyOutLastWeek is empty
Yes
Change topPayeesText to “No money went out last week.”.Change topPayeesText to “No money went out last week.”.
No
No steps
Set largestInText to “No money came in last week.”.Set largestInText to “No money came in last week.”.
If moneyInLastWeek isn't emptyIf moneyInLastWeek isn't empty
Yes
Sort moneyInLastWeek by amount, largest first and save it as incomingBySize.Sort moneyInLastWeek by amount, largest first and save it as incomingBySize.
Format incomingBySize[0].amount as US dollars with 0 decimal places and save it as largestInAmount.Format incomingBySize[0].amount as US dollars with 0 decimal places and save it as largestInAmount.
Make incomingBySize[0].createdAt readable as “Monday, November 2” and save it as largestInDay.Make incomingBySize[0].createdAt readable as “Monday, November 2” and save it as largestInDay.
Use incomingBySize[0].counterpartyName, or “A payer Mercury did not name” if it is empty and save it as payerName.Use incomingBySize[0].counterpartyName, or “A payer Mercury did not name” if it is empty and save it as payerName.
Build the text “@payerName: @largestInAmount on @largestInDay” and save it as largestInText.Build the text “@payerName: @largestInAmount on @largestInDay” and save it as largestInText.
No
No steps
Set balanceLines to an empty list.Set balanceLines to an empty list.
For each account in bankAccounts:For each account in bankAccounts:
Set accountName to account.name.Set accountName to account.name.
If account.nickname isn't emptyIf account.nickname isn't empty
Yes
Build the text “@account.nickname (@account.name)” and save it as accountName.Build the text “@account.nickname (@account.name)” and save it as accountName.
No
No steps
Format account.currentBalance as US dollars with 2 decimal places and save it as accountBalanceText.Format account.currentBalance as US dollars with 2 decimal places and save it as accountBalanceText.
Add accountName: accountBalanceText to the end of balanceLines and save it as balanceLines.Add accountName: accountBalanceText to the end of balanceLines and save it as balanceLines.
For each treasuryAccount in treasuryAccounts:For each treasuryAccount in treasuryAccounts:
Format treasuryAccount.currentBalance as US dollars with 2 decimal places and save it as treasuryBalanceText.Format treasuryAccount.currentBalance as US dollars with 2 decimal places and save it as treasuryBalanceText.
Add Mercury Treasury: treasuryBalanceText to the end of balanceLines and save it as balanceLines.Add Mercury Treasury: treasuryBalanceText to the end of balanceLines and save it as balanceLines.
If pendingOut is greater than 0If pendingOut is greater than 0
Yes
Format pendingOut as US dollars with 2 decimal places and save it as pendingOutText.Format pendingOut as US dollars with 2 decimal places and save it as pendingOutText.
Add Less payments still pending: pendingOutText to the end of balanceLines and save it as balanceLines.Add Less payments still pending: pendingOutText to the end of balanceLines and save it as balanceLines.
No
No steps
Format cash as US dollars with 2 decimal places and save it as cashExactText.Format cash as US dollars with 2 decimal places and save it as cashExactText.
Add Cash: cashExactText to the end of balanceLines and save it as balanceLines.Add Cash: cashExactText to the end of balanceLines and save it as balanceLines.
Format cash as US dollars with 0 decimal places and save it as cashText.Format cash as US dollars with 0 decimal places and save it as cashText.
Join balanceLines with a new line and save it as balancesText.Join balanceLines with a new line and save it as balancesText.
Build the text “Cash @cashText · not enough history yet for burn and runway” and save it as headline.Build the text “Cash @cashText · not enough history yet for burn and runway” and save it as headline.
Set methodLine to “Burn and runway appear once your Mercury accounts have a full calendar month of history. Burn is money out minus money in, averaged per month over up to the last three full months, and runway is cash divided by burn.”.Set methodLine to “Burn and runway appear once your Mercury accounts have a full calendar month of history. Burn is money out minus money in, averaged per month over up to the last three full months, and runway is cash divided by burn.”.
If burnMonths is greater than or equal to 1If burnMonths is greater than or equal to 1
Yes
Keep each item in countedTransactions where item.createdAt is greater than or equal to burnFrom and item.createdAt is… and save it as burnWindow.Keep each item in countedTransactions where item.createdAt is greater than or equal to burnFrom and item.createdAt is… and save it as burnWindow.
Get “amount” from every item in burnWindow and save it as burnWindowAmounts.Get “amount” from every item in burnWindow and save it as burnWindowAmounts.
Add up burnWindowAmounts and save it as burnWindowTotal.Add up burnWindowAmounts and save it as burnWindowTotal.
Set netOutflow to burnWindowTotal multiplied by -1.Set netOutflow to burnWindowTotal multiplied by -1.
Set burn to netOutflow divided by burnMonths.Set burn to netOutflow divided by burnMonths.
Set burnInHundreds to burn divided by 100.Set burnInHundreds to burn divided by 100.
Round burnInHundreds to the nearest integer and save it as burnHundredsRounded.Round burnInHundreds to the nearest integer and save it as burnHundredsRounded.
Set burnRounded to burnHundredsRounded multiplied by 100.Set burnRounded to burnHundredsRounded multiplied by 100.
If the absolute value of burn is less than 1000If the absolute value of burn is less than 1000
Yes
Round burn to the nearest integer and save it as burnRounded.Round burn to the nearest integer and save it as burnRounded.
No
No steps
Make burnFrom readable as “November 2026” and save it as monthsFrom.Make burnFrom readable as “November 2026” and save it as monthsFrom.
Make lastMonthEnd readable as “November 2026” and save it as monthsTo.Make lastMonthEnd readable as “November 2026” and save it as monthsTo.
Build the text “the @burnMonths full months from @monthsFrom to @monthsTo” and save it as monthsPhrase.Build the text “the @burnMonths full months from @monthsFrom to @monthsTo” and save it as monthsPhrase.
If burnMonths is 1If burnMonths is 1
Yes
Change monthsPhrase to monthsTo.Change monthsPhrase to monthsTo.
No
No steps
If burnWindow is emptyIf burnWindow is empty
Yes
Build the text “Cash @cashText · no money in or out over @monthsPhrase” and save it as headline.Build the text “Cash @cashText · no money in or out over @monthsPhrase” and save it as headline.
Build the text “No money came in or went out over @monthsPhrase, so there is no burn to measure or runway to work out.” and save it as methodLine.Build the text “No money came in or went out over @monthsPhrase, so there is no burn to measure or runway to work out.” and save it as methodLine.
Else if @burnRounded is 0
Build the text “Cash @cashText · money in and out level over @monthsPhrase” and save it as headline.Build the text “Cash @cashText · money in and out level over @monthsPhrase” and save it as headline.
Build the text “Money in and money out came to within a dollar a month of each other over @monthsPhrase, so there is no burn to measure or runway to work out.” and save it as methodLine.Build the text “Money in and money out came to within a dollar a month of each other over @monthsPhrase, so there is no burn to measure or runway to work out.” and save it as methodLine.
Else if @burn is greater than 0
Format burnRounded as US dollars with 0 decimal places and save it as burnText.Format burnRounded as US dollars with 0 decimal places and save it as burnText.
Set runwayMonths to cash divided by burn.Set runwayMonths to cash divided by burn.
Round runwayMonths down to 1 decimal place and save it as runwayShown.Round runwayMonths down to 1 decimal place and save it as runwayShown.
Build the text “@runwayShown months of runway” and save it as runwayPhrase.Build the text “@runwayShown months of runway” and save it as runwayPhrase.
If cash is less than or equal to 0If cash is less than or equal to 0
Yes
Change runwayPhrase to “no cash left to run on”.Change runwayPhrase to “no cash left to run on”.
Else if @runwayMonths is greater than or equal to 120
Change runwayPhrase to “more than 10 years of runway”.Change runwayPhrase to “more than 10 years of runway”.
Else if @runwayShown is 1
Change runwayPhrase to “1 month of runway”.Change runwayPhrase to “1 month of runway”.
Otherwise
No steps
Build the text “Cash @cashText · @runwayPhrase · burn @burnText/month” and save it as headline.Build the text “Cash @cashText · @runwayPhrase · burn @burnText/month” and save it as headline.
Build the text “Burn is money out minus money in, averaged per month over @monthsPhrase. Runway is cash divided by burn, rounded down.” and save it as methodLine.Build the text “Burn is money out minus money in, averaged per month over @monthsPhrase. Runway is cash divided by burn, rounded down.” and save it as methodLine.
Otherwise
Calculate the absolute value of burnRounded and save it as monthlyGain.Calculate the absolute value of burnRounded and save it as monthlyGain.
Format monthlyGain as US dollars with 0 decimal places and save it as monthlyGainText.Format monthlyGain as US dollars with 0 decimal places and save it as monthlyGainText.
Build the text “Cash @cashText · cash-flow positive · @monthlyGainText/month more in than out” and save it as headline.Build the text “Cash @cashText · cash-flow positive · @monthlyGainText/month more in than out” and save it as headline.
Build the text “More came in than went out over @monthsPhrase, so there is no burn and no runway limit. The figure above is money in minus money out, averaged per month.” and save it as methodLine.Build the text “More came in than went out over @monthsPhrase, so there is no burn and no runway limit. The figure above is money in minus money out, averaged per month.” and save it as methodLine.
No
No steps
Make today readable as “Monday, November 2, 2026” and save it as reportDate.Make today readable as “Monday, November 2, 2026” and save it as reportDate.
Build the text “Weekly cash report · @reportDate” and save it as companyLine.Build the text “Weekly cash report · @reportDate” and save it as companyLine.
If bankAccounts[0].legalBusinessName isn't emptyIf bankAccounts[0].legalBusinessName isn't empty
Yes
Build the text “Weekly cash report for @bankAccounts[0].legalBusinessName · @reportDate” and save it as companyLine.Build the text “Weekly cash report for @bankAccounts[0].legalBusinessName · @reportDate” and save it as companyLine.
No
No steps
If a step below fails, save the error as sendErrorIf a step below fails, save the error as sendError
Try
GmailGmailSend an email to sendTo. Save it as sent.Send an email to sendTo. Save it as sent. Subject: headlineheadline companyLine Last week: lastWeekStartText to lastWeekEndText Money in: inLastWeekText@inComparison Money out: outLastWeekText@outComparison weekNetSentence@averageNote ...
On error
Stop and report a problem: The weekly cash report was ready but could not be emailed to sendTo. Check under Apps that Gmail is still connected, then run this again. Gmail said: sendError.message.Stop and report a problem: The weekly cash report was ready but could not be emailed to sendTo. Check under Apps that Gmail is still connected, then run this again. Gmail said: sendError.message.
Finish the run: Emailed the weekly cash report to sendTo: headline.Finish the run: Emailed the weekly cash report to sendTo: headline.