Overview
This node enables interaction with Azure Blob Storage, specifically focusing on file operations within containers. The File Upload operation allows users to upload files (binary data) to a specified container in Azure Blob Storage. It is useful for automating the process of storing files such as images, documents, or any binary content into cloud storage directly from workflows.
Common scenarios include:
- Automatically uploading generated reports or logs to Azure Blob Storage.
- Storing user-uploaded files from web forms or applications.
- Backing up files from other systems into Azure Blob Storage.
For example, you can configure this node to take a binary file from previous workflow steps and upload it to a designated container, optionally setting metadata, tags, and controlling whether existing blobs are overwritten.
Properties
| Name | Meaning |
|---|---|
| Container Name | The name of the Azure Blob Storage container where the file will be uploaded. This must be an existing container. |
| Binary Property | The name of the binary property in the input data that contains the file data to upload. Defaults to "data". |
| Blob Name | The name to assign to the blob (file) in Azure Storage. If left empty, the original filename from the binary data or a timestamp-based default name will be used. |
| Content Type | The MIME type of the file being uploaded. If not specified and the binary data is a string, defaults to "application/octet-stream". |
| Options - Metadata | Optional key-value pairs to add as metadata to the uploaded blob. Multiple metadata entries can be added. |
| Options - Tags | Optional key-value pairs to tag the uploaded blob. Multiple tags can be added. |
| Options - Overwrite | Boolean flag indicating whether to overwrite an existing blob with the same name. Defaults to true. If set to false and the blob exists, the upload will fail with an error. |
Output
The node outputs an array of items corresponding to each input item processed. Each output item contains:
json: An object with details about the uploaded blob:blobName: The name of the uploaded blob.containerName: The container where the blob was uploaded.contentType: The MIME type of the uploaded file.size: Size of the uploaded file in bytes.etag: The entity tag of the blob (used for concurrency control).lastModified: Timestamp of the last modification.requestId: Azure request identifier for the upload operation.url: The full URL to access the uploaded blob.sasKey(optional): A SAS token if present in credentials, allowing access to the blob.
binary: The original binary data passed through unchanged.
If the upload fails due to overwrite restrictions or missing data, an error is thrown unless "Continue On Fail" is enabled, in which case the error message is included in the output JSON under error.
Dependencies
- Requires an Azure Blob Storage account with appropriate permissions.
- Needs an API authentication credential configured in n8n that supports one of these methods:
- Connection string
- Account name and key
- SAS token
- Uses the official Azure SDK for JavaScript (
@azure/storage-blob) bundled internally.
Troubleshooting
Error: "No binary data property ..."
Occurs when the specified binary property does not exist in the input data. Verify the property name matches exactly and that the previous node provides binary data.Error: "Failed to decode binary data"
Indicates the binary data is not valid base64. Ensure the binary data is correctly encoded.Error: "Blob ... already exists and overwrite is disabled"
Happens if a blob with the same name exists and the "Overwrite" option is set to false. Either enable overwrite or choose a unique blob name.Error: "Invalid authentication method"
Means the provided credentials do not match expected authentication types. Check your Azure credentials configuration.Error: "Failed to create Azure Blob Service Client"
Usually caused by invalid or incomplete credentials. Double-check your Azure connection details.