FlowiseAI/Flowise · error · Error

AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required

Error message

AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required

What it means

Thrown by AzureBlobStorageProvider.initAzureConfig when the AZURE_BLOB_STORAGE_CONTAINER_NAME environment variable is unset or blank. The container name is mandatory regardless of which authentication path is used, so the provider aborts initialization before constructing a BlobServiceClient.

Source

Thrown at packages/components/src/storage/AzureBlobStorageProvider.ts:46

    constructor() {
        super()
        const config = this.initAzureConfig()
        this.containerClient = config.containerClient
        this.containerName = config.containerName
    }

    private initAzureConfig(): {
        containerClient: ContainerClient
        containerName: string
    } {
        const connectionString = process.env.AZURE_BLOB_STORAGE_CONNECTION_STRING
        const accountName = process.env.AZURE_BLOB_STORAGE_ACCOUNT_NAME
        const accountKey = process.env.AZURE_BLOB_STORAGE_ACCOUNT_KEY
        const containerName = process.env.AZURE_BLOB_STORAGE_CONTAINER_NAME

        if (!containerName || containerName.trim() === '') {
            throw new Error('AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required')
        }

        let blobServiceClient: BlobServiceClient

        // Authenticate either using connection string or account name and key
        if (connectionString && connectionString.trim() !== '') {
            blobServiceClient = BlobServiceClient.fromConnectionString(connectionString)
        } else if (accountName && accountName.trim() !== '' && accountKey && accountKey.trim() !== '') {
            const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey)
            blobServiceClient = new BlobServiceClient(`https://${accountName}.blob.core.windows.net`, sharedKeyCredential)
        } else {
            throw new Error(
                'Azure Blob Storage configuration is missing. Provide AZURE_BLOB_STORAGE_CONNECTION_STRING or AZURE_BLOB_STORAGE_ACCOUNT_NAME + AZURE_BLOB_STORAGE_ACCOUNT_KEY'
            )
        }

        const containerClient = blobServiceClient.getContainerClient(containerName)
        return { containerClient, containerName }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Set AZURE_BLOB_STORAGE_CONTAINER_NAME to an existing Azure container name in your environment.
  2. Create the container in the Azure storage account first if it does not exist.
  3. Restart the Flowise process after updating the env so initAzureConfig re-reads it.

Example fix

# before
AZURE_BLOB_STORAGE_ACCOUNT_NAME=myaccount
# after
AZURE_BLOB_STORAGE_ACCOUNT_NAME=myaccount
AZURE_BLOB_STORAGE_CONTAINER_NAME=flowise-storage
Defensive patterns

Strategy: validation

Validate before calling

function requireAzureContainerName(): string {
  const name = process.env.AZURE_BLOB_STORAGE_CONTAINER_NAME
  if (!name || name.trim() === '') {
    throw new Error('AZURE_BLOB_STORAGE_CONTAINER_NAME env variable is required')
  }
  return name.trim()
}
// call at startup before constructing the provider

Type guard

function hasAzureContainerName(env: NodeJS.ProcessEnv): env is { AZURE_BLOB_STORAGE_CONTAINER_NAME: string } & NodeJS.ProcessEnv {
  return typeof env.AZURE_BLOB_STORAGE_CONTAINER_NAME === 'string' && env.AZURE_BLOB_STORAGE_CONTAINER_NAME.trim() !== ''
}

Prevention

When it happens

Trigger: Selecting Azure Blob Storage as the storage backend without setting AZURE_BLOB_STORAGE_CONTAINER_NAME, or setting it to a whitespace-only value. The guard is `!containerName || containerName.trim() === ''` at AzureBlobStorageProvider.ts:45.

Common situations: Missing entry in .env; copying a deployment template that omitted the container name; renaming the container in Azure without updating the env var.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/e2944f8f918132f4. Report an issue: GitHub.