Sync AWS billing invoices with FreeAgent and PostgreSQL tracking
Ready for 3.0What this workflow does
This workflow has 14 nodes and runs on a schedule (cron 30 0 3,4 * *). Along the way it connects Postgres. It also calls api.freeagent.com over HTTP.
How it runs
Trigger: On a schedule (cron 30 0 3,4 * *).
- Calculate Last Month Date Range (Code): runs custom JavaScript code
- Generate AWS Signature (Code): runs custom JavaScript code
- Call AWS For Bills (HTTP Request): calls an HTTP API (POST)
- Parse AWS Response (Code): runs custom JavaScript code
- Filter By Date (Code): runs custom JavaScript code
- Loop Over Invoices (Loop Over Items (Split in Batches)): loops over the items in batches
- Check If Already Processed (Postgres): run a query
- If: checks a condition and branches into true / false
- Prepare FreeAgent Bill (Code): runs custom JavaScript code
- Create FreeAgent Bill (HTTP Request): calls api.freeagent.com (POST)
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: api.freeagent.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Postgres
n8n-nodes-base.postgres - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Automatically retrieve AWS invoices and create corresponding bills in FreeAgent, marking them as paid. This workflow eliminates manual data entry for AWS billing. What It Does 1. Fetches invoices from AWS Invoicing API for the previous month 2. Filters…