web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 1nGnWp1VietC/LCt1eakni
Power Automate - Building Flows
Answered

Trying to get file content dynamically from Sharepoint, into Flow, and embedded into an email

Like (0) ShareShare
ReportReport
Posted on 20 May 2020 19:06:56 by 18

Hello,

I've been trying to develop an automated email that will pull the following all from Sharepoint...

 

  • A list of contacts to send it to
  • The subject 
  • A segment of the text body that is dynamic between each email
  • A graphic that is different in each email and tied to the text (pulled from a Sharepoint file system as opposed to the list the others are pulled from

...and compile them into an email that is sent out per line of the Sharepoint list containing this data.

 

It can work to embed an image in the email at the moment but only for a single specified image (not a variable that can be changed per email).

 
 

image.png

Using this, I can add the selected image into the email, embedded (not as an attachment).

 

The issue I run into is when I try to utilize dynamic content here: (highlited)

image.png

 

There is a column in the lists that the rest of my information comes from that contains only the file name of the graphic meant to accompany that email. The goal is to have that text be present here where the "stairs.jpg" appears so that any file name can be used.

This is shown generally in the image below:

image.png

 

Whenever I do this, the initialize variable function stops working and I receive this message below:

image.png

 

Any assistance with this or workaround would be greatly appreciated as this is the only thing holding me up at the moment!

 

-James

  • seamustl Profile Picture
    18 on 26 May 2020 at 16:58:32
    Re: Trying to get file content dynamically from Sharepoint, into Flow, and embedded into an email

    Perfect that was the last thing I needed to get it working. Thanks for your help!

  • v-alzhan-msft Profile Picture
    on 22 May 2020 at 01:24:25
    Re: Trying to get file content dynamically from Sharepoint, into Flow, and embedded into an email

    Hi @seamustl ,

     

    You have used the wrong expression:

    1.png

     

    Best regards,

    Alice   

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • seamustl Profile Picture
    18 on 21 May 2020 at 16:58:08
    Re: Trying to get file content dynamically from Sharepoint, into Flow, and embedded into an email

    I appreciate you helping out with this; however, I'm still having issues getting this working.

     

    When I try to set up my path similar to the one you show in your response (with the initialize variable outside, and the get file content with path inside), I get the below error as the initializing variable doesn't have anywhere to reference:

     
     

    image.png

    When I try to set it up with the "Get file content" action outside as well (as a standard path (with the inside "get file content" action having a dynamic path) I just get the same result with each email (only pulling the file that is selected in the outer "get file content action". I've included a screenshot of that setup below:

    image.png

    Finally when I try to keep the outside "get file content" action and use a dynamic path on both I get this error, as shown below:

     

    image.png

     

     

    I wonder if it is an issue with the my "Set Variable" Action. I'm just utilizing the same entry into the "Value" field in both variable actions and I've included it below for reference:

    <img src="data&colon;image/jpeg;base64,@{body('Get_file_content_using_path')['$content']}" alt="My Image" />

     

    I appreciate your help with this and any more information you could provide!

  • Verified answer
    v-alzhan-msft Profile Picture
    on 21 May 2020 at 06:54:25
    Re: Trying to get file content dynamically from Sharepoint, into Flow, and embedded into an email

    Hi @seamustl ,

     

    You should set the variable directly under the get file content action inside the Apply to each:

    1.png

     

    Best regards,

    Alice   

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete