Overview
This node integrates with the NetSuite REST API to perform various record management operations. Specifically, the Insert Record operation allows users to create new records of different types in their NetSuite account. This is useful for automating data entry tasks such as adding new customers, sales orders, invoices, or custom records directly from workflows.
Common scenarios include:
- Automatically creating sales orders when a new order is received on an e-commerce platform.
- Adding new customer records from a CRM system.
- Inserting custom records for specialized business processes.
- Creating invoices or purchase orders based on external triggers.
By using this node, users can streamline and automate interactions with NetSuite without manual data entry, improving efficiency and reducing errors.
Properties
| Name | Meaning |
|---|---|
| Record Type | The type of NetSuite record to insert. Options include many standard record types such as Assembly Item, Billing Account, Calendar Event, Cash Sale, Charge, Contact, Customer, Invoice, Sales Order, Vendor Bill, and more. Also supports Custom Records by specifying a script ID. |
| Custom Record Script ID | (Required if Record Type is "Custom") The internal identifier of the custom record type to insert. Usually starts with customrecord. |
| Replace Sublists | (Optional) Comma-separated names of sublists on the record where all existing lines will be replaced with those specified in the request. Sublists not listed will have lines added instead of replaced. |
| API Version | The version of the NetSuite REST API to use. Currently only "v1" is supported. |
| Options | Additional options: - Concurrency: Maximum number of simultaneous REST requests sent to NetSuite (default 1). - Full Response: Whether to return the full HTTP response data instead of just the body. |
Output
The output contains JSON objects representing the response from NetSuite after inserting the record(s). The structure typically includes:
- The inserted record's data fields as returned by NetSuite.
- Metadata such as success status, any validation errors, and IDs assigned by NetSuite.
- If the "Full Response" option is enabled, the output includes HTTP status code, headers, and full response body.
No binary data output is produced by this operation.
Dependencies
- Requires valid NetSuite API credentials including authentication tokens and account information.
- Uses the
@fye/netsuite-rest-apipackage internally to make REST API calls. - Supports concurrency control via the
p-limitpackage to manage parallel requests. - Requires n8n credentials setup with appropriate permissions to create records in the target NetSuite account.
Troubleshooting
- Authentication Errors: Ensure that the API credentials are correctly configured and have sufficient permissions to insert records.
- Invalid Record Type or Script ID: When inserting custom records, verify that the custom record script ID is correct and exists in NetSuite.
- Validation Errors: If the inserted data does not meet NetSuite's schema or business rules, the API may return validation errors. Check the error details in the response.
- Concurrency Issues: Setting concurrency too high may lead to rate limiting or throttling by NetSuite. Adjust the concurrency option accordingly.
- Unsupported Operation Error: If an unsupported operation name is provided, the node throws an error unless "Continue On Fail" is enabled.