Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Unanswered

Include user photo in the mail body in microsoft flow

Like (0) ShareShare
ReportReport
Posted on 21 Aug 2019 12:50:09 by 121

Hi

I would like to include the photo of the  user in "To" of the email in the mail body . Is there a way i can include the image . I can put the image in sharepoint and access it from there . Please let me know the way to do so .

 

Thanks

Gautmish

  • manuelstgomes Profile Picture
    6,625 on 17 Sep 2019 at 13:52:01
    Re: Include user photo in the mail body in microsoft flow

    @gautmish sorry for taking so much time to reply. Let's try to figure this out :).

     

    I think I had the same issue in the past. If you pass the value dynamically, then you'll have a string, so you need to encode it. Try the following. Run the flow with the dynamic content and see the content being generated. There are spaces and other characters there, right?

    If you copy that URL to the browser, it will probably fail or convert the value for you automatically.

    A simple replace will do the trick:

    replace(<YOUR VALUE>,' ','%20')

    Double-check again and if you see any special character grab the whole URL and copy it here:

    https://www.url-encode-decode.com

    Then you know that you have to replace character X with "%...".

     

    If it doesn't work let me know where it's failing and I'll try to help you. 

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers
    Manuel

  • gautmish Profile Picture
    121 on 12 Sep 2019 at 11:43:54
    Re: Include user photo in the mail body in microsoft flow

    @manuelstgomes  Hi 

     

    I tried the same , it is working only if i am setting the "File path" by selecting from sharepoint path but if I am passing it dynamically it is showing file not found or removed .

     

    any idea??

     

    Thanks

    Gautmish

  • manuelstgomes Profile Picture
    6,625 on 22 Aug 2019 at 09:10:54
    Re: Include user photo in the mail body in microsoft flow

    @edgonzales has a point. Actually, I considered that when writing the post but since @gautmish also mentioned that he could store the information in SharePoint I decided for this approach so that he can send with any image.

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on 21 Aug 2019 at 21:57:57
    Re: Include user photo in the mail body in microsoft flow

    @gautmish 

    Hey there.  If you're using Office 365, there's actually an action with the Office 365 Users connector, "Get User Photo".

     

    You could probably just insert that step and then use @manuelstgomes method for inserting in the html email.

     

    Just a thought.

    -Ed-

     

     

    If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • manuelstgomes Profile Picture
    6,625 on 21 Aug 2019 at 18:31:24
    Re: Include user photo in the mail body in microsoft flow

    Please check the following flow to see if it works for you...

    small-Screenshot_2019-08-21_at_19_22_16.jpg

    It's quite simple:

    1. Since you're saving it in SharePoint you only need to get the file's URL and send it in the email
    2. You can pick a Thumbnail (small, medium or large) or the actual file (Link to Item) by replacing in the src=part.
    3. In this case, I uploaded a random image and fetched its information by ID but you can embed this logic in your current flow as long as you have an image.

    Regarding the DIV, this is the only way I got it to show up on Outlook. Sending images is quite tricky but the suggestion came from another post that you can find here

     

    Please let me know if this works for you and don't forget to mark the question as "accepted" to allow for others to find the solution faster.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,776 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started