What is the Invoice Generator (CustomJS) node used for?
This node allows users to dynamically generate custom invoice documents within their n8n workflows. It takes data processed by previous nodes and applies user-defined JavaScript logic to format and create the final invoice content. It is a powerful utility for complex Integrations.
How does this node handle variable invoice templates?
The Invoice Generator node uses Custom JavaScript to define the structure and content. This provides maximum flexibility, allowing you to incorporate complex logic, conditional formatting, and data mapping from incoming nodes to customize every aspect of the output, unlike fixed template Integrations.
Is the Invoice Generator (CustomJS) a trigger node in n8n?
No, this is an action node. It does not start a workflow; rather, it receives data input from a preceding node or a trigger, processes that input, and generates the resulting invoice document, usually placed later in the workflow chain.
What kind of input data is required by this invoice node?
It typically requires structured input data (JSON) passed from earlier nodes in the workflow, containing necessary invoice details such as line items, customer information, and totals. The quality of the Integrations upstream affects the output quality of this node.
Can I use this node to automatically send generated invoices via email?
Yes. Once the Invoice Generator node produces the invoice file (often PDF or similar), you can chain it directly to another node, such as an email sending node or cloud storage node, to complete the Integrations and delivery process after the workflow has been initiated by a trigger.