Invoices
Generate invoices from a Google Sheet (or any other source), email them as PDFs, and keep a record of what was sent and what's been paid, all in one workflow.
This guide walks through a Sheets to invoice workflow end to end: building the template, adding line item totals, emailing the PDF, and turning on auto-create so new rows produce new invoices automatically.
What you'll learn
- Create a new workflow
- Customise your invoice template
- Add calculations for totals
- Share invoices via email
- Set up file settings
- Add a Record outputs block
- Run the automation
- Start from a template in the gallery
Create a new workflow
Click "+ Add Workflow" in the top right of your dashboard.
Choose a source. For this example the invoice data lives in a Google Sheet.
With the source connected, click the plus icon to add a template block.
Select a Google Doc template.
Customise your invoice template
When the template opens, you'll see a source table on the right. Each row is a column from your sheet, and each one has a copy button so you can paste the matching tag into the template.
A
{{tag}}is how Portant marks where source data should be inserted. See tags for the full reference.
Set the Output Name for each generated file. You can use tags here too. In this example we're using {{Invoice Number}} and {{Customer Name}}. Press Enter to save the new naming pattern.
Turn on "Create PDF copy" so a PDF version of each invoice is saved to your Outputs tab and your Drive folder.
Add calculations for totals
When your invoice has multiple line items, you'll usually want a subtotal, average, or total. Portant supports a few formulas inside tags. These work on fields that are part of a data group.
Sum adds all field values within a group:
{{=SUM(Field name)}}
Average averages all field values within a group:
{{=AVG(Field name)}}
Maximum returns the largest value in a group:
{{=MAX(Field name)}}
Minimum returns the smallest value in a group:
{{=MIN(Field name)}}
For more, see tag formulas.
Share invoices via email
Click "Share document via Gmail" to add an email block.
You can also send invoices through Outlook.
Build the email body. Use tags to personalise the recipient address, subject, and content.
You can also add an email block by clicking the plus icon between blocks.
Customise the file settings
Click "Add attachments" in the email block.
Pick the format you want to send. For invoices, PDF is usually the right choice.
Save your changes.
For more on file types, see file formats.
Set up a Record outputs block
A Record outputs block writes a link to each generated file back into your source sheet. You'll know which rows have been processed and where the output lives.
The block adds new columns to your sheet with the output links.
Because we turned on "Create PDF copy", the generated PDFs also show up on the Outputs page.
Run the automation
Click the lightning icon to see all the blocks in your workflow. Green ticks mean every block is set up correctly.
Click "Automate", then "Start". Portant will generate an invoice for each row.
You can also run the workflow on a specific range of rows instead of all of them. Pick "Custom range" from the dropdown.
To have Portant run automatically every time a new row is added, switch on Auto-create. See auto-create from a Google Sheet for details.
Start from a template in the gallery
If you'd rather not build from scratch, the template gallery has a ready-made invoice workflow with the source sheet and template prewired. Open the gallery and pick the Invoice Workflow.
Click "Copy Workflow".
Portant copies the workflow into your account.
All blocks are configured and ready to customise.
From here, edit each block to match your own data and template.