Quick overview
This workflow runs every Monday to pull weekly KPIs from HubSpot, QuickBooks Online, and Stripe, writes one aggregated row to Google Sheets, and emails a week-over-week summary to a configured recipient.
How it works
- Runs every Monday at 7:00 AM (or you can execute a manual test run that uses built-in sample data).
- Calculates the previous Monday-to-Monday reporting window in the configured timezone.
- Optionally fetches last week’s HubSpot deal metrics (created deals, closed-won deals, and current open pipeline) via the HubSpot CRM Search API.
- Optionally queries QuickBooks Online for last week’s invoice totals, payment totals, and current unpaid/overdue invoice balances.
- Optionally lists Stripe charges for the same date range and totals net card payments, refunds, and failed payments for the configured currency.
- Aggregates all source results into a single weekly KPI row, looks up the previous week in Google Sheets to compute percentage changes, and builds a plain-text email summary (including any source read failures).
- Appends or updates the week’s row in the “Weekly KPIs” tab in Google Sheets (matching on the week field) and emails the summary, sending a separate failure alert email if the sheet write or email step fails.
Setup
- Create a Google Sheets spreadsheet with a tab named “Weekly KPIs”, add the expected header columns, and update the spreadsheet URL/ID in the two Google Sheets steps.
- Add credentials for the sources you enable: a HubSpot Private App token, a QuickBooks Online OAuth2 connection (and set your QuickBooks realm/company ID), and a Stripe secret key.
- Configure SMTP (or your email provider) for sending mail, then set the recipient and sender addresses (report_to and from_email) in the Config step.
- Review and update the Config values (timezone, currency, and use_hubspot/use_quickbooks/use_stripe toggles) before activating the scheduled trigger.