Azure Blob: Put Node
The Azure Blob: Put Node allows a workflow to upload a file into an Azure Blob Storage container.

Node Properties
There are several configuration parameters for the Azure Blob: Put Node ...
Credential Configuration
There are two options for configuring credentials:

Service Credential
Select an account key previously saved in Losant as an Azure service credential. Note: This option is not available in Edge Workflows.
Direct Input of Azure Credentials
There are two parts to directly configuring credentials, and both of them are templatable:
- Account Template (Required)
- Account Key Template (Required)
We recommend that you create an account key specifically for use in Losant workflows (keys that only have access to the proper Azure Blob container).
We also recommend that you store these values as workflow globals or service credentials.
Blob Configuration

Next is to configure the fields required by Azure Blob Storage. All applicable fields are templatable:
- Container Name Template: (Required) The name of the container within the configured storage account.
- Blob Name Template: (Required) The name of the blob to upload, including the extension. If you wish to upload the file to a subdirectory within the container, the path should be included in this field. (e.g. "path/to/my/file.ext")
- Note: A leading slash (i.e. a subdirectory path beginning with "/") will cause Azure to create a directory with no name. Therefore, we do not recommend starting your directory with a leading slash.
- Content Type Template: (Required) MIME type of the data being uploaded.
Note: It is currently only possible to upload content as a block blob.
Blob Contents
Choose an Input Mode for how to provide the content to upload. There are multiple options, each of which supports string templates ...
- Blob Content Template: If selected, enter the file contents directly. If left blank, your configured file will be uploaded without any content.
- Blob URL Template: If selected, enter a URL to a resource that is publicly available via an HTTP GET request. Losant will download the file and upload its content to the Azure container. This option is useful, for example, when using the Temporary URL Output option in a notebook.
- Local File Path Template: In edge workflows running GEA version 2.1.0 and higher, you can upload a file from the edge device's file system. If selected, specify a path to a file that has been mounted into the agent's Docker container.
- File Encoding: Available when using Blob Content Template or Local File Path Template mode. Specifies the encoding of the data being uploaded. Defaults to UTF-8.
Output

The success or failure of the operation can optionally be placed at the specified payload path. If the operation fails, the result object will contain an error key in addition to the success state.
Node Example
The following is an example of a successful operation:
{
"success": true
}
Node Errors
The following is an example of a failed operation:
{
"success": false,
"error": "Access Denied"
}
When the operation times out, the error value is an object rather than a string:
{
"success": false,
"error": {
"type": "NodeTimeout",
"message": "Timeout running Azure Blob Storage: Put node"
}
}
Related Nodes
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.