Actions68
- Account Actions
- Bank Account Actions
- Code List Actions
- Contact Actions
- Event Actions
- Invoice Actions
- Ledger Actions
- Order Actions
- Tax Report Actions
- Tax Report Setting Actions
- Transport Actions
- Web Hook Actions
Invoice → Add Attachment
AI-generatedSummary
Add a single file attachment to a specified invoice using binary data from the workflow input.
Inputs
- Environment — Select the B2Brouter API environment to use (Test or Live). Defaults to test.
- Invoice ID (required) — The ID of the invoice to which the attachment will be added.
- Binary Property (required) — Name of the binary property in the input item containing the attachment file.
- Filename — Optional filename to override the attachment's filename.
- Use as PDF View — Whether to use the attachment as the PDF view of the invoice (boolean). Defaults to false.
Output shape
a single JSON object with a 'success' boolean indicating operation completion
The operation returns { success: true } on successful upload of the attachment. The node throws errors if the specified binary property is missing or if the API request fails.
Examples
Example 1: Add a PDF file as an attachment to an invoice
Set 'Environment' to 'Test (Staging)' or 'Live (Production)', provide the invoice ID, set 'Binary Property' to the binary file property name (default 'data'), optionally specify a filename override, and choose whether to use as PDF view.