ExampleTemplate
Load the bank's daily payment file into the city database
Every morning, reads new payment CSV files from the bank's SFTP folder, cleans and checks them, loads them into a database table, and archives the files. Bad rows are emailed to finance.
This flow
5 steps
StartsOn a schedule
SystemsSFTP server, PostgreSQL / PostGIS
Branches1
Stored recordsNone: pass-through
§ The flow
The whole flow, as it appears on the canvas.
Scroll sideways on small screens. Colors show the kind of step: start, read, change, decide, write.
§ Step by step
What each step does.
- 01 · Start · On a schedule
Weekdays at 6 am
- Weekdays at 6:00 am (workspace time zone)
Then: Read payment files
- 02 · Files · Read files · SFTP server
Read payment files
- Reads files matching
utility-payments-*.csvininboxon SFTP server - Format: CSV, first row has the field names
- Only files new since the last good run
- After a good run, files move to
archive
Then: Clean and check
- Reads files matching
- 03 · Change · Apply rules
Clean and check
account: trimaccount: upperaccount: required (else “Missing account number”)amount: numberamount: between0.01,100000(else “Amount out of range”)receipt: required (else “Missing receipt number”)method: lower- Records that fail a check leave by the Invalid output
Then: Load into utility_payments; Invalid → Email bad rows to finance
- 04 · Database · Write to database · PostgreSQL / PostGIS
Load into utility_payments
- Upserts rows in
utility_paymentskeyed onreceipt
- Upserts rows in
- 05 · Act · Send email
Email bad rows to finance
- Emails
[email protected]: “{{count}} payment rows need a look” - One summary email
- Records attached as CSV
- Emails
§ Systems
Connectors used
Swap any of them for another system with the same kind of data.
Run this flow on your systems.
We'll set up a workspace with your systems in a sandbox and build your first flow with you.