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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send email update with...
Power Automate
Answered

Send email update with changes to Sharepoint list in the last 24 hours.

(0) ShareShare
ReportReport
Posted on by 10

Hello everyone,

 

I have a sharepoint list with 3 columns for now. 

1) Sales District (single line of text)

2) Sales Rep 1 (Person or group object)

3) Temporary Cover (Person or group object)

Mapping Columns.png

I'm trying to use Power Automate to send an email notifying of any changes to this list over the last 24 hour period. I've managed to set this up in Flow so that it correctly pulls items from the sharepoint list modified in the last 24 hours, however it pulls everything from the Person/Group object, I'm trying to edit this down to just the display name. 

 

Current flow:

Mapping Flow.png

Current Output

Mapping - HTML Table export.png

 

Any help or advice would be greatly apprecaited!

 

One last note: the Sales Rep 1 column may have multiple persons assigned in some cases, so ideally I would be able to pull each of the display names at the same time.

 

Many Thanks,


Alex

Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @isavedalex ,

    as the multiple people picker column gives you an array of objects with all the information about the users, you'll need a complex expression to get just a specific value for each user from there:

    e.g. to get comma delimited display names from 'Person_MultiplePicker' column:
    join(xpath(xml(json(concat('{"body":{"value":', item()?['Person_MultiplePicker'], '}}'))), '/body/value/DisplayName/text()'), ', ')

    I posted an article on the formatting of SharePoint items in an HTML table just a few days ago.

     

  • v-duann-msft Profile Picture
    on at

    Hi @isavedalex 

     

    Thank you for your post.

     

    I agree with @tom_riha to get multiple value, we need to use expression. 

     

    In addition to your error while pull out people display name from output. We'd better use 'people/displayname' instead of 'people' only. 

    v-duann-msft_0-1617158722785.png

    v-duann-msft_1-1617158847713.png

     

    Hope it helps

     

    Best regards,

    Anna

  • isavedalex Profile Picture
    10 on at

    Hey @tom_riha ,

     

    Thank you so much for your response! this looks like exactly the right solution for me, but I'm having a little bit of trouble implementing it.

     

    To simply things, I renamed the sharepoint column Sales Rep 1 to 'ISSR' and tried the expression you provided but I replaced ['Person_MultiplePicker'] with ['ISSR']

     

    join(xpath(xml(json(concat('{"body":{"value":', item()?['ISSR'], '}}'))), '/body/value/DisplayName/text()'), ', ')

    isavedalex_0-1617182192045.png

     

    When testing the flow like this, I get the following error.

    The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{
     "District": "@item()?['Title']",
     "ISSR": "@join(xpath(xml(json(concat('{\"body\":{\"value\":', item()?['ISSR'], '}}'))), '/body/value/DisplayName/text()'), ', ')\r\n",
     "Temporary Cover": ""
    }' failed: 'The template language function 'json' parameter is not valid. The provided value '{"body":{"value":}}' cannot be parsed: 'Unexpected character encountered while parsing value: }. Path 'body.value', line 1, position 17.'. Please see https://aka.ms/logicexpressions#json for usage details.'.

     

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @isavedalex ,

    you must use the column internal name in the expression, expression don't care about the display name. You can take the internal column name from the url if you go to the 'Edit column' page.

    image.png

  • isavedalex Profile Picture
    10 on at

    Thank you so much for your help @tom_riha , you've saved me countless hours here!

     

    Can I donate a Coffee/Beer or something else to you to say thank you? 

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @isavedalex ,

    you can buy me a coffee on my blog if you'd like, but a 'thank you' is more than enough. 🙂

  • snehabirajdar17 Profile Picture
    2 on at

    Will you please put query for this

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard