NetSuite icon

NetSuite

NetSuite REST API

Overview

The node provides integration with NetSuite's REST API, allowing users to perform various operations on NetSuite records. Specifically, the "Get Record" operation retrieves a single record of a specified type from NetSuite by its internal or external ID. This is useful for workflows that need to fetch detailed information about specific entities such as customers, sales orders, invoices, or custom records.

Common scenarios include:

  • Fetching customer details before processing an order.
  • Retrieving invoice data for financial reporting.
  • Accessing custom record data for specialized business logic.
  • Expanding sublists and related subrecords automatically for comprehensive data retrieval.

Example: A workflow could use this node to get a Sales Order record by its internal ID, optionally expanding all related sublists like item fulfillments or billing information, then use that data downstream for invoicing or shipment processing.

Properties

Name Meaning
Record Type The type of NetSuite record to retrieve. Options include standard records like Assembly Item, Billing Account, Contact, Customer, Invoice, Sales Order, Vendor, and many others including a Custom Record option.
Custom Record Script ID Required if "Custom Record" is selected as Record Type. This is the internal identifier (script ID) of the custom record type, typically starting with "customrecord".
ID The internal identifier of the record to retrieve. Can be prefixed with eid: to specify an external identifier instead of the internal one.
Restrict Returned Fields Optional comma-separated list of fields and sublists to return in the response, limiting the data retrieved to only those specified.
Expand Sub-resources Boolean flag indicating whether to automatically expand all sublists, sublist lines, and subrecords within the record. When true, the response includes detailed nested data structures.
Simple Enum Format Boolean flag that, when true, returns enumeration values in a simplified format showing only their internal ID values rather than full objects or labels.
API Version The version of the NetSuite REST API to use. Currently only "v1" is supported.
Options Additional options including:
- Concurrency: Number of concurrent REST requests allowed (default 1).
- Full Response: If true, returns the entire HTTP response including headers and status code instead of just the body.

Output

The output is JSON data representing the requested NetSuite record. The structure depends on the record type and the options used:

  • The main JSON object contains the fields of the record.
  • If "Expand Sub-resources" is enabled, nested sublists and subrecords are included in expanded form.
  • If "Restrict Returned Fields" is used, only specified fields and sublists appear.
  • Enumeration fields may be returned either as full objects or simplified internal IDs depending on the "Simple Enum Format" setting.
  • If "Full Response" option is enabled, the output includes HTTP status code, headers, and the body.

No binary data output is produced by this operation.

Dependencies

  • Requires valid NetSuite API credentials with appropriate permissions to access the specified record types.
  • Uses the NetSuite REST API endpoint configured via these credentials.
  • Supports concurrency control to limit simultaneous API calls.
  • Requires n8n environment to have network access to NetSuite services.

Troubleshooting

  • Invalid Record ID: If the provided internal or external ID does not exist, the node will throw an error indicating the record was not found. Verify the ID is correct and accessible.
  • Insufficient Permissions: Errors may occur if the API credentials lack rights to read the specified record type. Ensure the credentials have proper roles assigned.
  • Custom Record Script ID Missing: When using "Custom Record" as the record type, failure to provide the script ID will cause errors. Provide the exact internal script ID string.
  • API Rate Limits: Excessive concurrency or too many requests may trigger rate limiting by NetSuite. Reduce concurrency or add delays if encountering throttling errors.
  • Malformed Field List: Incorrect syntax in "Restrict Returned Fields" can cause partial or failed responses. Use correct field names separated by commas.
  • Network Issues: Connectivity problems between n8n and NetSuite endpoints will cause request failures. Check network settings and firewall rules.

Links and References

Discussion