Hello,
I've been trying to develop an automated email that will pull the following all from Sharepoint...
...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).
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)
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:
Whenever I do this, the initialize variable function stops working and I receive this message below:
Any assistance with this or workaround would be greatly appreciated as this is the only thing holding me up at the moment!
-James
Perfect that was the last thing I needed to get it working. Thanks for your help!
Hi @seamustl ,
You have used the wrong expression:
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.
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:
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:
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:
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: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!
Hi @seamustl ,
You should set the variable directly under the get file content action inside the Apply to each:
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.
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2