@trg-admin/n8n-nodes-zoho-analytics
v0.1.17
Published
n8n community node for Zoho Analytics with OAuth2
Downloads
1,437
Readme
n8n Zoho Analytics Node
n8n community node for Zoho Analytics API v2 with OAuth2 and automatic token refresh handled by n8n.
⚠️ Security Note: Safe Default Scopes
Important security update (v0.1.2+): Default credential scopes now follow the principle of least privilege—they exclude destructive permissions by default.
- Read and create/update permissions are enabled
- Delete permission is explicitly disabled by default and must be added manually if required
- This protects against accidental or malicious data destruction
See Scope Policy below for details.
Features
- OAuth2 credential extending
oAuth2Api - Region-aware Zoho Accounts endpoints (US, EU, IN, AU, CN)
- Optional Analytics API base URL override
- Automatic access-token refresh delegated to n8n via
requestOAuth2 - Load options for Organizations, Workspaces, and Views
- Operations:
- Organization: Get Many
- Workspace: Get Many
- View: Get Many
- Row: Create, Update, Delete
- Export: Data
Installation
npm i @trg-admin/n8n-nodes-zoho-analyticsRestart n8n after installation.
Credential Setup
Create credentials in n8n using Zoho Analytics OAuth2 API.
Required OAuth endpoints (select matching region):
Authorization URL:
- US:
https://accounts.zoho.com/oauth/v2/auth - EU:
https://accounts.zoho.eu/oauth/v2/auth - IN:
https://accounts.zoho.in/oauth/v2/auth - AU:
https://accounts.zoho.com.au/oauth/v2/auth - CN:
https://accounts.zoho.com.cn/oauth/v2/auth
- US:
Access Token URL:
- US:
https://accounts.zoho.com/oauth/v2/token - EU:
https://accounts.zoho.eu/oauth/v2/token - IN:
https://accounts.zoho.in/oauth/v2/token - AU:
https://accounts.zoho.com.au/oauth/v2/token - CN:
https://accounts.zoho.com.cn/oauth/v2/token
- US:
Credential behavior:
authQueryParameters = access_type=offlineauthentication = bodyscopeis editable (space-separated)
Scope Policy
By default, this node uses the principle of least privilege approach:
Default scopes (safe, no destructive permissions):
ZohoAnalytics.metadata.read
ZohoAnalytics.data.read
ZohoAnalytics.data.create
ZohoAnalytics.data.updateWhy is delete excluded by default?
- Prevents accidental or malicious deletion of analytics data
- Encourages explicit opt-in for destructive operations
- Aligns with security best practices
To enable row deletion:
- Edit the scope field in the credential
- Add
ZohoAnalytics.data.deleteto the end of the scope string:ZohoAnalytics.metadata.read ZohoAnalytics.data.read ZohoAnalytics.data.create ZohoAnalytics.data.update ZohoAnalytics.data.delete - Re-authenticate when prompted by n8n
Previous behavior (v0.1.1 and earlier): Used broad access scopes that inadvertently enabled delete. This was changed in v0.1.2.
OAuth and Token Refresh
This node uses this.helpers.requestOAuth2 for all API calls.
No manual refresh-token logic is implemented. n8n handles token refresh automatically.
Zoho Analytics API References
Implemented endpoints are based on official Zoho Analytics API v2 documentation:
- API spec / server URI:
- https://www.zoho.com/analytics/api/v2/api-specification.html
- Scopes:
- https://www.zoho.com/analytics/api/v2/prerequisites.html
- Get Organizations:
- https://www.zoho.com/analytics/api/v2/metadata-api/get-org.html
- Get All Workspaces:
- https://www.zoho.com/analytics/api/v2/metadata-api/all-workspace.html
- Get Views:
- https://www.zoho.com/analytics/api/v2/metadata-api/get-views.html
- Add Row:
- https://www.zoho.com/analytics/api/v2/data-api/add-row.html
- Update Rows:
- https://www.zoho.com/analytics/api/v2/data-api/update-row.html
- Delete Row:
- https://www.zoho.com/analytics/api/v2/data-api/delete-row.html
- Export Data:
- https://www.zoho.com/analytics/api/v2/bulk-api/export-data.html
Development
From monorepo root:
npm run typecheck -w analytics
npm run build -w analyticsFrom package folder:
npm run typecheck
npm run buildLicense
MIT
