InTouch Hub · Blue Isle Software

Database Snapshot Report

Run a SQL query, attach the results as a CSV, render a PDF summary, and email the report. Designed for daily/weekly business reports — sales, signups, errors, anything queryable.

database-snapshot-report

Run a SQL query, render a PDF preview, attach the full CSV, email it. Designed for the most common business automation: "send me X every Monday morning."

Use case

Sales summary, signups by day, error counts, queue depth, anything you'd otherwise log into a database to check by hand. Replace 2 minutes of clicking around with one scheduled email.

This is a YAML workflow, not a skill — pure plumbing, no AI value.

Setup

  1. Create a sql credential pointing at your database (vendor + server + login)
  2. Create an email credential for SMTP delivery (host, user, password, fromAddress)
  3. Edit the statement in workflow.yaml for your query
  4. Set the to: address on the email task
  5. Schedule (daily, weekly, monthly — whatever fits)

Pipeline

  1. run-querysql export → writes a CSV with column headers
  2. format-previewruntimeenv (bash + column) → fixed-width preview of top 100 rows
  3. render-pdfpdf generate → PDF from the preview text (Courier so columns stay aligned)
  4. email-reportemail send → both files attached, short body explains the contents

Why both PDF and CSV

The PDF is for skimming on a phone. The CSV is for opening in Excel/Sheets to sort, filter, or chart. Recipients pick the format that fits the moment.

Customization

Notes

Source

See workflow.yaml.