Generate and email a daily BigQuery report in Sheets

Recipe ToolsMarketingWorkatoNLUArtificial IntelligenceDocument/FileSales EnablementProductivity

What it does

When a scheduled time arrives in Clock, this automation runs a custom SQL query in BigQuery to fetch data. It writes the results to a Google Sheet, exports the file, and emails it so the team has a fresh report each morning.

Who it's for

Data and analytics teams who need a daily report delivered without manual queries or exports.

How teams use this

Deliver a daily sales metrics report

Query revenue, pipeline, and closed deals from BigQuery each morning and email the sheet to the sales team. The query and recipients stay the same every day.

Send a finance reconciliation report

Run a custom SQL query to pull accounting data from BigQuery, populate a Google Sheet, and email it to finance stakeholders before the business day starts.

Add a filter to the query results

Modify the custom SQL to include a condition that filters rows by date range or department so only relevant data appears in the sheet and email.

Schedule reports for multiple times

Set up additional automations that run at different times of day so the team receives reports for different regions or business units on their own schedules.

How it works

  1. Run every morning at 7 AM. This automation starts at 7 AM each day so the report is ready when the team arrives.
  2. Query data with custom SQL. Run a custom SQL query in BigQuery to select and fetch the rows needed for the daily report.
  3. Write results to a sheet. Add the query results as multiple rows in a Google Sheet so the data is organized and ready to share.
  4. Export the file. Export the sheet from Google Drive so it can be attached and sent as a standalone file.
  5. Send the report by email. Email the exported file to the team so everyone receives the latest report in their inbox.