One-way sync Stripe invoice PDFs to a S3 bucket
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects AWS S3. It also calls api.stripe.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- ENV* (Edit Fields (Set)): sets 4 fields: year, month, subFolder…
- Clean and Escape ENV (Edit Fields (Set)): sets 4 fields: bucketName, subFolder, month…
- Get all Invoices* (HTTP Request): calls api.stripe.com
- List Invoices (Split Out): splits a list into separate items
- We do only Invoice Objects (If): checks a condition and branches into true / false
- Download Invoice PDF from Stripe (HTTP Request): calls an HTTP API
- It shouldn't be something else (Stop and Error): stops the run with an error
- Inject s3 Subpath (Edit Fields (Set)): sets 3 fields: _s3_year, _s3_folder, _s3_month
- Set-Subpath (Edit Fields (Set)): sets 1 field: _s3_path
- Upload to S3 Bucket* (AWS S3): upload
Services it uses
HTTP calls to: api.stripe.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 (8)
- Manual Trigger
n8n-nodes-base.manualTrigger - Split Out
n8n-nodes-base.splitOut - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Stop and Error
n8n-nodes-base.stopAndError - HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger - AWS S3
n8n-nodes-base.awsS3
From the author
This automation syncs your Invoice PDFs from Stripe to a (AWS) S3 Bucket each month, in a folder of your choice, with the following subPath: yourFolder/invoiceYear/invoiceMonth/fileName Fill in your Credentials and Settings in the Nodes marked with "". You…