npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trg-admin/n8n-nodes-zoho-analytics

v0.1.21

Published

n8n community node for Zoho Analytics with OAuth2

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
  • 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: Get Many, Create, Update
    • Export: Data
    • Import: Into Existing Table, Into New Table
  • Trigger:
    • Zoho Analytics Trigger (receive callback/webhook payloads directly in n8n)

Installation

npm i @trg-admin/n8n-nodes-zoho-analytics

Restart 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
  • 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

Credential behavior:

  • authQueryParameters = access_type=offline
  • authentication = body
  • scope is 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.update

Why is delete excluded by default?

  • Prevents accidental or malicious deletion of analytics data
  • This package does not currently expose a row-delete operation
  • Aligns with security best practices

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
  • Export Data:
    • https://www.zoho.com/analytics/api/v2/bulk-api/export-data.html
  • Import Data into Existing Table:
    • https://www.zoho.com/analytics/api/v2/bulk-api/import-data/existing-table.html
  • Import Data into New Table:
    • https://www.zoho.com/analytics/api/v2/bulk-api/import-data/new-table.html

Import Data

The Import resource supports both Zoho Analytics Bulk Import targets:

  • Import Into Existing Table: POST /workspaces/{workspaceId}/views/{viewId}/data
  • Import Into New Table: POST /workspaces/{workspaceId}/data

Input can be provided as inline DATA text or from an n8n binary property as FILE. Common CONFIG fields are exposed directly (fileType, autoIdentify, importType, tableName, onError, matchingColumns, selectedColumns), and additional CONFIG values can be supplied in Additional Config (JSON).

Trigger Node

Use Zoho Analytics Trigger when you want workflow execution to start from callback requests without adding a separate Webhook node.

  • The trigger exposes a POST callback URL.
  • You can set an optional shared verification token (query parameter based).
  • Incoming request method, headers, query, body, and receive timestamp are forwarded to the workflow output.

This fits Zoho Analytics callbackUrl-based patterns used in bulk asynchronous APIs and also supports generic inbound callback automation.

Development

From monorepo root:

npm run typecheck -w analytics
npm run build -w analytics

From package folder:

npm run typecheck
npm run build

License

MIT