cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Priyan1
Frequent Visitor

couldnt add Group / person email address in content

Hi ,

 

I need an the list of email/display name of persons ( Column "Part mail ad") to be displayed in the HTML to text , but unfortunately "Apply for each" shows error when i try to create a HTML table and input in HTML to text. Also i couldnt find Output of HTML table in HTML to text. 

 

can anyone help identify whats the problem here,

 

Priyan1_0-1654069345855.pngPriyan1_1-1654069397859.png

Priyan1_2-1654069422471.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Priyan1 ,

 

To check the single/multi value person field.

1- Go to List Setting

2- Open the Column and check below

vivekpande18_0-1654092422210.png

 

 

Looking at your flow, it seems like its a multi-value field.

Find the steps below to create a table of the names.

 

1 - After Get Item action, you can add below step

vivekpande18_1-1654093391766.png

In my case people picker field name is Person. I want name & Email, so i have taken both from dynamic content shown below

vivekpande18_2-1654093490964.png

 

2- Add Create HTML Table action and provide output from above action.

vivekpande18_3-1654093549706.png vivekpande18_4-1654093585242.png

 

3 - Use Compose action to format the table

vivekpande18_5-1654093642617.png

 

Inputs : replace(body('Create_HTML_table'),'<table>','<table style="width:100%;border-collapse: collapse" border=" 1px solid black">')

 

You will get the above red highlighted body from dynamic content like below

vivekpande18_6-1654093739771.png

Note : You need to manually prepare the above expression in text editor.

 

4 - Pass the above action output directly in email

vivekpande18_7-1654093825431.pngvivekpande18_8-1654093867217.png

 

Output:

vivekpande18_9-1654093905052.png

 

 

Thanks

Vivek Pande

If this post helps answer your question, please "Accept as Solution" to help others find it more quickly.

If you thought this post was helpful, please give it a Thumbs Up.


Subscribe to my YouTube channel to get more interesting content on Power Automate.

 

 

 

 

View solution in original post

8 REPLIES 8
Priyan1
Frequent Visitor

Priyan1_0-1654069940204.png

The HTML table was added like this , i tried with compose output still shows error at flow like below

Priyan1_1-1654070014908.png

 

 

Priyan1
Frequent Visitor

@Rhiassuring @vivekpande18  can you tell me the mistake here or short solution for the above problem?

vivekpande18
Super User
Super User

Hi @Priyan1 ,

 

Is column Part mail ad is single or multi value person field ?

Above column is fetching from Trigger action or Get Items action ?

 

Thanks

Vivek pande

ashyriverflow
Resolver II
Resolver II

hi @Priyan1 I think you don't need to put "Create HTML table" step inside Apply to each. The action itself already acts on an array - in this case it's "Part mail ad" in the From box.

Just move the step outside of the loop will help.

It is single value person ( i hope you mean only person Display name visisble when we search=correct me if i wrong and tell me where to look that is single value or multi value) .  And the flow like first "When an item created" > "Get item" action then the steps. 

Priyan1_0-1654079160090.png

 

When it ried as you said the below error comes,

 

Priyan1_1-1654079701322.pngPriyan1_2-1654079716100.png

 

ashyriverflow
Resolver II
Resolver II

the dynamic contents have been messed up. In the From, it should point to the Part mail ad dynamic content and in the value box, it points to one of the properties within Part mail add.

You can go to one of the run histories and check the actual output of Get item action. You can see the returned values of Part mail add. From there, you can use item('property_name') expression in the value box of Create html table.

Hi @Priyan1 ,

 

To check the single/multi value person field.

1- Go to List Setting

2- Open the Column and check below

vivekpande18_0-1654092422210.png

 

 

Looking at your flow, it seems like its a multi-value field.

Find the steps below to create a table of the names.

 

1 - After Get Item action, you can add below step

vivekpande18_1-1654093391766.png

In my case people picker field name is Person. I want name & Email, so i have taken both from dynamic content shown below

vivekpande18_2-1654093490964.png

 

2- Add Create HTML Table action and provide output from above action.

vivekpande18_3-1654093549706.png vivekpande18_4-1654093585242.png

 

3 - Use Compose action to format the table

vivekpande18_5-1654093642617.png

 

Inputs : replace(body('Create_HTML_table'),'<table>','<table style="width:100%;border-collapse: collapse" border=" 1px solid black">')

 

You will get the above red highlighted body from dynamic content like below

vivekpande18_6-1654093739771.png

Note : You need to manually prepare the above expression in text editor.

 

4 - Pass the above action output directly in email

vivekpande18_7-1654093825431.pngvivekpande18_8-1654093867217.png

 

Output:

vivekpande18_9-1654093905052.png

 

 

Thanks

Vivek Pande

If this post helps answer your question, please "Accept as Solution" to help others find it more quickly.

If you thought this post was helpful, please give it a Thumbs Up.


Subscribe to my YouTube channel to get more interesting content on Power Automate.

 

 

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,209)