Azure Blob Storage icon

Azure Blob Storage

Upload and download files from Azure Blob Storage

Actions4

Overview

This node interacts with Azure Blob Storage to manage files (blobs) within specified containers. The "File" resource with the "List" operation allows users to retrieve a list of blobs stored in a particular container, optionally filtered by a prefix and limited by a maximum number of results.

Common scenarios include:

  • Enumerating all files in a storage container for processing or display.
  • Filtering blobs by a naming pattern using a prefix.
  • Limiting the number of returned blobs to avoid large data loads.

Practical example:

  • A user wants to list all image files starting with "2024/" in a container named "photos" and process only the first 50 entries.

Properties

Name Meaning
Container Name Name of the Azure Blob Storage container from which to list blobs.
Prefix Optional string to filter blobs by their name prefix (e.g., list blobs starting with "img_").
Max Results Maximum number of blobs to return in the list (integer).
Options Not applicable for the List operation (used only for Upload operation).

Output

The output is an array where each item contains a JSON object with the following structure:

{
  "containerName": "string",          // The name of the container queried
  "blobs": [
    {
      "name": "string",               // Blob name
      "size": number,                 // Size of the blob in bytes
      "contentType": "string|null",  // MIME type of the blob content if available
      "lastModified": "string|null", // Last modification date/time of the blob
      "etag": "string|null",          // ETag identifier for the blob version
      "contentMD5": "string|null",   // MD5 hash of the blob content if available
      "url": "string"                // URL to access the blob
    }
  ],
  "totalCount": number                // Number of blobs returned in this list
}

No binary data is output for the List operation.

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 key
    • SAS token
  • Uses the official Azure Storage Blob SDK (@azure/storage-blob) bundled with the node.

Troubleshooting

  • Authentication errors: If the node fails to create the Azure Blob Service Client, verify that the provided credentials are correct and have sufficient permissions.
  • Container not found: Ensure the container name exists in the Azure Blob Storage account.
  • Empty results: If no blobs are returned, check the prefix filter; it might be too restrictive or incorrect.
  • Max Results limit: If fewer blobs than expected are returned, confirm the Max Results parameter is set high enough.
  • Network issues: Connectivity problems can cause timeouts or failures; ensure network access to Azure services.

Links and References

Discussion