Socket
Book a DemoInstallSign in
Socket

@digitalnodecom/node-red-contrib-netsuiteauth

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalnodecom/node-red-contrib-netsuiteauth

A custom Node-RED node for NetSuite OAuth 1.0

1.0.4
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

Node-RED NetSuite Integration

A collection of Node-RED nodes to interact with NetSuite using OAuth 1.0 authentication and the REST API.

Features

  • OAuth 1.0 authentication configuration for NetSuite
  • REST API requests to NetSuite records
  • SuiteQL API requests for advanced querying

Prerequisites

  • Node-RED installed and running
  • NetSuite account with REST Web Services enabled
  • NetSuite Integration Record with OAuth 1.0 credentials

Nodes

NetSuite OAuth Config

This configuration node stores NetSuite OAuth 1.0 credentials required for authenticating with the NetSuite REST API.

Configuration

ParameterDescription
NameA name for this configuration
Consumer KeyOAuth Consumer Key from NetSuite Integration Record
Consumer SecretOAuth Consumer Secret from NetSuite Integration Record
TokenOAuth Token from NetSuite Integration Record
Token SecretOAuth Token Secret from NetSuite Integration Record
OAuth RealmNetSuite Account ID (e.g., 888063_SB1)

Setup

  • In Node-RED, add a new "NetSuite OAuth Config" node
  • Enter your NetSuite OAuth credentials
  • Click "Add" to save the configuration

This shared configuration can be used by other NetSuite nodes in your flows.

NetSuite REST API Request

This node allows you to perform CRUD operations against NetSuite records using the REST API.

Configuration

ParameterDescription
NameA name for this node
OAuth ConfigSelect your NetSuite OAuth configuration
HTTP MethodSelect GET, POST, PUT, PATCH, or DELETE
URLBase URL for the NetSuite REST API (https://[accountid].suitetalk.api.netsuite.com/services/rest/record/v1)
NetSuite ObjectSelect the NetSuite record type to interact with (e.g., customer, invoice, etc.)
LimitMaximum number of records to return (for GET requests)
OffsetStarting offset for pagination (for GET requests)
ID of the objectInternal ID of the record (for GET, PATCH, DELETE operations)
External ID of the objectExternal ID of the record (for PUT operations)
BodyJSON body for POST, PUT, and PATCH operations

Input

The node can be configured either through the node configuration or dynamically via msg properties:

  • msg.payload.url - Overrides the configured URL
  • msg.payload.method - Overrides the configured HTTP method
  • msg.payload.netsuiteobject - Overrides the configured NetSuite object
  • msg.payload.limit - Overrides the configured limit
  • msg.payload.offset - Overrides the configured offset
  • msg.payload.objectid - Overrides the configured internal ID
  • msg.payload.objectexternalid - Overrides the configured external ID
  • msg.payload.bodyNetsuite - Overrides the configured body

Output

  • msg.payload.data - Contains the response data from NetSuite
  • msg.payload.headers - Contains the response headers
  • msg.payload.statusCode - Contains the HTTP status code
  • msg.error - Contains error details if the request fails

HTTP Method Usage

  • GET: Retrieve records. Use with limit/offset for lists or objectid for single records
  • POST: Create new records. Requires a valid JSON body
  • PUT: Update records with external ID. Requires both objectexternalid and a valid JSON body
  • PATCH: Update specific fields of a record. Requires objectid and a valid JSON body
  • DELETE: Delete a record. Requires objectid

NetSuite SuiteQL API Request

This node allows you to run SuiteQL queries against the NetSuite API.

Configuration

ParameterDescription
OAuth ConfigSelect your NetSuite OAuth configuration
URLThe SuiteQL endpoint URL (https://[accountid].suitetalk.api.netsuite.com/services/rest/query/v1/suiteql)
BodyThe SuiteQL query body in JSON format

Input

The node can be configured either through the node configuration or dynamically via msg properties:

  • msg.url - Overrides the configured URL (optional)
  • msg.payload.body - Overrides the configured body (optional)

Output

  • msg.payload - Contains the response data from NetSuite
  • msg.error - Contains error details if the request fails

SuiteQL Query Format

SuiteQL queries should be formatted in the body as:

{ "q": "SELECT id, entityid FROM customer WHERE companyname LIKE 'A%'" }

URL Structure

  • REST API Base URL: https://[accountid].suitetalk.api.netsuite.com/services/rest/record/v1
  • SuiteQL API URL: https://[accountid].suitetalk.api.netsuite.com/services/rest/query/v1/suiteql

Replace [accountid] with your NetSuite account ID.

Error Handling

Both nodes include error handling that captures and reports NetSuite API errors:

  • NetSuite error details are included in the msg.error property
  • Error status is displayed in the node status indicator in the Node-RED editor
  • Detailed error information is logged to the Node-RED debug console

Dependencies

  • axios: For HTTP requests
  • crypto: For OAuth signature generation

Keywords

node-red

FAQs

Package last updated on 29 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.