cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ryu
Frequent Visitor

Getting Pen Input Image and Filling-in Microsoft Word Template in Flow

Hi, I have a pen input in my powerapp that captures a user's signature, and I also have an existing flow that fills a Microsoft Word template with texts.

 

I am now required to also capture the user's signature that came from the app and then put it in the Word template. I have already created a signature field for the template, now the only thing's missing is how to transfer it from powerapps into flow.

 

123.png

 

My flow is triggered by a powerapp button, would it be possible to capture the image and pass it into a field after a user clicks the 'next' button?

 

Ryu_1-1593149387018.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Ryu ,

Do you want to pass Pen Input image content from your app into your flow, then populate it into the Picture Content in your word template?

 

Based on the needs that you mentioned, I think the PowerApps could achieve your needs. Firstly, you need to type "Ask in PowerApps" dynamic content within the "TemplateSignature" field of your "Populate a Microsoft Word template" action, to define the parameter which needs to be passed from your canvas app. Then you need to use dataUriToBinary function to convert the previous added parameter value into a binary data.

 

I have made a test on my side, please consider take a try with the following flow's configuration:

5.JPG

The "TemplateSignature" field in the "Populate a Microsoft Word template" action is set to following expression:

dataUriToBinary(triggerBody()['PopulateaMicrosoftWordtemplate_TemplateSignature'])

 

App's configuration as below:

 

6.JPG

Firstly, you need to add a connection to above flow from your canvas app, then set the OnSelect property of the "Next" button to following:

'Your Flow Name'.Run(
                     Substitute(JSON(PenInput1.Image, JSONFormat.IncludeBinaryData), """", "") // The PenInput image data needs to be passed to your flow
)

The PenInput image is populated properly in my created Word file hosted on OneDrive folder as below:

7.JPG

 

Please consider take a try with above solution, then check if the issue is solved.

 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User III
Super User III

Hi @Ryu ,

I posted this on the PowerAutomate forum a short time ago and it sets out the process when you save the image as Base64 Text in a SharePoint multi-line text field. It works, but it probably could be shorter.

If you have the signature in a SharePoint Library as a file, it is much easier.

Happy to elaborate further.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

v-xida-msft
Community Support
Community Support

Hi @Ryu ,

Do you want to pass Pen Input image content from your app into your flow, then populate it into the Picture Content in your word template?

 

Based on the needs that you mentioned, I think the PowerApps could achieve your needs. Firstly, you need to type "Ask in PowerApps" dynamic content within the "TemplateSignature" field of your "Populate a Microsoft Word template" action, to define the parameter which needs to be passed from your canvas app. Then you need to use dataUriToBinary function to convert the previous added parameter value into a binary data.

 

I have made a test on my side, please consider take a try with the following flow's configuration:

5.JPG

The "TemplateSignature" field in the "Populate a Microsoft Word template" action is set to following expression:

dataUriToBinary(triggerBody()['PopulateaMicrosoftWordtemplate_TemplateSignature'])

 

App's configuration as below:

 

6.JPG

Firstly, you need to add a connection to above flow from your canvas app, then set the OnSelect property of the "Next" button to following:

'Your Flow Name'.Run(
                     Substitute(JSON(PenInput1.Image, JSONFormat.IncludeBinaryData), """", "") // The PenInput image data needs to be passed to your flow
)

The PenInput image is populated properly in my created Word file hosted on OneDrive folder as below:

7.JPG

 

Please consider take a try with above solution, then check if the issue is solved.

 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hey Kris, I tried your way it didn't work out could you explain more step 1 and 2 how to do this ? 

In addition once I select the template I have all filedes populated, my template has a control input i.e I have inserted a picture control on same template and now I need to pass the pen input to this control 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (26,587)