N8N Tools - S3 Enhanced icon

N8N Tools - S3 Enhanced

Enhanced S3 operations with presigned URLs, multipart upload, and advanced features

Head Object

AI-generated

Overview

The node "N8N Tools - S3 Enhanced" provides a comprehensive set of operations to interact with S3-compatible object storage services. It supports advanced features such as generating presigned URLs for secure temporary access, multipart uploads for large files, and detailed bucket and object management capabilities.

This node is beneficial in scenarios where you need to automate or integrate complex S3 workflows within n8n, such as:

  • Generating temporary URLs for clients to upload or download files without exposing credentials.
  • Managing buckets and objects programmatically (create, delete, copy, tag, ACLs).
  • Handling large file uploads efficiently using multipart upload.
  • Querying object content using SQL expressions.
  • Configuring bucket policies, CORS, lifecycle rules, encryption, logging, notifications, and more.

Example use cases:

  • A workflow that generates a presigned URL for a user to upload a file securely.
  • Automating backup by copying objects between buckets.
  • Retrieving metadata of an object without downloading it.
  • Setting bucket lifecycle policies to manage data retention automatically.

Properties

Name Meaning
Bucket Name Name of the S3 bucket to operate on.
Object Key Complete path/key of the object inside the bucket.

For the Head Object operation specifically, these two properties are required.


Output

The output JSON structure for the Head Object operation includes metadata about the specified object without downloading its content:

  • bucket: The bucket name.
  • key: The object key.
  • contentLength: Size of the object in bytes.
  • contentType: MIME type of the object.
  • etag: Entity tag for the object version.
  • lastModified: Timestamp of the last modification.
  • metadata: Custom metadata associated with the object.

No binary data is output for this operation since it only retrieves metadata.


Dependencies

  • Requires valid credentials for an S3-compatible service (access key ID, secret access key, optional session token).
  • Uses AWS SDK v3 for JavaScript internally to communicate with the S3 API.
  • The node expects proper configuration of credentials in n8n with access rights to perform the requested operations.

Troubleshooting

  • Common issues:

    • Invalid or missing credentials will cause authentication failures.
    • Incorrect bucket or object key names may result in "Not Found" errors.
    • Network or endpoint misconfiguration can lead to connection errors.
    • JSON parsing errors if input properties expecting JSON are malformed.
  • Error messages and resolutions:

    • "S3 operation failed: <message>" — General failure; check the detailed message for specifics.
    • "Invalid file data format" — When uploading, ensure file data is correctly base64 encoded or UTF-8 string.
    • "Invalid JSON format" — For properties requiring JSON input, verify the syntax is correct.
    • "Access denied" — Check permissions for the provided credentials.
    • "Cannot connect to endpoint" — Verify network connectivity and endpoint URL.
  • Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.


Links and References

Discussion