Automation Action – SharePoint Files | ThinkAutomation

Automation Action: SharePoint Files

Download or upload files from SharePoint online.

The SharePoint Files action can be used to download and upload files to a SharePoint site/drive/folder.

From the Operation list, select Download, Get Metadata or Upload.

Click the Sign In button to sign-in to SharePoint.

The Domain entry will be automatically set and should not normally need to be changed.

From The Sites list, select a site, then from the Drive list, select the drive (Document Library). The Folders within the Site/Drive will be listed. Select a Folder.

The SharePoint Path will be automatically set as you select a folder, however you can also manually type a folder path (eg: DocumentsQuotes). The folder path can contain %variables% (eg: Documents%MonthName%).

Download

In the Filename Or Masks entry, specify filename to download. You can specify multiple files separated by comma. You can also use a Mask (eg: *.pdf, *.docx).

In the Only If Modified Since entry you can optionally specify a date. This can be a %variable% containing a date. If a date is specified then only files modified after this date will be downloaded.

In the Save To entry, specify a local folder where the downloaded files will be saved.

Enable the Delete Local Downloaded Files After Message Is Processed if you want ThinkAutomation to delete the local downloaded file after it has finished executing all actions for the current message. This is useful if you only need a copy of the file during Automation execution.

The Assign To variable will receive the local path/filename where the file(s) have been downloaded to. Multiple files will be separated by commas.

Get MetaData

In the Filename Or Masks entry, specify filename to read metadata for. You can specify multiple files separated by comma. You can also use a Mask (eg: *.pdf, *.docx).

In the Only If Modified Since entry you can optionally specify a date. This can be a %variable% containing a date. If a date is specified then only files modified after this date will be included.

Select the %variable% to receive the results from the Assign To list.

This operation returns a Json array, with an item for each file, in the following format:

 [ { "id": "01GASZJM2TX2KE3QGWUND3FSJFKYAKAPRC", "name": "customers.xlsx", "size": 20313, "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "lastModifiedDateTime": "2025-07-02T14:59:06Z", "createdDateTime": "2025-07-02T13:49:43Z", "createdByName": "Julia Irish", "createdByEmail": "julia.irish@parkersoftware.com", "lastModifiedBy": "Stephen Parker", "lastModifiedByEmail": "stephen.parker@parkersoftware.com", "webUrl": "https://pslcrm.sharepoint.com/ShareTest/subsite2/_layouts/15/Doc.aspx?sourcedoc=%7B4D94BE53-D6C0-47A3-B2C9-255600A03E22%7D&file=customers.xlsx&action=default&mobileredirect=true", "versionId": "" }, { "id": "01GASZJM7EV32CZXTYJ5HKBH4MOVOJDMML", "name": "suppliers.xlsx", "size": 19374, "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "lastModifiedDateTime": "2025-07-02T13:49:43Z", "createdDateTime": "2025-07-02T13:49:43Z", "createdByName": "Julia Irish", "createdByEmail": "julia.irish@parkersoftware.com", "lastModifiedBy": "Julia Irish", "lastModifiedByEmail": "julia.irish@parkersoftware.com", "webUrl": "https://pslcrm.sharepoint.com/ShareTest/subsite2/_layouts/15/Doc.aspx?sourcedoc=%7B2CF4AEE4-78DE-4E4F-A09F-8C755C91B18B%7D&file=suppliers.xlsx&action=default&mobileredirect=true", "versionId": "" } ]

The webUrl property contains a download link. Note: The URL may expire (depending on configuration). If you need to send links with emails etc, you should re-request the metadata.

Upload

In the Upload Files entry enter or select the local files to upload (use %variable% replacements if required). Multiple files should be separated by commas. File paths can include wildcards.

You also have the option of uploading Attachments. Select the Include Incoming Attachments option and specify the Mask.

If the Create If Missing option is enabled, then any missing folders in the SharePoint Path entry will be created prior to file upload.

The Assign To variable will receive the web URL’s for the uploaded files(s). Multiple files will be separated by commas.

This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, documents, local files and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.

You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.

Download Free 30 Day Trial

Back To Automation Actions List

ThinkAutomation Home