1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

stripe → Bulk Download of Stripe PDF Invoices

AI-generated

Overview

This node enables bulk downloading of PDF invoices from Stripe. It is particularly useful for automating the retrieval and archival of customer invoices, such as for accounting, compliance, or reporting purposes. For example, a business could use this node to periodically fetch all invoices for a specific customer or date range, saving them as binary files in a workflow for further processing or storage.

Properties

Name Meaning
Secret Key Stripe restricted API secret key. Only for invoices. See Stripe documentation for details.
Customer ID The customer ID in Stripe for whom you want to retrieve invoices. If left empty, invoices for all customers will be loaded.
From Date The start date (inclusive) from which invoices should be retrieved.
Until Date The end date (inclusive) until which invoices should be retrieved.
Naming Pattern File naming pattern for downloaded invoices. Options: date_invoicenumber, customerId_date_invoicenumber, date_customerId_invoicenumber, invoice_invoicenumber. Defaults to date_invoicenumber.
Binary Property Name of the binary property where the PDF data will be stored. Default is data.

Output

  • Binary Data:
    Each output item contains a binary property (default name: data) holding the PDF file of an invoice.
  • JSON Metadata:
    The original JSON input is preserved alongside the binary data.
  • File Naming:
    The filename is set according to the selected naming pattern.

Example Output Structure

{
  "json": { /* original input data */ },
  "binary": {
    "data": {
      "fileName": "2024-06-01_INV12345.pdf",
      "mimeType": "application/pdf",
      "data": "<base64-encoded-pdf>"
    }
  }
}

Dependencies

  • External Service: Requires access to the Stripe API with a restricted secret key that allows reading invoices.
  • n8n Credentials: The node expects the 1001fxApi credential to be configured.
  • Environment: Internet access to https://api.1001fx.com.

Troubleshooting

  • Invalid API Key:
    Error message: error: Invalid API Key provided.
    Solution: Ensure the correct restricted Stripe secret key is used and has permissions for invoices.

  • No Invoices Found:
    Error message: error: No invoices found for the specified criteria.
    Solution: Check the Customer ID, date range, and ensure invoices exist in Stripe for those parameters.

  • Permission Denied:
    Error message: error: Permission denied.
    Solution: Verify the restricted API key has the necessary permissions for invoice retrieval.

  • Output Binary Property Missing:
    If the specified binary property name is not present in the output, check that the property matches the value set in "Binary Property".

Links and References

Discussion