Description
n8n-nodes-netsuite-restlet-suiteql
This is an n8n community node that lets you interact with NetSuite using OAuth 1.0a authentication. It supports both RESTlet operations and SuiteQL queries.
n8n is a fair-code licensed workflow automation platform.
Features
- OAuth 1.0a Authentication: Secure authentication using NetSuite’s OAuth 1.0a standard
- SuiteQL Support: Execute SQL-like queries against your NetSuite data
- RESTlet Operations: Call custom NetSuite RESTlet scripts
- Record Operations: Full CRUD operations on NetSuite records
– Automatic Pagination: Fetch all pages of results automatically
– Configurable Limits: Control the number of results per page
– Smart OAuth Handling: Proper signature generation for paginated requests
– Automatic Pagination: Fetch all pages of results with configurable start/end indices
– Flexible Configuration: Customize field names for pagination and results
– Custom Company URL: Support for different RESTlet domains
– File Upload: Upload PDF and Excel files to NetSuite via RESTlet
– Create records
– Get records by ID
– Update records (PUT and PATCH)
– Post actions to records
– Transform records (e.g., Sales Order to Invoice)
Installation
Follow the installation guide in the n8n community nodes documentation.
npm
npm install n8n-nodes-netsuite-restlet-suiteql
n8n
1. Go to Settings > Community Nodes
2. Select Install
3. Enter n8n-nodes-netsuite-restlet-suiteql in the Package Name field
4. Click Install
Configuration
Prerequisites
Before using this node, you need to set up OAuth 1.0a authentication in NetSuite:
1. Create an Integration Record:
– Navigate to Setup > Integration > Manage Integrations > New
– Check “Token-Based Authentication”
– Save and note down the Consumer Key and Consumer Secret
2. Create an Access Token:
– Navigate to Setup > Users/Roles > Access Tokens > New
– Select your Integration, User, and Role
– Save and note down the Token ID and Token Secret
Credentials
When setting up the NetSuite OAuth1 API credentials in n8n, you’ll need:
1234567.suitetalk.api.netsuite.com)1234567.restlets.api.netsuite.com). Leave empty to use the Company URL above.Operations
SuiteQL
Execute SQL-like queries against your NetSuite data with automatic pagination support.
#### Parameters
– When enabled: Automatically follows pagination links until all data is retrieved
– When disabled: Returns only the specified number of results
#### Pagination
When “Return All Pages” is enabled, the node will:
hasMore field)next link in the response to fetch subsequent pagesThis eliminates the need to manually handle pagination when working with large datasets.
Example Query:
SELECT id, companyName, email FROM customer WHERE subsidiary = '1' LIMIT 10
Example Query with Pagination:
SELECT
Item.id,
Item.itemId as sku,
SUM(InventoryBalance.quantityAvailable) as total_quantity
FROM
Item
LEFT JOIN
InventoryBalance ON InventoryBalance.item = Item.id
WHERE
BUILTIN.DF(Item.itemType) IN ('Assembly/Bill of Materials','Inventory Item')
AND Item.isinactive = 'F'
GROUP BY
Item.id, Item.itemId
ORDER BY
Item.id ASC
With “Return All Pages” enabled, this query will automatically fetch all inventory items across multiple pages.
RESTlet Operations
Call custom NetSuite RESTlet scripts with automatic pagination support and file upload capabilities.
#### Call RESTlet
Execute a custom RESTlet script with optional automatic pagination.
#### Parameters
customscriptmyrestlet)customdeploymyrestlet)– When enabled: Additional pagination options appear
start)end)results)#### Pagination
When “Return All” is enabled, the node will:
total countExample Body (without pagination):
{
"id": "19405",
"type": "savesearchdata",
"start": 0,
"end": 1000
}
Example with Pagination Enabled:
start and end values in each requestThe response will contain:
{
"results": [...all items from all pages...],
"total": 5432
}
#### Upload File
Upload PDF or Excel files to NetSuite via a RESTlet endpoint. The node automatically converts the file to base64 and determines the file type from the extension.
Parameters:
123)1){{ $binary.data.fileName }})Supported File Types:
.pdf) – Automatically detected as PDF type.xlsx, .xls) – Automatically detected as EXCEL typeRequest Body Sent:
{
"postType": "uploadFile",
"folderId": "12345",
"name": "document.pdf",
"base64Content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iai...",
"fileType": "PDF"
}
Prerequisites:
Example Workflow:
1. Use “HTTP Request” or “Read Binary File” node to get a file
2. Connect to the NetSuite node
3. Select Resource: RESTlet
4. Select Operation: Upload File
5. Configure the RESTlet IDs and folder ID
6. The file will be uploaded automatically
Record Operations
#### Create
Create a new record in NetSuite. Returns the newly created record’s ID and location.
Example Body:
{
"entity": "12345",
"trandate": "2024-12-04",
"item": {
"items": [
{
"item": "123",
"quantity": 1,
"rate": 100
}
]
}
}
Response:
{
"id": "54321",
"location": "/services/rest/record/v1/salesOrder/54321"
}
The node automatically extracts the record ID from the Location header returned by NetSuite.
#### Get
Retrieve a record by its internal ID.
#### Update (PUT)
Replace an entire record with new data.
#### Update (PATCH)
Update specific fields of a record without replacing the entire record.
#### Post Action
Post a specific action to a record.
#### Transform
Transform one record type into another (e.g., Sales Order to Invoice).
Parameters:
salesOrder)invoice)Resources
Version History
1.0.3
1.0.0
– Configurable start/end index fields
– Configurable results field name
– Custom RESTlet Company URL support
License
Support
For issues, questions, or contributions, please visit the GitHub repository.
Author
cafeasp
—
Note: This is a community-maintained node and is not officially supported by n8n or Oracle NetSuite.