for Microsoft Power Automate and Azure logic apps

By Jay Goodison

9th November 2022

Digitally Sign a PDF Document with Power Automate

We’re pleased to announce a new Power Automate action, ‘Sign PDF‘ for Encodian ‘Flowr‘, which provides the capability to digitally sign a PDF document in Power Automate with two different options. The ‘Standard‘ option uses Encodian’s ‘Adobe Approved Trust List‘ certificate. Thus, a signed document will appear as an approved signature with long-term validation enabled (the signature image is optional).

The ‘Custom‘ option allows you to provide a custom certificate in PFX format, which is used to sign the document. The validity of the signature will depend on the certificate provided.

NOTE: At the time of writing (9th November 2022), Microsoft is working on the global deployment of this action, which is due to complete by 30th November 2022.

Sign a PDF Document after approval in Power Automate

To provide an example of using the ‘Sign PDF‘ action, we’ll cover a very common scenario; after a document has been approved via a Power Automate approval process, we’ll create a signed PDF rendition of the selected document.

Consider the following simple flow associated with a specific SharePoint library. The user can select a file in SharePoint and submit it for approval to the specified ‘Approver’. The approval outcome is then emailed to the user who started the flow… simple!

We’re now going to extend this flow to convert the selected document to PDF and add a digital signature using the ‘Sign PDF‘ action before adding the signed PDF document to the SharePoint library!

1. Within the ‘If yes‘ branch, add the SharePoint ‘Get File Content‘ action

1.a Site Address: Set as per the ‘Site Address‘ value for the ‘For a selected file‘ trigger actions ‘Site Address‘ value

1.b. File identifier: Select the ‘Identifier‘ property provided by the ‘Get file properties‘ action

2. Move the ‘Send and email (V2) – Approved‘ action beneath the SharePoint ‘Get File Content‘ action.

3. Underneath the SharePoint ‘Get File Content‘ action, add the Encodian ‘Convert to PDF‘ action

3.a. Filename: Select the ‘File name with extension‘ property provided by the ‘Get file properties‘ action

3.b. File Content: Select the ‘File Content‘ property provided by the ‘Get file content‘ action

3.c. PDF Filename: Select the ‘File name with extension‘ property provided by the ‘Get file properties‘ action

We’re now going to add the ‘Sign PDF‘ action by selecting the ‘Standard‘ certificate type. This uses Encodian’s ‘Adobe Approved Trust List‘ certificate. Thus a signed document will appear as an approved signature with long-term validation enabled.

The ‘Sign PDF‘ action advanced options allow you to configure whether an image signature should be visible, also providing the opportunity to provide your signature image. For example, you could pass an image generated from a PowerApp ‘Pen input’ control and use this as the signature image!

4. Underneath the SharePoint ‘Convert to PDF‘ action, add the Encodian ‘Sign PDF‘ action

4.a. Certificate Type: Select ‘Standard

4.b. File Content: Select the ‘File Content‘ property provided by the ‘Convert to PDF‘ action

5. Underneath the Encodian ‘Sign PDF‘ action, add the SharePoint ‘Create file‘ action

5.a. Site Address: Set as per the ‘Site Address‘ value for the ‘For a selected file‘ trigger actions ‘Site Address‘ value

5.b. Folder Path: Select the ‘Folder path‘ property provided by the ‘Get file properties‘ action

5.c. File Name: Select the ‘Filename‘ property provided by the Encodian ‘Sign PDF‘ action

5.d. File Content: Select the ‘File Content’ property provided by the Encodian ‘Sign PDF‘ action

That’s it all done! The Power Automate flow will now create a digitally signed PDF from the approved document! Your revised flow should look similar to the following:

After testing the flow, you should see the signed PDF document added to your SharePoint library:

Open the PDF within Adobe Acrobat (or equivalent) to view the signature:

Deploy your flow to all SharePoint Libraries

Don’t forget that you could deploy this flow to all SharePoint sites and libraries using Encodian ‘Trigr‘. For guidance on how to do this, please check out Publish an existing SharePoint Power Automate Flow to Multiple Libraries

Here is an example of the flow configuration, updated to support all SharePoint libraries:

Finally…

We hope this post provides a helpful example of digitally signing a PDF document using the Encodian ‘Sign PDF‘ action and Microsoft Power Automate.

Please share any feedback or comments – all are welcome 🙂