How to store user profile photo in list using Microsoft Flow?
-
29-01-2021 - |
Domanda
I have requirement that I need to get current weeks birthday. The approach we are using is we have create a flow and it is recurring every day. It will go through each user in delve and check if any user's birthday match with today's date. If it matches, we add users's entry with details like user email, birthday message and user image.
I am able to put all other details in list except user image. I am having below output when I use "Get User Photo (V2)" action:
But when I add this out put in create item, it is storing junk data in my list.
My column type in list is single line of text. If I keep it to hyperlink or picture, the variable do not show up in the create item action.
Is there anything or any way I can store the user image in custom list? Thanks in advance.
Soluzione
So finally able to get the photo from flow. I have updated my list and created new column picturecontent (multiple line of text). This is used to store $content
data. My previous column is storing $content-type
data.
I have used below expression in create item:
for content type:
body('Get_user_photo_(V2)')?['$content-type']
for content:
body('Get_user_photo_(V2)')?['$content']
This stores the value in my list.
I am able to generate image using below code:
<img src="data:content-type-value;content-value">