Generate and email a daily job report from MySQL

Recipe ToolsMarketingDatabaseUtilitiesData ParserProductivitySales Enablement

What it does

When a scheduled time arrives, this automation runs a custom SQL query in MySQL to fetch job data. It maps the results to a standard format, compiles them into a CSV file, and emails the report.

Who it's for

Operations teams who need a daily summary of job activity without manual report building.

How teams use this

Email a daily job summary

Run the report every morning at 8 AM and send it to the operations inbox. The team opens their email and has the full day's job data ready to review.

Route reports to different teams

Send the same CSV report to multiple email addresses so finance and operations both receive the daily job summary. Only the recipient list changes.

Filter jobs by status before reporting

Add a condition to the SQL query to include only completed or failed jobs in the report. The rest of the flow stays the same and only the data scope narrows.

How it works

  1. Start on a scheduled interval. At the scheduled time each day, this automation starts and prepares to gather the job data from MySQL.
  2. Run custom SQL in MySQL. Execute a custom SQL query to fetch job records from the database for the reporting period.
  3. Map rows to standard format. Transform each row using the Daily Job Report data model so all fields are consistent and ready for the report.
  4. Compose CSV file. Combine all mapped job records into a single CSV file formatted for email delivery and spreadsheet import.
  5. Send email via Gmail. Email the CSV report to the team so they can review job activity for the day.