cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Symira
Helper III
Helper III

Inserting image into CDS image field with flow

Hi Guys,

Now with the "Image" datatype available in CDS, I need to populate this field from powerautomate flow. The idea is to:

- Publish a flow with http trigger (json input)

- Third party applications will call the flow with two input fields: record id and the image as "binary string".

 

I am not sure how to accomplish this.

- Are the images saved in base64 format?

 

Looking forward.

- S

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@Symira 

You can use the below CDS Action

Mira_Ghaly_0-1611739815060.png

You need to pass the content as JSON format as below:

{

"$content-type": "image/png",
"$content":"base64string"

}

Mira_Ghaly_1-1611741409128.png

Then use the upload file or image dataverse / CDS action:

Mira_Ghaly_2-1611741538093.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

3 REPLIES 3
Mira_Ghaly
Dual Super User II
Dual Super User II

@Symira 

You can use the below CDS Action

Mira_Ghaly_0-1611739815060.png

You need to pass the content as JSON format as below:

{

"$content-type": "image/png",
"$content":"base64string"

}

Mira_Ghaly_1-1611741409128.png

Then use the upload file or image dataverse / CDS action:

Mira_Ghaly_2-1611741538093.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Symira
Helper III
Helper III

Many thanks @Mira_Ghaly , that worked!

Symira
Helper III
Helper III

Hi @Mira_Ghaly ,

 

Just one more question. Now that I can insert images and files, I was keen to know how to delete these. Composing a JSON with $content empty string ("") or "null" doesn't actually delete the image/file field (please refer the following two images)

Symira_0-1612644548859.png

Symira_1-1612644680577.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,837)