Re-check EU VAT numbers on Stripe invoices with VIES and notify finance via Gmail
Ready for 3.0What this workflow does
This workflow has 22 nodes and runs on Stripe events (invoice.created). Along the way it connects Stripe and Gmail.
How it runs
Trigger: On Stripe events (invoice.created).
- Handle Each Invoice Once (Remove Duplicates): removes duplicate items
- VAT Rules (Edit Fields (Set)): sets 10 fields: seller_country, seller_vat_number, eu_country_codes…
- Read The Buyer (Stripe): get (customer)
- Which VAT Case Is This? (Code): runs custom JavaScript code
- Route The Case (Switch): routes items into 2 branches
- Build The VIES Question (Code): runs custom JavaScript code
- Decide The VAT Treatment (Code): runs custom JavaScript code
- Ask VIES Today (HTTP Request): calls an HTTP API (POST)
- Does The Treatment Change? (If): checks a condition and branches into true / false
- Read The VIES Answer (Code): runs custom JavaScript code
…plus 9 more steps. See the full node list below.
Services it uses
Other Stripe + Gmail templates (44)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Stripe Trigger
n8n-nodes-base.stripeTrigger - Remove Duplicates
n8n-nodes-base.removeDuplicates - Edit Fields (Set)
n8n-nodes-base.set - Stripe
n8n-nodes-base.stripe - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - No Operation, do nothing
n8n-nodes-base.noOp - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge - Wait
n8n-nodes-base.wait - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow triggers when Stripe drafts an invoice, re-checks the customer’s EU VAT number against the EU Commission’s VIES API, updates Stripe’s tax treatment or holds the draft when needed, writes the VIES result into invoice metadata, and…