Example
Monthly account statement
From a CSV of invoices to a document with one line per customer and a spreadsheet with a chart. 29 instructions.
A real workflow, not a snippet: from a CSV of invoices it writes a document with one line per customer and a spreadsheet with a chart. It is 29 instructions and four notes that explain the canvas from the inside.
The download holds the workflow, the made-up data it reads and a short set of instructions. The two documents come out when you run it.
This is the short example, the one to read first. The monthly close example is the large one: four documents with the same look from one workflow.
How to use it
- Unzip into Documents, so that you end up with the folder
Documents\Escribal-exampleholdingAccount-statement.scribaandinvoices-september.csv. The name matters: it is the folder the workflow names. - Open
Account-statement.scribain Escribal and press Run. Account-statement-September.docxandSummary-September.xlsxappear beside them.
To run it again next month, replace the CSV with the new one, with the same file name, and press Run again. That is all there is to it, and it is what the program is about.
If the folder ended up somewhere else, the run stops without writing anything and tells you exactly where it looked.
What the canvas does, top to bottom
- The data is read: the CSV with its headers, its rows, and a Group and aggregate that adds up what each customer was billed. The CSV is closed without saving: the original is not touched.
- The document is built: title, a subtitle with today’s date, and counts taken from the file itself (12 invoices · 5 customers), which is what shows the numbers come from the data and are not typed in by hand.
- A loop over customers: it formats the amount (
$22,500.00), writes that customer’s line, builds up the summary table, and a condition adds a notice to anyone over $20,000. With this data it fires on two of the five. - The spreadsheet is built: the whole table in one go, a calculation so the range reaches the last customer, the number format, and a bar chart.
What is in the download
| File | What it is |
|---|---|
Account-statement.scriba |
The workflow. This is what you open in Escribal. |
invoices-september.csv |
The source data, made up: 12 invoices from 5 customers. |
README.md |
These same instructions. |
LICENSE.txt |
The MIT license: use the example as a template and change it however you like. |
The paths inside the workflow are portable: there is no folder from the machine it was built on, so it works on yours without changing anything.