Skip to main content

Azure Files Component

Manage files and folders within Azure Files

Component key: azure-files

Description

Azure Files is Microsoft's cloud file sharing platform. While similar to Azure Blob Storage, Azure Files is geared towards creating SMB file shares that groups of users (rather than applications) can use. This component lets you manage files and shares within Azure Files.

Information about Azure Files can be found on their documentation site.

A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.

Connections

Connection String

You can also grant limited access to your Azure Storage Resources using Shared Access Signatures (SAS) authentication, which involves an access token. You can obtain a connection string containing an SAS token from the Azure Portal. Keep in mind this token will eventually expire. Make sure to configure an expiration date you will remember, so you can manually refresh the token at a later date.

InputNotesExample
Connection String

Provide the connection string for your active directory account.

BlobEndpoint=https://example.blob.core.windows.net/;QueueEndpoint=https://example.queue.core.windows.net/;FileEndpoint=https://example.file.core.windows.net/;TableEndpoint=https://example.table.core.windows.net/;SharedAccessSignature=sv=example=rwdlacupitfx&se=2024-05-01T03:51:00Z&st=20

Storage Shared Key

Azure Files can use storageSharedKeyCredential authentication, which involves an account / key pair. You can obtain an account name / account key pair through the Azure Portal.

InputNotesExample
Account Key

Provide the key for your active directory account.

exampleKey
Account Name

Provide the name for your active directory account.

exampleName

Data Sources

Select Share

Select an Azure Files share | key: selectShare | type: picklist

InputNotesExample
Connection

Actions

Copy File

Copy a file | key: copyFile

InputNotesExample
Connection
From Path

An object in Azure Files is a file that is saved in a 'share'. This represents the source object's file path. Do not include a leading /

path/to/source/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share
To Path

An object in Azure Files is a file that is saved in a 'share'. This represents the destination object's file path. Do not include a leading /

path/to/destination/file.txt

{
"data": {
"etag": "\"0x8DCBCA822E54285\"",
"lastModified": "2024-01-01T00:00:00.000Z",
"requestId": "5301e6a8-601a-0012-3491-eeb34f000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z",
"copyId": "e6c57686-c2c8-4340-9d3b-420300d8f4f3",
"copyStatus": "success",
"errorCode": ""
}
}

Create Folder

Create a folder under an existing path | key: createFolder

InputNotesExample
Connection
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"etag": "\"0x8DCBC8DAE40E4E3\"",
"lastModified": "2024-01-01T00:00:00.000Z",
"requestId": "60ef1f64-001a-0059-257e-ee4f1c000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z",
"isServerEncrypted": true,
"filePermissionKey": "125839117919254299*7594252119313965202",
"fileAttributes": "Directory",
"fileCreatedOn": "2024-01-01T00:00:00.000Z",
"fileLastWriteOn": "2024-01-01T00:00:00.000Z",
"fileChangeOn": "2024-01-01T00:00:00.000Z",
"fileId": "13835187797654241280",
"fileParentId": "0",
"errorCode": ""
}
}

Create Share

Create a file share | key: createShare

InputNotesExample
Connection
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"etag": "\"0x8DCBC8DAE40E4E3\"",
"lastModified": "2024-01-01T00:00:00.000Z",
"requestId": "00000000-0000-0000-0000-000000000000",
"version": "2024-01-01",
"date": "2024-01-01T00:00:00.000Z"
}
}

Delete File

Delete a file | key: deleteFile

InputNotesExample
Connection
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"requestId": "5301e6a9-601a-0012-3591-eeb34f000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z",
"errorCode": ""
}
}

Delete Folder

Delete an empty folder under an existing path | key: deleteFolder

InputNotesExample
Connection
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"requestId": "60ef1f68-001a-0059-277e-ee4f1c000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z",
"errorCode": ""
}
}

Delete Share

Delete a file share | key: deleteShare

InputNotesExample
Connection
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"requestId": "59c230c3-201a-003c-0a78-eee158000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z"
}
}

Download File

Download a file | key: downloadFile

InputNotesExample
Connection
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"type": "Buffer",
"data": [
101,
120,
97,
109,
112,
108,
101
]
},
"contentType": "application/octet"
}

List Folder

List files and folders in a folder | key: listFolder

InputNotesExample
Connection
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": [
{
"kind": "file",
"name": "example.txt",
"fileId": "13835168006444941312",
"properties": {
"contentLength": 97977707,
"creationTime": "2024-01-01T00:00:00.000Z",
"lastAccessTime": "2024-01-01T00:00:00.000Z",
"lastWriteTime": "2024-01-01T00:00:00.000Z",
"changeTime": "2024-01-01T00:00:00.000Z",
"lastModified": "2024-01-01T00:00:00.000Z",
"etag": "\"0x8DCBC8DAE40E4E3\""
}
}
]
}

List Shares

Get a list of file shares available in the account | key: listShares

InputNotesExample
Connection

{
"data": [
{
"name": "example",
"snapshot": "snapshot-v1",
"properties": {
"lastModified": "2024-01-01T00:00:00.000Z",
"etag": "",
"quota": 1
}
}
]
}

Save From URL

Save a file from a URL to Azure Files | key: saveFromUrl

InputNotesExample
Connection
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share
Source URL

The URL where the source file currently resides. This endpoint must be accessible via an unauthenticated HTTP GET request, and the response must return a content-length header.

This action leverages NodeJS Streams to stream an HTTP response directly to Azure Files. This is helpful if you deal with large files because the entire file is never loaded into memory all at once. Instead, it's uploaded to Azure Files as it is downloaded.

The source URL you reference must be accessible via an unauthenticated HTTP GET request, and must the HTTP response must include a content-length header.

{
"data": {
"etag": "\"0x8DCBC8DAE40E4E3\"",
"lastModified": "2024-01-01T00:00:00.000Z",
"requestId": "88aee12f-f01a-0062-128c-ee0ab8000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z",
"isServerEncrypted": true,
"filePermissionKey": "13962526983299172380*7594252119313965202",
"fileAttributes": "Archive",
"fileCreatedOn": "2024-01-01T00:00:00.000Z",
"fileLastWriteOn": "2024-01-01T00:00:00.000Z",
"fileChangeOn": "2024-01-01T00:00:00.000Z",
"fileId": "13835143817189130240",
"fileParentId": "0",
"errorCode": ""
}
}

Upload File

Upload a file under an existing path | key: uploadFile

InputNotesExample
Connection
File Contents

The contents to write to a file. This can be a string of text, it can be binary data (like an image or PDF) that was generated in a previous step.

My File Contents
Path

An object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Do not include a leading /

path/to/file.txt
Share Name

An Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.

my-file-share

{
"data": {
"etag": "\"0x8DCBC8DAE40E4E3\"",
"lastModified": "2024-01-01T00:00:00.000Z",
"requestId": "88aee12f-f01a-0062-128c-ee0ab8000000",
"version": "2024-08-04",
"date": "2024-01-01T00:00:00.000Z",
"isServerEncrypted": true,
"filePermissionKey": "13962526983299172380*7594252119313965202",
"fileAttributes": "Archive",
"fileCreatedOn": "2024-01-01T00:00:00.000Z",
"fileLastWriteOn": "2024-01-01T00:00:00.000Z",
"fileChangeOn": "2024-01-01T00:00:00.000Z",
"fileId": "13835143817189130240",
"fileParentId": "0",
"errorCode": ""
}
}