cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dennis_Qiang
Helper III
Helper III

Can the new sharepoint list item added every week be automatically sent out by email? All the new item information is summarized in one email and sent automatically once a week at a specific time.

Can the new sharepoint list item added every week be automatically sent out by email? All the new item information is summarized in one email and sent automatically once a week at a specific time.

 

I use "create new item and sent email" template. It can be realized that whenever there is a newly created item, an email will be sent automatically. But what I hope to achieve is that the new items for a week will be sent out only by one email.

 

Dear experts, can I achieve the function I want?

 

Best Regards

Dennis

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Dennis_Qiang 

Sorry I missed below highlighted ; i tried it at my side and it worked, Also please add single Quotes between the Outputs

Mira_Ghaly_1-1611631722314.png

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

12 REPLIES 12
Mira_Ghaly
Dual Super User
Dual Super User

@Dennis_Qiang 

1. Instead of the current trigger you need a scheduled flow (Recurrence Trigger) that runs weekly 

Mira_Ghaly_0-1611561329813.png

 

2. Get Items with Filter Criteria like this

 

Mira_Ghaly_4-1611562014662.png

 

 

where start and end dates can be generated as below:

StartDate=UTCnow() -7days

EndDate=UTCNow

3. Then you can use the Create HTML Table and use it to generate a table from List of Items returned from Get Items and use it in your email

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Dennis_Qiang 

To get the Time in past you can use the below Action and make sure you format the date use formatdatetime(Timestamp,'yyyy-MM-dd') and use it as parameter instead of start date above

Mira_Ghaly_5-1611562163876.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly 

 

I still don’t understand how " Created It'EndDate’ and gt'StartDate’ " is implemented? Does "Created" use the automatically generated Created column in the sharepoint list? Where can I define "EndDate" and "StartDate"? Can you help me with an example? Is it necessary to use the "Get past time" you mentioned below?

 

 

Mira_Ghaly
Dual Super User
Dual Super User

@Dennis_Qiang 

we need Past time to get the date from the beginning which is start date

Mira_Ghaly_0-1611622005242.png

Then format it as 'YYYY-MM-dd' using compose data operation Expression as below: 

formatDateTime(body('Get_past_time'),'yyyy-MM-dd')
 
 
Mira_Ghaly_3-1611622163570.png

 

End Date : Compose Data Operation: 

formatDateTime(utcNow(),'yyyy-MM-dd')

 

Mira_Ghaly_6-1611622290270.png

Then use the outputs of the compose data operations as  below in Place of the filter

Mira_Ghaly_7-1611622362021.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Mira_Ghaly
Dual Super User
Dual Super User

@Dennis_Qiang 

Answering your questions above:

I still don’t understand how " Created It'EndDate’ and gt'StartDate’ " is implemented? Does "Created" use the automatically generated Created column in the sharepoint list?

Created is the automatically generated created column when a new list item is created so the condition is created less than end date(Today) and greater than start date(which is today-1 week)

Where can I define "EndDate" and "StartDate"? Can you help me with an example? Is it necessary to use the "Get past time" you mentioned below?

I have provided example below on defining start and end date

 

Hope this helps!

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly 

 

I tried your method, but it seems that the format of the Created column does not match.

Please help to see the error log.

 

Thank You for you help!!

 

WeChat Image_20210126104740.pngWeChat Image_20210126104709.png

@Dennis_Qiang 

Sorry I missed below highlighted ; i tried it at my side and it worked, Also please add single Quotes between the Outputs

Mira_Ghaly_1-1611631722314.png

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

HI @Mira_Ghaly 

 

Thank you for you support. I achieved the desired function.

 

But for trial run , i meet a problem.

 

When I just completed the trial run of flow last week, I only received one email. But now after I try this flow, I will receive many emails instead of one. I re-created a new flow as it is, and trial run will also receive many emails. May I ask what caused this? I just want to receive only 1 email per run. WeChat Image_20210205100821.png

@Dennis_Qiang 

This is what is causing it; you need to remove ur email step from this loop

Mira_Ghaly_0-1612495580029.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly 

 

If i remove this step, How can I automatically send out the information filtered by the flow before?

Mira_Ghaly
Dual Super User
Dual Super User

@Dennis_Qiang 

 

You have already constructed an HTML table which the one you want to send in the email , so email step needs to be outside  the loop so as not to send multiple times as in  your case.

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly ,

 

Thank you for your patience.

 

Now i meet a new question for this flow.

 

If i change Filter Query contain "Created" to "Modified". This function will not work properly.

 

I think in SharePoint List, both "Created" and "Modified" are Created automatically and both of them about Date and time information,  Why Filter Query = "Created" can work, but Filter Query = "Modified" can not work?

 

Did i miss any step?

 

Thank you!

 

B&R

Dennis

 

 

Hi Mira,

 

I got the answer from below link.

 

https://powerusers.microsoft.com/t5/Building-Flows/Get-Items-Filter-Query/m-p/319867

 

I can not delete my question... So you don't need to reply..

 

Thank you again.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,545)