Skip to content

feat(Xero Node): Add accounting.attachments scope to enable attachment uploads - #206

Open
everettbu wants to merge 6 commits into
masterfrom
xero-auth-credential-config
Open

feat(Xero Node): Add accounting.attachments scope to enable attachment uploads#206
everettbu wants to merge 6 commits into
masterfrom
xero-auth-credential-config

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of n8n-io/n8n#21366
Original author: Aaqeb11


Summary

Added accounting.attachments scope to Xero OAuth2 credentials to enable attachment upload functionality. This scope is required by the Xero API for uploading files to invoices, bills, and other Xero entities but was missing from n8n's default Xero OAuth2 scope configuration.

Testing performed:

  • Verified Xero OAuth2 authentication works correctly on n8n cloud instance
  • Deployed and tested on self-hosted n8n instance (AWS EC2)
  • Unable to replicate the reported OAuth2 callback error described in the original issue

Change details:
Added accounting.attachments to the scopes array in Xero OAuth2 credentials:

const scopes = [
	'offline_access',
	'accounting.transactions',
	'accounting.settings',
	'accounting.contacts',
	'accounting.attachments',  // Added scope
];

This enables users to upload PDF attachments and other files to Xero invoices, bills, and contacts without needing to create a workaround using Generic OAuth2 credentials.[2]

Related Linear tickets, Github issues, and Community forum posts

Fixes #20670

Review / Merge checklist

  • PR title and summary are descriptive (conventions)
  • Docs updated or follow-up ticket created
  • Tests included
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Note: The original issue reported an "Unsupported content type: text/html; charset=utf-8" error during OAuth2 callback. This error could not be replicated during testing on either cloud or self-hosted environments. The authentication flow worked correctly in both configurations. If users continue to experience callback errors, further investigation may be needed with additional debug logs and environment-specific details.

Screenshots

Self-hosted n8n
Screenshot 2025-10-30 at 11 18 57 AM
n8n-cloud version
Screenshot 2025-10-30 at 11 19 58 AM


Note

Adds the accounting.attachments scope to Xero OAuth2 credentials to enable attachment uploads.

Written by Cursor Bugbot for commit 12fd677. This will update automatically on new commits. Configure here.

@everettbu everettbu added node/improvement New feature or request community Authored by a community member in linear Issue or PR has been created in Linear for internal review labels Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Authored by a community member in linear Issue or PR has been created in Linear for internal review node/improvement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants