Download Library File

sharepoint.download_file
ActionFiles & storageconnection required

Calls the SharePoint API with the connection's credentials.

Download a file from the site's default document library and emit it as the shared base64 file envelope.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
SharePoint
Secret shape
{"client_id": "…", "client_secret": "…", "refresh_token": "…"} with the Sites.ReadWrite.All delegated scope
Config it needs
tenant, site_id
Resolved by
config.connection_id, else node.connection_id

Configuration

3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
site_id
The site id that holds the list, as 'hostname,siteCollectionId,siteId'. Use sharepoint.get_site or sharepoint.search_sites to find it.
stringYes———
item_id
Id of the file to download. Takes precedence over item_path.
stringNo———
item_path
Library-relative path of the file, e.g. 'Shared Documents/Q3.pdf'.
stringNo———
  • At least one of item_id, item_path must be set.

Output

One shape.

result

FieldTypeExample
file_content
The file, base64-encoded.
string—
content_encoding
stringbase64
filename
stringapp-main.zip
content_type
stringapplication/zip
size
Raw size in bytes (before base64).
number—
{
  "content_encoding": "base64",
  "content_type": "application/zip",
  "file_content": "",
  "filename": "app-main.zip",
  "size": 0
}

See Download Library File run in a workflow.

In a technical demo we add the SharePoint connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.