I have a Flow that sends an email when a SharePoint item is created. The Flow also has 'Get attachments/Initialize variable/Append to string variable' actions to get the item attachment's AbsoluteUri into the email body.
I would also like to have the created item's other column values (Name, Location, etc) displayed in the email Body and not just a link to the attachment. When I to initialize those column values as string variables it just leads me to multiple 'Apply to each/Select an output' loops and the Flow fails. Any suggestions?
Solved! Go to Solution.
Hi @user180618 ,
You could initialize other string variables to collect the values of lookup columns by using a similar method to get attachments link.
Image reference:
Hope that makes sense.
Best Regards,
Can you post screen shots of what you have so far? That will be a big help for those trying to assist.
Hi @user180618 ,
Please try this configuration:
Hope this helps.
Best Regards,
Thanks for the reply @v-bacao-msft. I can already initialize the link variable and get it into the email body, but here's a screenshot of the loop I get into when I try to get the list item's other column values into the email.
Btw my previous actions are the same as yours (When an item is created > Get attachments and so on).
Hello @user180618
Which is the data type of Column 2, Column 3 and Column 4? Multiple Choice Fields with string values? Lookup columns?
Hi @user180618 ,
You could initialize other string variables to collect the values of lookup columns by using a similar method to get attachments link.
Image reference:
Hope that makes sense.
Best Regards,
Thanks @v-bacao-msft, that worked. One more thing, what's the expression to have the ; separator (like in Column1 Value; in your screenshot) only appear in between multiple values rather than at the end?
So for example, let's say the multiple choice values in my Column1 are New York, San Francisco and Dallas. If Dallas and New York are selected in the List, the email currently shows: Dallas; New York; and if only New York is selected, the email shows: New York;
In other words, removing the last character in the string. I've tried adding this expression in the email Body next to each appended value, but that doesn't seem to do it:
substring(variables('Column1'),0,sub(length(variables('Column1')),1))
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
23 | |
23 | |
23 | |
23 | |
17 |
User | Count |
---|---|
55 | |
39 | |
38 | |
29 | |
26 |