Post Attachment
Xero
Xero
Post Attachment
Upload one or more attachments to a Xero document. Each file's filename is taken from the file metadata.
ActionAI Tool
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
xero_tenant_id | dropdown | Required | The Xero organisation (tenant) to target. Loaded dynamically from the connected account's authorised organisations. |
endpoint | select | Required | Xero parent endpoint for the document that will receive the attachment. (options: Invoices, Receipts, CreditNotes, RepeatingInvoices, BankTransactions, BankTransfers, Contacts, Accounts, ManualJournals, PurchaseOrders, Quotes) |
document_id | text | Required | GUID of the parent document (for example InvoiceID, ContactID, or ReceiptID). |
files | files | Required | Files to upload (up to 10 per document). Each file's filename and mimeType are used for the Xero attachment path and Content-Type. Filenames containing <, >, :, ", /, \, |, ?, *, \0, or + are rejected by Xero. |
include_online | yes/no | Optional | When true, include the attachment with the online invoice view. Supported for AR invoices and AR credit notes. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code from the Xero API response. |
body | object | Structured Xero response containing the uploaded attachment metadata. |
Attachments | array of object | Attachments uploaded against the parent document. |
AttachmentID | text | Xero attachment identifier. |
FileName | text | Attachment filename. |
Url | text | URL that can be used to download the attachment content. |
MimeType | text | MIME type of the attachment. |
ContentLength | text | Attachment size in bytes as returned by Xero. |
IncludeOnline | yes/no | Whether the attachment is included with the online invoice view. |