Overview
This node integrates with S3-compatible storage services such as MinIO or AWS S3 to perform file uploads and generate presigned URLs. It supports three main operations:
- Upload File: Upload a file (binary or text) to a specified bucket.
- Generate Presigned URL: Create a temporary, secure URL that grants access to an existing object in a bucket without requiring direct authentication.
- Upload and Get Presigned URL: Upload a file and immediately generate a presigned URL for it.
Common use cases include securely sharing files stored in S3/MinIO buckets without exposing credentials, automating file uploads from workflows, and generating time-limited download links for clients or users.
For example, you might upload a report PDF to a bucket and then generate a presigned URL valid for one hour to share with a customer.
Properties
| Name | Meaning |
|---|---|
| Bucket Name | Name of the S3/MinIO bucket where files are uploaded or accessed. |
| Object Key | The key (path) of the object in the bucket for which to generate a presigned URL. |
| Expiration Time (Seconds) | Duration in seconds before the generated presigned URL expires (default 3600 seconds = 1 hour). |
Note: The above properties are relevant specifically for the "Generate Presigned URL" operation.
Output
The node outputs JSON objects containing details about the performed operation:
For Generate Presigned URL:
{ "operation": "presignedUrl", "bucketName": "<bucket name>", "objectKey": "<object key>", "presignedUrl": "<generated presigned URL>", "expiresAt": "<ISO timestamp when URL expires>", "generatedAt": "<ISO timestamp when URL was generated>" }For Upload and Get Presigned URL (also includes upload metadata):
{ "operation": "uploadAndPresign", "bucketName": "<bucket name>", "fileName": "<uploaded file name>", "fileSize": <size in bytes>, "contentType": "<MIME type>", "uploadedAt": "<ISO timestamp>", "url": "<direct URL to uploaded file>", "presignedUrl": "<generated presigned URL>", "expiresAt": "<ISO timestamp when URL expires>" }For Upload File (without presigned URL):
{ "operation": "upload", "bucketName": "<bucket name>", "fileName": "<uploaded file name>", "fileSize": <size in bytes>, "contentType": "<MIME type>", "uploadedAt": "<ISO timestamp>", "url": "<direct URL to uploaded file>" }
If binary data is involved during upload, the node reads the binary content from the specified input field but outputs only metadata and URLs in JSON form; it does not output binary data itself.
Dependencies
- Requires an S3-compatible storage service such as MinIO or AWS S3.
- Needs credentials providing access key ID, secret access key, region, and optionally endpoint URL and path style configuration.
- Uses AWS SDK v3 packages internally for S3 client, commands, and presigned URL generation.
- Requires proper n8n credential setup for the S3/MinIO connection.
Troubleshooting
- Invalid Credentials or Access Denied: Ensure the provided API keys have sufficient permissions for the bucket and operations.
- Bucket or Object Not Found: Verify the bucket name and object key are correct and exist in the storage.
- Expiration Time Too Long or Short: Some services may limit maximum expiration duration for presigned URLs; adjust accordingly.
- Binary Data Issues: When uploading binary files, ensure the input binary field name matches the actual binary property in the incoming data.
- Network or Endpoint Errors: If using a custom endpoint (e.g., MinIO), confirm the endpoint URL and path style settings are correct.
Error messages thrown by the node will include the operation context and item index to help identify problematic inputs.