Skip to content

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_iddropdownRequiredThe Xero organisation (tenant) to target. Loaded dynamically from the connected account's authorised organisations.
endpointselectRequiredXero parent endpoint for the document that will receive the attachment. (options: Invoices, Receipts, CreditNotes, RepeatingInvoices, BankTransactions, BankTransfers, Contacts, Accounts, ManualJournals, PurchaseOrders, Quotes)
document_idtextRequiredGUID of the parent document (for example InvoiceID, ContactID, or ReceiptID).
filesfilesRequiredFiles 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_onlineyes/noOptionalWhen true, include the attachment with the online invoice view. Supported for AR invoices and AR credit notes.

Outputs

Name Type Description
statusCodenumberHTTP status code from the Xero API response.
bodyobjectStructured Xero response containing the uploaded attachment metadata.
Attachmentsarray of objectAttachments uploaded against the parent document.
AttachmentIDtextXero attachment identifier.
FileNametextAttachment filename.
UrltextURL that can be used to download the attachment content.
MimeTypetextMIME type of the attachment.
ContentLengthtextAttachment size in bytes as returned by Xero.
IncludeOnlineyes/noWhether the attachment is included with the online invoice view.