cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Email reminders based on Expire date in Sharepoint

Hi 

 

i'm trying to create a system for our company and did some googling but nothing really comes up that can do the trick for me or seem to be working.

 

Ok our plan is to create a Library with all possible contracts from each department in. Id be working with folders to fix all permissions so they wont see eachothers contracts. Eventually work with a view that doesnt show folders but just the documents.

Example as below;

 

Pretty basic information so far;

TORFS_BE_0-1699531762031.png

 

Every contract that will be inserted will have a specific expire date ("Vervaldatum" on my screenshot).

I want to be able to send out reminders before, for example 90 days, 60, 30, 7 and final day it will expire. (I did not manage to get this working btw 😥)

 

On TOP of those reminders, if possible, I would like to add a colum so the person uploading the contract can set an extra reminder to be send out (For example: add a column 'Remind me in' and the value would be 200 -> the system would remind the person 200 days before the expiry date by email)

 

I'm really new to Power Automate and I don't always understand the actions its doing or how its build to fully understand each step. If there is a detailed guide out there and you can share it with me, appreciated!

 

 

 

 

 

20 REPLIES 20
v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

Do you want to send emails 7 days, 30 days, 60 days and 90 days before the deadline?

Please try this:

Create a flow that runs once a day, extracts all files in a folder, and calculates the number of days between today and the deadline to send an email that satisfies any condition under condition.

vmengmlimsft_0-1699585206106.png

Expressions for calculating the number of days.

div(sub(ticks(string(items('Apply_to_each')?['DeadlineColumnName'])), ticks(string(utcNow()))),864000000000)

For two hundred days, you can use this method as well.

 

 

Thanks for reading!

Rimmon

hi @v-mengmli-msft 

 

Thanks for the reply!

 

I have tried to copy paste the flow you suggested me.

However, I came across an error message trying to save it. 

I'm pretty sure the error is on my side instead of your suggestion. I'm confused regarding the "Apply_to_each"? Do I need to fill in something here like the "DeadlineColumnName"?

 

Also, my library has department folders in it, with files in it.

The flow you suggest is smart enough to look for the files in these folders ? 🙂 

 

Below the example I tried to create;

TORFS_BE_0-1699605583775.png

 

 

As for the 200 days one;

this column should be dynamic and not fixed 200 days for example.

Is there a way to setup a system so whatever the person inserts it will calculate this and remind the person on the fixed day it stated in this column? 200 was just an example from my side.

 

 

Thank you for helping me!

v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

The Condition action should be inside 'Apply to each' not outside. Please review my flow.

You don't need to fill 'DeadlineColumnName' in the expression, it is an example for you replace it with your date column name.

I'm a little confused about "this column should be dynamic and not fixed 200 days for example". Maybe you can show me an example.

 

Best reagrds,

Rimmon

 

 

Hi @v-mengmli-msft 

 

Again, thanks for the reply!

 

Ok, my mistake to not see the flow was set up different, my bad.

Anyhow, I retry to copy paste the flow you suggest. This time I was able to "SAVE" but as soon as I try to run it, I get error messages.

 

Yet, i'm still confused on what each part will do. 

 

This is what my flow does when I try to re-create. 

I don't see any value output stated on ur screenshots at the "Apply to each". Yet I cannot continue if I don't insert anything.

The value I picked was the "Vervaldatum" column. As soon as I select it, it adds another "Apply to Each" below it.

 

TORFS_BE_0-1699607845376.png

 

when I try to test the flow, i get these messages in detail;

TORFS_BE_1-1699607973486.png

 

 

As for the 200 days thing;

Here's my example;

 

Id create a column so people can pick when they want a reminder by themself and the flow would calculate this by itself and send out the email when asked in this column. 

I hope this is clear enough for you.

TORFS_BE_2-1699608002844.png

 

 

 

v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

Please do not select the "Vervaldatum" dynamic content, the expression I provided can get the value of this column.

Please add 'apply to each' action and just select the 'value' dynamic content, then put the condition action inside the 'apply to each'.

 

The function of important steps:

'apply to each': Performs operations on each of files.

The expression:

items('Apply_to_each')?['DeadlineColumnName']//get the date of current record in 'apply to each'

string(items('Apply_to_each')?['DeadlineColumnName'])//convert date to string

ticks(string(items('Apply_to_each')?['DeadlineColumnName']))//caculate ticks about the date

sub(ticks(string(items('Apply_to_each')?['DeadlineColumnName'])), ticks(string(utcNow())))//Calculate the tick difference between two date

div(sub(ticks(string(items('Apply_to_each')?['DeadlineColumnName'])), ticks(string(utcNow()))),864000000000)//Convert the results to days.

 

For your second question, you can add another condition inside 'apply to each', using an expression to calculate the number of days from the file created time to today, and if it equals the value of the column in your table, then send an email.

vmengmlimsft_1-1699610270358.png

 

The expression in condition2

div(sub(ticks(string(items('Apply_to_each')?['Created'])), ticks(string(utcNow()))),864000000000)
int(items('Apply_to_each')?['ColumnName'])

 

If my answer solves your problem, please accept it as a solution. Thanks!😀

 

Rimmon

Hi @v-mengmli-msft 

 

Sorry here I go again, thanks for the time looking into this for me.

I get another error message as soon as I try to test the Flow.

TORFS_BE_0-1699614174091.pngTORFS_BE_1-1699614187922.png

 

 

 

v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

What is type of 'Vervaldatum'? Is that text type?

Please change the type to DateAndTime(not include time) and run flow manually.

 

Best regards,

Rimmon

Hi @v-mengmli-msft 

 

Thanks for picking it up again.

The column was DateAndTime already.

 

Is there any extra information I could provide?

 

TORFS_BE_0-1699869138350.png

 

 

v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

Thanks! 

I just wondering why our date columns are displaying dates in different formats.

The date in my column:

vmengmlimsft_0-1699869738892.png

Perhaps this led to the error. 

Please add two compose action and copy the expression:

Compose1:

items('Apply_to_each')?['Vervaldatum']

Compose2:

formatDateTime(items('Apply_to_each')?['Vervaldatum'],'yyyy-MM-dd')

Then run flow and show me output of compose even it is an error.

 

 

Best regards

Rimmon

 

Hi @v-mengmli-msft 

 

I'm not sure if I placed the "Compose" action correct tho.. but i'm not able to save right now.

(I tried to place it after and before the "Apply to each" action.

 

TORFS_BE_0-1699874380405.png

 

v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

Sorry, I mean put compose inside 'apply to each'.

The expression contains 'items('Apply_ to_each')', if you do not put compose inside 'apply to each', it cannot get the value of column.

Just like this:

Inside 'apply to each' and above Condition.

vmengmlimsft_0-1699941677607.png

 

Or you can show me the output in 'Get files' here:

PS. 'testText' is my column name.

 

vmengmlimsft_2-1699941986296.png

 

 

Best regards,

Rimmon

Hi @v-mengmli-msft 

 

Thanks for trying to continue to make this work eventually.

I placed the Compose correct now and when I try to run, I get an error on "Compose 2".

TORFS_BE_0-1699946431285.png

 

Again, I have no clue how to give you the output of the "Get Files" operation, sorry.

 

 

Maybe not relevant but i'm going for it, maybe its affecting the system or not.

I have made a library with Folders for each department with permissions on.

In these folders are documents with the column we want to make it work.

TORFS_BE_1-1699946574178.png

 

And I have a list view created that shows no Folders but just the documents the user has permissions on.

I assume, but not sure the system is smart enough to grab these files within those folders as I state in the "Get Files" to use the "Documents" Library.

 

TORFS_BE_2-1699946742651.png

 

 

 

 

v-mengmli-msft
Community Support
Community Support

Hi @TORFS_BE ,

 

Please click the 'get files' action and you will see the output.

vmengmlimsft_0-1699947350534.png

 

 

 

@v-mengmli-msft 

I have posted the file but my reply was removed I believe.

 

I have some screenshot of the timestamp tho;

Does that work for you too?

 

TORFS_BE_0-1699954526401.png

 

 

 

Does it the output of 'get files' action?

I can't see this screenshot about the output of Vervaldatum column. You can check my previous reply, what I want to know is the output of this column in 'get files' action.

I noticed that your compose1 ran successfully. Could you please show me the output of it?

 

 

Hi @v-mengmli-msft 

 

I'm not able to share the output, it gets deleted because it contains sensitive data I assume.

The dateformat shown in my file/output is "2023-11-08" for example tho.

 

 

Sorry for late reply.

It seems that the value in correct format.

Could you please show me the expression in your condition?

I just want to check it over to make sure it is correct.

vmengmlimsft_2-1700032444193.png

 

 

Hi @v-mengmli-msft 

 

Thanks for giving it another go!

 

Here's the information;

all 4 conditions are equal to the one below;

 

div(sub(ticks(string(items('Apply_to_each')?['Vervaldatum'])), ticks(string(utcNow()))),864000000000)
 

TORFS_BE_0-1700034027744.png

 

@v-mengmli-msft 

 

Do you have any other suggestions or should I look for another solution here? 🙂

 

 

Best regards

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,470)