N/sftp SuiteScript Module for File Management
The N/sftp SuiteScript module enables folder management and file transfers from external SFTP servers using secure connections.
The N/sftp module allows you to manage folders and perform file uploads or downloads from external SSH file transfer (SFTP) servers. It is crucial because it enables seamless data transfers between your NetSuite instance and external platforms, ensuring robust integration with your file management system.
How Does the N/sftp Module Work?
This module is designed specifically for server scripts, facilitating various SFTP operations, which include:
- Establishing connections to remote SFTP servers.
- Uploading and downloading files.
- Managing directories on these servers.
Key Features of the N/sftp Module
- Connection Management: The module provides an
sftp.Connectionobject that represents a connection to a remote FTP server. You can establish this connection using thesftp.createConnection(options)method. - Timeouts: It holds enumerated values for minimum and maximum connection timeouts, as well as port numbers, ensuring that your connections are stable and secure.
- File and Directory Operations: You can perform various operations such as downloading, uploading, creating and removing directories, and listing remote directories using provided methods on the
sftp.Connectionobject.
Important Notes
When using the N/sftp module:
- Wildcards in Paths: Ensure that wildcards like
?and*in paths and filenames are properly escaped unless you intend for them to function as wildcards. - Security: Utilize SSH keys for establishing connections. This approach is safer and is supported by methods in the N/keyControl module, allowing you to manage keys securely within NetSuite.
SFTP Connection Establishment
To establish an SFTP connection, you must utilize SSH keys. This is done via the Private Keys page accessible in NetSuite. Only users with the appropriate permissions can manage these keys. Once set, you can easily integrate SFTP functionality into your scripts.
Who This Affects
- Administrators: Responsible for configuring SFTP settings and managing SSH keys.
- Developers: Who will implement SFTP file transfers in their SuiteScript applications.
Key Takeaways
- The N/sftp module is essential for managing file transfers via SFTP in NetSuite.
- Utilizing secure SSH keys enhances the security of file transfer operations.
- Proper management of paths and escape characters is crucial to avoiding errors during file operations.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Is the N/sftp SuiteScript module compatible with both client and server scripts?
Are there specific permissions required to manage SSH keys for SFTP connections in NetSuite?
How are wildcards in paths handled when using the N/sftp module?
What methods are available in the N/sftp module for managing remote directories?
Was this article helpful?
More in Integration
- Natural Language Queries in NetSuite AI
MCP Standard Tools SuiteApp enables AI-driven data tasks in NetSuite, aligned with role permissions.
- Square Connector Integration in NetSuite 2026.1
Discover the Square Connector for seamless integration with NetSuite 2026.1, synchronizing transactions, orders, and inventory effortlessly.
- SuiteTalk Web Services Updates for NetSuite Integrations
SuiteTalk Web Services adds new Item Supply Plan support, enhancing integrations for efficient data management.
- SuiteTalk Web Services Enhancements in NetSuite
Explore the latest enhancements to SuiteTalk Web Services, improving integration and API functionalities in NetSuite.
Advertising
Reach Integration Professionals
Put your product in front of NetSuite experts who work with Integration every day.
Sponsor This Category