cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sthota
Advocate I
Advocate I

Issue with pulling a full and clarity image from common data service using word online connector in flow

Hello,

Facing issues with pulling a signature image from CDS as uploaded. It is only displaying a thumbnail of the image as shown in the screenshot (It is cropping the image on both left and right hand side and not clear enough either). I'm using the following step in the Microsoft flow for initializing signature variable and using it subsequently in the Populate a Microsoft Word template for image field.

 

{
"$content-type": "image/png",
"$content": @{body('Get_record:_entity_name')?['cre9a_test_signature']}
}

 

For time being, I added white space on either side of the image before uploading. This seems to display the image in full in the word document generated using flow. However, the image is not as clear as the original one.
Also, I tried with base 64 converter for the uploaded signature image, but still facing the same issue as it is picking up the thumbnail.

As a work around, I could think of adding a new column and update base 64 code of the original image before uploading the image and then convert it to image in the flow or use SharePoint list instead of CDS for storing the image. Though, I would like to follow the standard way of doing this.

Thanks,

Srinivas

2 ACCEPTED SOLUTIONS

Accepted Solutions
ChrisPiasecki
Super User
Super User

Hi sthota,

 

You can use the Get file or image content CDS action to get the image type field. Ensure to specify an image size of 'full'. The output will be of binary type, so you can take the outputs('Get_file_or_image_content')?['body/$content'] into a compose action with the correct image/png type.

 

fullimage1.PNG

View solution in original post

v-yutliu-msft
Community Support
Community Support

Hi @sthota ,

Do you want to increase picture pixel by getting image from CDS?

I'm afraid there's no  standard solution in powerapps now.

The picture pixel will be decreased automatically when pulling to powerapps.

I think using flow is the best way.

The solution that you tried and @ChrisPiasecki  provided are both ok.

 

I suggest you submit an idea about increasing picture pixel when pulling from CDS here:

https://powerapps.microsoft.com/en-us/support/pro/ticket/

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

5 REPLIES 5
ChrisPiasecki
Super User
Super User

Hi sthota,

 

You can use the Get file or image content CDS action to get the image type field. Ensure to specify an image size of 'full'. The output will be of binary type, so you can take the outputs('Get_file_or_image_content')?['body/$content'] into a compose action with the correct image/png type.

 

fullimage1.PNG

View solution in original post

v-yutliu-msft
Community Support
Community Support

Hi @sthota ,

Do you want to increase picture pixel by getting image from CDS?

I'm afraid there's no  standard solution in powerapps now.

The picture pixel will be decreased automatically when pulling to powerapps.

I think using flow is the best way.

The solution that you tried and @ChrisPiasecki  provided are both ok.

 

I suggest you submit an idea about increasing picture pixel when pulling from CDS here:

https://powerapps.microsoft.com/en-us/support/pro/ticket/

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

@ChrisPiasecki

Thanks for your solution. This is exactly what we are looking for. 
@v-yutliu-msft  @ChrisPiasecki Unfortunately, we can see the connector when we start a new flow.  (Common Data Services (Current Environment)).  However- if we try to insert a new step into an existing flow, we no longer see that option to us, and we get an error like below if we try to copy the code into our flow. 

Also, we tried to remove the power apps trigger and try to add When Power Virtual Agents calls a flow trigger without any luck.

Thanks, 

Srinivas

Hi Sthota, 

 

The Power Automated flow must be created from a CDS solution to use the CDS Current environment connector.

 

 

Unfortunately you may need to recreate the flow from scratch as adding an existing flow into a solution that was created outside a solution will not have the cds current environment connector available. 

 

Hope this helps. Feel free to mark one of my responses as an accepted answer if it did. 

 

- Chris

 

 

Hello @ChrisPiasecki @v-yutliu-msft ,


I have created a flow from the scratch in solution and followed the same steps as you mentioned above. I have uploaded an image of type PNG. Also, I am able to parse the $content through 'base 64 to image' converter to get the same image for testing purposes. However, I am getting the error "The image is not of type PNG or JPG. Please provide an image of type PNG or JPG." while trying to add to a picture control in word through 'Populate a Microsoft Word template' step in a flow.

Please find the attached screenshot for the same. It would be great if you can share your insights on this.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,466)