# Files for Enterprise Workbot
End users can upload files to Enterprise Workbots when
file parameters are defined in the bot commands. These files are uploaded to the user's OneDrive for Business storage, and its data can then be used in follow-up recipe actions. The file portion of the trigger output looks like this:
|contentType||Indicates that a file was uploaded to OneDrive and ready for download.||application/vnd.microsoft.teams.file.download.info|
|downloadUrl||OneDrive URL for fetching the content of the file. You can issue an HTTP GET directly from this URL.||https://download.link (opens new window)|
|uniqueId||Unique file ID. This will be the OneDrive drive item ID.||1150D938-8870-4044-9F2C-5BBDEBA70C9D|
|contentUrl||Link to the file in Sharepoint.||https://contoso.sharepoint.com/personal/johnadams_contoso_com/Documents/Applications/file_example.txt (opens new window)|
|name||Name of the file||file_example.txt|
|file_comment||The message sent by the user along with the file upload.||This is an example file upload.|
Updating Workbots created before 30th Oct 2021
Enterprise Workbots created before 30th Oct 2021 typically would not have
supportsFiles property set to
true in their manifest. Learn how to update it.
# How it works
When a bot command is invoked that expects a file upload, users will be prompted to upload their file:
Prompting user to upload a file
Once the file is uploaded, the user can optionally include a message before hitting Send. The file data can then be used in follow-up recipe actions.
Multiple file parameters can be defined in the bot command, with the user being prompted each time. Regardless of the order in which the parameters are arranged in the bot command, parameters of other data types (e.g. string, date/time) will always be retrieved first before any file parameters.
# Enabling files for older bots
If your Enterprise Workbot was created before 30th Oct 2021, you have to set the
supportsFiles property in the manifest to
true. This property is described in the bots section of the Manifest reference.
As the bot owner, go to your bot in the MS Teams developer portal (opens new window).
From the left navigation bar, under Configure, go to Basic information.
From the main panel, under Version, increment your version (e.g. if your current version is
1.0.5, increment it to
1.0.6) then scroll down and click Save.
From the left navigation bar, under Configure, go to App features.
From the main panel, click on Bot.
Under What can your bot do?, check Upload and download files, then scroll down and click Save.
From the left navigation bar, under Publish, go to App package. From the breadcrumb bar (right below the Developer Portal marquee), click on Download app package to download the app manifest. Keep this handy as this will be used in a later step.
From the left navigation bar, under Teams apps, go to Manage apps.
From the search bar, search for your bot by name then click on your bot's name (clicking specifically on your bot's name will bring you to your bot's settings).
Click on Update, then select the app manifest you downloaded in the earlier step.