Quick overview
This workflow runs monthly to read billable line items from Google Sheets, generate one PDF invoice per client via Emitforge, archive each invoice to Google Drive, email it to the client using Gmail, and post a per-invoice summary message to Slack.
How it works
- Runs on a schedule on the 1st of each month.
- Loads invoice defaults (company name, tax rate, and payment terms) and reads billable line items from Google Sheets.
- Groups the rows by client, calculates subtotals/tax/total for the previous month, and builds the invoice line-item table HTML for each client.
- Sends the invoice HTML and data to the Emitforge PDF API and retrieves a signed URL for the rendered PDF.
- Downloads the rendered PDF file and archives it to Google Drive.
- Emails the PDF invoice to each client via Gmail and posts a summary (invoice number, client, total, and line count) to a Slack channel.
Setup
- Add Google Sheets credentials and select the spreadsheet and sheet containing columns like
client, client_email, description, qty, and unit_price.
- Add an HTTP Header Auth credential for the Emitforge API (for example,
Authorization: Bearer <API_KEY>) and confirm the PDF endpoint URL if you use a different renderer.
- Add Google Drive credentials and choose the target Drive and folder where PDFs are archived.
- Add Gmail credentials and ensure the sender mailbox is allowed to send invoices to your clients.
- Add Slack credentials and select the channel where invoice summaries are posted.
- Update the company name, tax rate, payment terms, and the monthly trigger time to match your billing rules.
Requirements
- Google Sheets, Google Drive, Gmail and Slack credentials.
- An API key for an HTML-to-PDF service. The workflow points at emitforge, which has a free tier and needs no card; any renderer that accepts HTML and returns a file works by changing one node.
Customization
- Swap Google Sheets for Airtable, Postgres or your billing system — only the first node changes.
- Change the schedule to bill weekly or fortnightly instead of monthly.
- Edit the invoice styling in the template, but keep thead { display: table-header-group } and tr { break-inside: avoid }: they repeat the column headers on every page and stop a line item being cut in half at a page break. Verified on a 45-line invoice across two pages.