Track SaaS spend from email invoices with AgentMail, JigsawStack and Postgres

Go to Workflow
0 views
Built by Stephan Koning Stephan Koning
Created on June 05, 2026

Description

WHAT you need

Jigsaw API key for image processing, I use this as a gatekeeper/second pair of eyes.
LINK to their website
https://jigsawstack.com/
SECOND A postgress DATABASE (I use Supabase)
LlamaCloud for the parsing (you can replace this with Jigsaw if you like)
Redis (Optional , but I would strongly advise using it)
agentMail , this is your trigger email adress and BOX
Webhook Trigger (Svix or n8n's builtin webhook)

WHAT is it?
This is an easy way to track your SaaS spending, especially for small business owners or solopreneurs. It's essentially exactly what tools like Spendbase and Ramp do, without the virtual card.

HOW it works
After getting your API keys, all you need to do is set up an AgentMail inbox for your invoices. This is your trigger.

In the current setup, the workflow will only trigger if you send an attachment.

You can find more information on how to use the workflow in the workflow notes.

The database schema
You can find it as a deactivated code node in the workflow.

Free 15 min Onboarding Coffee

If you want I can walk you through the setup and you will have it up and running in no time.
Free onboarding chat

Nodes Used (3)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Postgres
n8n-nodes-base.postgres