Working with the 'File Contents' Parameter

Encodian flow actions receive and send files in Base64 encoded strings, conforming to how Microsoft expect documents to be sent and received across Flow, Logic Apps and PowerApps.

A common scenario within Office 365 is to perform actions upon a document stored within SharePoint or OneDrive, and there are default flow actions provided which obtain the required documents within the correct format.

Video Guidance

Please either watch the following instructional video or follow the detailed steps within this article.

File Contents - Get a File

The following instructions outline how to retrieve a file from SharePoint, passed within the 'File Contents' property:

1. Within your Flow workflow add the required trigger, the following example uses a simple 'Recurrence' trigger. Click the 'New Step' icon to locate the required Flow action.

1.jpg

2. Enter 'Get file content' within the search field, locate the 'SharePoint' flow action and click to select.

2.jpg

3. Select the SharePoint site and required document using the 'Site Address' and 'File Identifier' pickers.

3.jpg

Please refer to the following Microsoft documentation for further guidance on the 'Get file content' flow action: Connector Reference - SharePoint

4. Click the 'New Step' icon to add another flow action, entering 'Encodian' within the search field, before locating and selecting the 'Convert to PDF' flow action.

4.jpg

5. Click the 'Convert to PDF' flow actions 'File Content' input field. This will display a list of the current flows actions and associated properties which are available for use, select the 'File Content' property of the 'Get file content' action.

5.jpg

6. Add values for the 'PDF Filename' and 'Filename' properties, please refer to the Flow Action - Convert to PDF article for detailed guidance.

6.jpg

The flow is now configured to retrieve the selected document and pass to an Encodian flow action using the 'File Content' property.

'File Content' - Create a File

Building upon the previous example; Once the Encodian flow action has completed the required operation successfully, the document will be returned within the 'File Content' property. The following steps detail how you can use this property to create a file within SharePoint.

1. Click the 'New Step' icon to add another flow action, entering 'Create file' within the search field, before locating and selecting the SharePoint 'Create File' flow action.

7.jpg

2. Select the SharePoint site and library / folder location using the 'Site Address' and 'Folder Path' pickers.

8.jpg

3. Click the 'Create file' flow actions 'File Name' input field. This will display a list of the current flows actions and associated properties which are available for use, select the 'Filename' property of the 'Convert to PDF' action.

9.jpg

4. Click the 'Create file' flow actions 'File Content' input field. This will display a list of the current flows actions and associated properties which are available for use, select the 'File Contents' property of the 'Convert to PDF' action.

10.jpg

5. The flow is now configured to retrieve the selected document from SharePoint, convert to PDF format before uploading the resulting PDF document to SharePoint.

11.jpg

Save and test the flow utilising the standard flow commands.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk