Published 8 days ago
This workflow automates the retrieval of invoice PDFs from the Smartbill API and saves them to Google Drive in a dynamically created folder based on last month’s date. It also generates a range of invoice numbers, ensuring proper formatting, and uploads each PDF with a structured filename.
Trigger and Data Setup:
The workflow is manually triggered. It sets the invoice range (start and end numbers), invoice series, the parent Google Drive folder ID and the folder where to save the PDF files.
Folder Handling:
YYYY-MM
).Invoice Generation:
A code node generates invoice items by iterating over a specified range of numbers. Each invoice number is padded to custom number of digits (e.g., 0013
), and the invoice series and folder ID are attached to each item.
Retrieving Invoice PDFs:
For each generated invoice, the Smartbill API is called (using an HTTP Request node) to retrieve the corresponding invoice PDF.
Credentials:
Ensure you have configured the Smartbill API (HTTP Basic Auth) and Google API credentials correctly.
Parameter Adjustment:
Modify the SetData
node if you need to change the invoice range, series, or target parent folder.
Execution:
Click Execute Workflow to run the workflow manually.