cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abonahoom
Helper I
Helper I

Combine SharePoint list items into one email

Hi Guys,

 

I thought this would be very simple but it doesn't seem so.  I have a flow that runs everyday and I want it to email a list of items that has a status of submitted.  If nothing has that status than I don't want it to email.  In Get items I'm using the Filter Query where Order Status equals Submitted.  I'm then having the flow create a HTML table and then emailing the Output from the HTML table.  I receive an email with the headers but no data.    

 

Please help, thanks!

Capture.GIF

Capture1.GIF

1 ACCEPTED SOLUTION

Accepted Solutions
abonahoom
Helper I
Helper I

Well, I just figured it out but not really.  I noticed that I'm using our service account as the connection in the Get items step and when I changed the connection to me, it pulled everything.  I'm not sure why because our service account should have access to everything.  But yay, I'm glad it works now!

abonahoom_0-1613519173617.png

 

View solution in original post

10 REPLIES 10
DamoBird365
Super User
Super User

Hi @abonahoom 

 

What does the flow history show for the output of get items and therefore the input of the create an html table?  Any data at all?

Thanks for responding @DamoBird365 .  I think that's the problem.  I'm not seeing any outputs from Get Items.  The outputs from Create HTML table shows the column headers but no data.  If I remove the filter query just to see if it works same thing.  

Capture.GIF

 

Paulie78
Super User
Super User

So what do the outputs of your "Get Items" action show? 

abonahoom
Helper I
Helper I

{"statusCode":200,"headers":{"Transfer-Encoding":"chunked","Vary":"Origin,Accept-Encoding","X-SharePointHealthScore":"0","X-MS-SPConnector":"1","X-SP-SERVERSTATE":"ReadOnly=0","DATASERVICEVERSION":"3.0","SPClientServiceRequestDuration":"65","SPRequestGuid":"183feb93-b041-4821-91a1-2c2cf0f76b71","request-id":"183feb93-b041-4821-91a1-2c2cf0f76b71","MS-CV":"k+s/GEGwIUiRoSws8PdrcQ.0","Strict-Transport-Security":"max-age=31536000","X-FRAME-OPTIONS":"SAMEORIGIN","Content-Security-Policy":"frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.stream.azure-test.net *.microsoftstream.com;","MicrosoftSharePointTeamServices":"16.0.0.21003","X-Content-Type-Options":"nosniff","X-MS-InvokeApp":"1; RequireReadOnly","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"false","Cache-Control":"max-age=0, private","Date":"Tue, 16 Feb 2021 23:29:59 GMT","P3P":"CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","Content-Type":"application/json; charset=utf-8","Expires":"Mon, 01 Feb 2021 23:30:00 GMT","Last-Modified":"Tue, 16 Feb 2021 23:30:00 GMT","Content-Length":"12"},"body":{"value":[]}}

And this is what my SP list shows. 

Capture.GIF 

Paulie78
Super User
Super User

Can you post a screenshot of your get items step. Because it is bringing back precisely nothing, which is why you're getting nothing out.

abonahoom
Helper I
Helper I

Well, I just figured it out but not really.  I noticed that I'm using our service account as the connection in the Get items step and when I changed the connection to me, it pulled everything.  I'm not sure why because our service account should have access to everything.  But yay, I'm glad it works now!

abonahoom_0-1613519173617.png

 

View solution in original post

Paulie78
Super User
Super User

Well done!

abonahoom
Helper I
Helper I

@Paulie78 Thank you for your help. 

Paulie78
Super User
Super User

You still did not resolve your original question, of how not to send the email if no entries match in the SP list. To do that you would create a condition using this expression on the left side:

length(outputs('Get_items')?['body/value'])

and choose greater than as the comparison, and then zero as the value on the right hand side. 

Then if it is true, you would send the email, if it is false, you would do nothing.

abonahoom
Helper I
Helper I

That worked perfectly!  Thank you for all your help.  I don't know where I'd be without it.  Banging my head against a wall I suppose.  😀

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,361)