Overview
This node provides a flexible way to interact with the NetSuite REST API by allowing users to perform raw HTTP requests. It supports multiple request types such as Record, SuiteQL, Workbook, and Dataset, enabling advanced users to execute custom queries or operations beyond predefined actions.
Common scenarios where this node is beneficial include:
- Executing custom SuiteQL queries to retrieve complex data sets.
- Performing CRUD operations on various NetSuite records using direct REST endpoints.
- Accessing or manipulating workbooks and datasets via their specific API paths.
- Sending arbitrary HTTP methods (GET, POST, PATCH, DELETE, etc.) to any valid NetSuite REST path for specialized integrations.
Practical example:
- A user wants to run a SuiteQL query to fetch sales orders with specific criteria not covered by standard nodes. They can use this node with the "SuiteQL" request type, set the HTTP method to POST, provide the SuiteQL query in the body, and receive the results directly.
Properties
| Name | Meaning |
|---|---|
| Request Type | The category of the request to send. Options: Record, SuiteQL, Workbook, Dataset. Determines the API endpoint structure and semantics. |
| HTTP Method | The HTTP method to use for the request. Options: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT. |
| Path | The relative URL path for the REST request. For example, services/rest/record/v1/salesOrder. Can be a full URL starting with http:// or https://, in which case only the path and query are used internally. |
| Body | The request body as a string. Used for methods that support a body (e.g., POST, PATCH). If empty, the input item's JSON data will be used as the body if available. |
| Options | Additional options for the request: |
| Concurrency | Maximum number of concurrent REST requests sent at the same time. Default is 1. Controls parallelism for batch processing. |
| Full Response | Boolean flag to return the full HTTP response including status code, headers, and body instead of just the response body. Useful for debugging or when metadata is needed. |
Output
The output is an array of JSON objects representing the response(s) from the NetSuite REST API calls.
- By default, the
jsonfield contains the parsed response body from the API. - If the "Full Response" option is enabled, the output includes an object with:
statusCode: HTTP status code of the response.headers: HTTP response headers.body: Parsed response body.
No binary data output is produced by this node.
Dependencies
- Requires valid NetSuite API credentials configured in n8n, including authentication tokens and account details.
- Uses the
@fye/netsuite-rest-apipackage internally to make authenticated REST API calls. - Supports concurrency control via the
p-limitpackage to manage parallel requests.
Troubleshooting
Common issues:
- Incorrect or missing API credentials will cause authentication failures.
- Invalid or malformed paths or HTTP methods may result in 4xx errors from the NetSuite API.
- Exceeding concurrency limits or API rate limits may cause throttling or request failures.
- Providing invalid JSON in the Body property can cause request parsing errors.
Error messages:
- Errors returned from the API are captured and presented in the output JSON under an
errorkey if "Continue On Fail" is enabled. - Typical error messages include authorization errors, resource not found, or validation errors with detailed messages extracted from the API response.
- Errors returned from the API are captured and presented in the output JSON under an
Resolution tips:
- Verify API credentials and permissions.
- Double-check the request path and HTTP method.
- Use the "Full Response" option to get detailed HTTP response info for debugging.
- Reduce concurrency if hitting rate limits.
- Validate JSON syntax in the Body field before execution.
Links and References
- NetSuite REST API Documentation
- SuiteQL Query Language Guide
- n8n Documentation on Credentials
- p-limit npm package (used internally for concurrency control)