SOLVED

Get Sharepoint list with pending status and include in an email

%3CLINGO-SUB%20id%3D%22lingo-sub-830838%22%20slang%3D%22en-US%22%3EGet%20Sharepoint%20list%20with%20pending%20status%20and%20include%20in%20an%20email%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-830838%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20some%20help%20with%20Flows.%20I'm%20trying%20to%20create%20a%20flow%20where%20the%20requirement%20is%20that%2C%20all%20Items%20with%20'pending'%20status%20in%20on%20the%20list%2C%20gets%20picked%20up%20and%20sent%20to%20a%20reviewer%20or%20specific%20email%20address%20on%20every%20Monday%20morning.%20The%20list%20items%20can%20be%20either%20as%20a%20table%20on%20the%20email%20body%20or%20as%20an%20attachment%20to%20the%20email%20being%20sent.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%20if%20this%20is%20possible%3F%20I%20already%20have%20flows%20in%20place%20to%20inform%20individual%20task%20owners%20regarding%20their%20pending%20status.%20However%2C%20im%20not%20clear%20how%20to%20get%20all%20the%20list%20items%20into%20one%20mail%20attachment%20or%20on%20the%20body%20and%20set%20it%20as%20a%20recurring%20flow%20periodicallyAll%20leads%20would%20be%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-830838%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-831293%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Sharepoint%20list%20with%20pending%20status%20and%20include%20in%20an%20email%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-831293%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400913%22%20target%3D%22_blank%22%3E%40shebibn2020%3C%2FA%3E%26nbsp%3B%20-%20you%20may%20want%20to%20try%20the%20powerusers%20forum.%20I%20was%20just%20at%20SharePoint%20Fest%20and%20met%20some%20MVPs%20who%20monitor%20this%20one%20every%20day%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FMicrosoft-Flow-Community%2Fct-p%2FFlowCommunity%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FMicrosoft-Flow-Community%2Fct-p%2FFlowCommunity%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-832811%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Sharepoint%20list%20with%20pending%20status%20and%20include%20in%20an%20email%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-832811%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400913%22%20target%3D%22_blank%22%3E%40shebibn2020%3C%2FA%3E%26nbsp%3B%20yes%20this%20is%20quite%20straightforward%20to%20do.%20See%20the%20images%20below.%20The%20steps%20are%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EFor%20your%20trigger%20you%20need%20a%20recurrence%20schedule%20set%20to%20run%20every%201%20week%20on%20Monday%20at%209am.%3C%2FLI%3E%3CLI%3EThen%20assuming%20your%20list%20is%20in%20SharePoint%20you%20add%20a%20SharePoint%20Get%20items%20action%20and%20set%20the%20Filter%20query%20to%20Status%20eq%20'Pending'%20.%20In%20my%20example%20I%20have%20set%20it%20to%20'In%20Progress'%20but%20that's%20just%20my%20list.%3C%2FLI%3E%3CLI%3EThen%20add%20a%20Create%20HTML%20table%20action%2C%20set%20the%20columns%20to%20Custom%20and%20add%20your%20header%20and%20value%20items.%3C%2FLI%3E%3CLI%3EThen%20add%20a%20Send%20an%20Email%20(v2)%20action%20to%20send%20the%20email%20with%20the%20output%20of%20the%20Create%20HTML%20table%20action.%3C%2FLI%3E%3C%2FUL%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3C%2FP%3E%3CP%3EMicrosoft%20Flow%20Community%20Super%20User%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20694px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F129595iB7BBF7676A4909B8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%220-trigger-getitems.png%22%20title%3D%220-trigger-getitems.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20688px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F129596i967F3B3AE8006D0C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%221-createHTMLTable-SendEmail.png%22%20title%3D%221-createHTMLTable-SendEmail.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20444px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F129594i7BE845BE2650E48E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222-EmailResult.png%22%20title%3D%222-EmailResult.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2237213%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Sharepoint%20list%20with%20pending%20status%20and%20include%20in%20an%20email%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2237213%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40RobElliott%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20if%20there%20are%202%20values%3F%3C%2FP%3E%3CP%3EAs%20in%20Sharepoint%20list%20column%20value%20is%20'Pending'%20or%20'N.A'%20then%20trigger%20to%20send%20recurrence%20email%3F%3C%2FP%3E%3CP%3EDoes%20filter%20query%20supports%202%20or%20more%20values%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2237252%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Sharepoint%20list%20with%20pending%20status%20and%20include%20in%20an%20email%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2237252%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F943981%22%20target%3D%22_blank%22%3E%40Can_make_it%3C%2FA%3E%26nbsp%3Byes%20you%20can%20have%20multiple%20conditions%20in%20a%20filter%20query%3A%20here's%20an%20example%20of%20one%20of%20mine%20with%203%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22filterQuery-MultipleConditions.png%22%20style%3D%22width%3A%20568px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267377iF3263CA579853761%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22filterQuery-MultipleConditions.png%22%20alt%3D%22filterQuery-MultipleConditions.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2241640%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Sharepoint%20list%20with%20pending%20status%20and%20include%20in%20an%20email%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2241640%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Rob%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApologies%20if%20i'm%20troubling%20you...was%20hoping%20if%20you%20can%20help%20out%2C%20if%20not%20it's%20ok%20i%20can%20post%20it%20as%20a%20new%20topic.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20encountered%20with%20some%20issues%20(flow%20successful%20but%20did%20not%20receive%20any%20notification%20email).%3C%2FP%3E%3CP%3ENevertheless%2C%20here's%20my%20flow%3A%3C%2FP%3E%3CP%3E1.%20An%20overview%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Can_make_it_1-1616985033685.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267794i6F96CD650E963289%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Can_make_it_1-1616985033685.png%22%20alt%3D%22Can_make_it_1-1616985033685.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20Filter%20query%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Can_make_it_0-1616984903229.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267793i1E46FD515366A560%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Can_make_it_0-1616984903229.png%22%20alt%3D%22Can_make_it_0-1616984903229.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E3.%20HTML%20table%20(i've%20sent%20to%20automatic)%20and%20email%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Can_make_it_2-1616985190591.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267795i926407D220DA63FC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Can_make_it_2-1616985190591.png%22%20alt%3D%22Can_make_it_2-1616985190591.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Visitor

Hi All,

 

I need some help with Flows. I'm trying to create a flow where the requirement is that, all Items with 'pending' status in on the list, gets picked up and sent to a reviewer or specific email address on every Monday morning. The list items can be either as a table on the email body or as an attachment to the email being sent.

 

Any idea if this is possible? I already have flows in place to inform individual task owners regarding their pending status. However, im not clear how to get all the list items into one mail attachment or on the body and set it as a recurring flow periodicallyAll leads would be appreciated.

5 Replies

Hi @shebibn2020  - you may want to try the powerusers forum. I was just at SharePoint Fest and met some MVPs who monitor this one every day: https://powerusers.microsoft.com/t5/Microsoft-Flow-Community/ct-p/FlowCommunity

best response confirmed by shebibn2020 (Frequent Visitor)
Solution

Hi @shebibn2020  yes this is quite straightforward to do. See the images below. The steps are:

 

  • For your trigger you need a recurrence schedule set to run every 1 week on Monday at 9am.
  • Then assuming your list is in SharePoint you add a SharePoint Get items action and set the Filter query to Status eq 'Pending' . In my example I have set it to 'In Progress' but that's just my list.
  • Then add a Create HTML table action, set the columns to Custom and add your header and value items.
  • Then add a Send an Email (v2) action to send the email with the output of the Create HTML table action.

Rob
Los Gallardos

Microsoft Flow Community Super User

 

0-trigger-getitems.png1-createHTMLTable-SendEmail.png2-EmailResult.png

@RobElliott 

What if there are 2 values?

As in Sharepoint list column value is 'Pending' or 'N.A' then trigger to send recurrence email?

Does filter query supports 2 or more values?

@Can_make_it yes you can have multiple conditions in a filter query: here's an example of one of mine with 3:

 

filterQuery-MultipleConditions.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Hi Rob,

 

Apologies if i'm troubling you...was hoping if you can help out, if not it's ok i can post it as a new topic.

 

I've encountered with some issues (flow successful but did not receive any notification email).

Nevertheless, here's my flow:

1. An overview

Can_make_it_1-1616985033685.png

 

2. Filter query 

Can_make_it_0-1616984903229.png

3. HTML table (i've sent to automatic) and email

Can_make_it_2-1616985190591.png