Hello,
Scenario:
Issue:
Tried so far:
{ "type": "object", "properties": { "$content-type": { "type": "string" }, "$content": { "type": "string" //also tried "image/png" here, same result } } }
Any ideas?
Thank you!
Hi @ericonline
Try the followign expression for posting to SharePoint example -
Create file action
file name - map.jpeg
file content use the following expression - base64ToBinary( body('HTTP')?['$content'])
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @ericonline
So when you invoke the api with the http action, in the browser and in Postman, it shows you an image. In flow, that is not supported right now. You cannot see the image (you just get the binary content of that image).
Can you share details on what you intend to do with this image in the consecutive steps?
You can directly send it as email or store it somewhere too.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @RezaDorrani and @yashag2255,
Ideally, I'd like to store the image as a variable then do anything I want with it, but I can't find a way to do that.
So far, the following has worked:
- Create a file in OneDrive (Use OneDrive Create File Action)
- Create a file in Sharepoint (Use Sharepoint Create File Action + base64tobinary() expression, thanks @RezaDorrani )
- Add as an attachment to an email (attachment name: "test.png", content: body of API response)
Need assistance with:
- Add .png into the body of an HTML email
- Add .png into a COLUMN in a Sharepoint List
Got recipes for these?
I do not beleive the email clients allow posting base64 encoded images into the body of the email
I tried posting it in html body but the email client strips out the imag src
The image can be sent as an attachment to the email same as the way we did for SharePoint
Add .png into a column in SharePoint? What type of column is this? A multi line text - then just directly post the content into it (it will save the data in base64 format) and you can read it back in flow to generate the image
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
13 | |
11 | |
11 | |
7 | |
6 |
User | Count |
---|---|
20 | |
16 | |
14 | |
10 | |
9 |