NetSuite icon

NetSuite

NetSuite REST API

Overview

This node integrates with the NetSuite platform, enabling users to execute SuiteQL queries and perform various record operations via NetSuite's REST API. The "Execute SuiteQL" operation specifically allows running custom SuiteQL queries to retrieve data from NetSuite in a flexible and powerful way.

Common scenarios where this node is beneficial include:

  • Extracting complex datasets from NetSuite using SQL-like queries.
  • Retrieving large volumes of records with pagination support.
  • Automating data synchronization between NetSuite and other systems.
  • Running ad-hoc queries for reporting or analytics purposes.

For example, a user might run a SuiteQL query to fetch all sales orders created within a specific date range or list customer records with certain attributes, then use the output in subsequent workflow steps.

Properties

Name Meaning
Query The SuiteQL query string to execute against NetSuite's database.
Return All Boolean flag indicating whether to return all matching results or limit the number of returned records.
Limit Maximum number of records to return when "Return All" is false (range: 1 to 1000).
Offset Number of records to skip before starting to return results (used for pagination).
API Version The version of the NetSuite REST API to use; currently only "v1" is supported.
Options Additional options including:
   Concurrency Controls how many concurrent REST requests are sent to NetSuite at once (default is 1).
   Full Response If true, returns the full HTTP response data instead of just the body.

Output

The node outputs an array of JSON objects representing the rows returned by the SuiteQL query. Each item in the output corresponds to one record or row from the query result.

The structure of each JSON object matches the columns selected in the SuiteQL query, with key-value pairs representing column names and their values.

If the "Full Response" option is enabled, the output includes additional metadata such as HTTP status code and headers alongside the body.

No binary data output is produced by this node.

Dependencies

  • Requires valid NetSuite API credentials with appropriate permissions to execute SuiteQL queries.
  • Uses NetSuite REST API v1 endpoints.
  • Supports concurrency control to manage rate limits and optimize performance.
  • Requires n8n credentials configured with necessary authentication tokens or API keys for NetSuite access.

Troubleshooting

  • Common Issues:

    • Invalid or malformed SuiteQL queries will cause errors; ensure the query syntax is correct.
    • Insufficient permissions or invalid credentials will result in authentication errors.
    • Exceeding API rate limits may cause request failures; adjust concurrency accordingly.
    • Pagination parameters (limit and offset) must be within allowed ranges to avoid errors.
  • Error Messages:

    • "The operation \"runSuiteQL\" is not supported!" — indicates an unsupported operation was requested; verify the operation name.
    • API error responses include error codes and messages from NetSuite; review these for details on issues like invalid queries or permission problems.
    • Network or connectivity errors may occur if the NetSuite service is unreachable.
  • Resolutions:

    • Validate SuiteQL syntax using NetSuite tools before running in the node.
    • Check and update API credentials and permissions.
    • Reduce concurrency or add delays if hitting rate limits.
    • Use the "Return All" and pagination options carefully to manage large datasets.

Links and References

Discussion