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

11 REPLIES 11
Mira_Ghaly
Dual Super User II
Dual Super User II

@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 II
Dual Super User II

@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 II
Dual Super User II

@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

View solution in original post

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 II
Dual Super User II

@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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,336)