Azure Blob Storage icon

Azure Blob Storage

Interact with Azure Blob Storage, containers and blobs.

Actions6

Overview

This node allows you to interact with Azure Blob Storage, specifically focusing on the "Blob" resource and the "Get" operation. It retrieves a specific blob (file or object) from a given container in your Azure Blob Storage account. This is useful for automating workflows that require downloading files, processing stored data, or integrating Azure Blob Storage with other services.

Common scenarios:

  • Downloading files from Azure Blob Storage for further processing in n8n.
  • Fetching configuration files, images, or documents stored in blobs.
  • Integrating Azure-stored data into automated business processes.

Example:
You might use this node to fetch a daily report file from Azure Blob Storage and then email it, process its contents, or move it to another system.


Properties

Name Type Meaning
Container Name String The name of the storage container where the blob resides.
Blob Name String The name (and path, if applicable) of the blob to retrieve. Supports folder-like paths.

Output

The node outputs an item with the following structure:

  • json: An object containing metadata about the retrieved blob:

    • blobName: Name of the blob.
    • blobType: Type of the blob (e.g., BlockBlob).
    • contentEncoding: Content encoding of the blob, if set.
    • contentLanguage: Content language of the blob, if set.
    • contentLength: Size of the blob in bytes.
    • contentType: MIME type of the blob.
    • lastAccessed: Last access time.
    • lastModified: Last modification time.
    • leaseDuration, leaseState, leaseStatus: Lease information for the blob.
  • binary: Contains the actual binary data of the blob under the property data. The mimeType field is also included to indicate the content type.

Example output:

{
  "json": {
    "blobName": "my-folder/my-file.txt",
    "blobType": "BlockBlob",
    "contentEncoding": null,
    "contentLanguage": null,
    "contentLength": 12345,
    "contentType": "text/plain",
    "lastAccessed": "2024-06-01T12:00:00Z",
    "lastModified": "2024-06-01T11:59:00Z",
    "leaseDuration": null,
    "leaseState": "available",
    "leaseStatus": "unlocked"
  },
  "binary": {
    "data": { /* binary file data */ },
    "mimeType": "text/plain"
  }
}

Dependencies

  • Azure Storage Account: You must have access to an Azure Storage account with the appropriate permissions.
  • API Key/Credentials: Requires n8n credentials of type azureStorageApi, which should include a valid connection string.
  • External Library: Uses the @azure/storage-blob npm package (bundled with the node).

Troubleshooting

Common issues:

  • Invalid Credentials: If the connection string is incorrect or expired, authentication will fail.
  • Container/Blob Not Found: If the specified container or blob does not exist, the node may throw an error indicating the resource was not found.
  • No Binary Data Exists on Item!: This error is unlikely for the "Get" operation but can occur in upload/download operations if binary data is missing.

Error messages and resolutions:

  • "No binary data exists on item!": Ensure the blob exists and the correct names are provided.
  • "No binary data property ... does not exists on item!": Double-check the blob name and container name for typos.
  • Permission Denied: Make sure the Azure credentials have read access to the specified container and blob.

Links and References

Discussion