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

Automated Email for Locations with Target Opening Dates

Greetings,

 

I manage a SharePoint list containing facility details like location names, Target Opening Dates, Lease Dates, and more. I'm seeking guidance on how to set up an automated email notification. This notification should trigger when a location's Target Opening Date falls within the next 100 days but does not have an associated lease. Could someone kindly assist me in creating this workflow?

15 REPLIES 15
Ryan_B
Resolver III
Resolver III

@dmattia 

 

You will need to use the "Get items" action with a filter query to select these rows. This filter query should do the trick for you:

 

TargetOpeningDate lt 'addDays(utcNow(),100)' and LeaseDate eq null

 

This will get today's date, add 100 days to it, and get any rows where the Target Opening Date is less than this new date, as well as those rows that do not have a Lease Date.

@Ryan_B  - Thank you. 

 

I attempted to write the expression with the column field names, but hitting this error.

 

dmattia_0-1692301626319.png

 

@dmattia 

 

What is the exact name of the Target Opening Date column?

Target Opening/Redev is the title on the list column; however, the schema for this column is TargetGo_x002d_LiveDate.

dmattia_0-1692302968376.png

 

@dmattia 

 

Ah, I see what happened. You are trying to place the whole thing in the expression bar, which it doesn't like. You will need to paste the whole formula into the actual Filter Query bar, delete the "addDays(utcNow(),100)" part (leave the single quotes), select the space in-between the single quotes, then move over to the expression tab and enter the "addDays(utcNow(),100)" part there.

Ryan_B_0-1692304036858.png

 

dmattia
Helper III
Helper III

Can the process be adjusted to only send an email on the 100th day, rather than sending one every day for the duration of 100 days?

What determines the 100th day? Do you have a process that does this already? If so, then you will just need to change it to this:

TargetOpeningDate eq 'utcNow()' and LeaseDate eq null

 

If you aren't setting the 100th day, then you will need to perform this action based on your requirements. I'm not sure if these rows are generated automatically or manually through a form of some kind. If you're using Power Automate, you can use the part of the formula from above that gets the date 100 days from now:

addDays(utcNow(),100)

 

I'm uncertain whether this addresses your query, but in the scenario where there is a Target Opening date set for 100 days from today and no lease has been signed, an automatic email notification should be generated. This email would alert me that the location is approaching its opening date without a lease in place. It's important to note that the automation should refrain from sending daily emails for each day the lease remains unsigned. A single alert would be sufficient in this context.

 

The sharepoint list that the flow is looking at is just a standard tracker. I manually add items to it. 

 

This is what I currently have set up.

 

dmattia_0-1692634551005.pngdmattia_1-1692634574508.png

 

It sounds like you are manually selecting a date to be the Target Opening Date, which is going to be more than 100 days out, correct? If that's the case, then you will need to use the Date Difference expression to determine how many days away the target date is from today. If this number is 100, it will perform the remaining steps to send the email notification. Any other number will be ignored.

 

It took a little bit to figure out, but here is the new formula that should work:

'int(first(split(dateDifference(formatDateTime(utcnow(),'d'),formatDateTime(TargetOpeningDate,'d')),'.')))' eq 100 and LeaseDate eq null

Ryan_B_0-1692643642499.png

This will subtract your target date from today's date, split the value into only days, convert it to a number, and check to see if it equals 100. This should only return rows where the value is 100, meaning you will only get one email on the 100th day.

 

 

Thanks - when I enter the below as an expression, it gives me an error. 

 

'int(first(split(dateDifference(formatDateTime(utcnow(),'d'),formatDateTime(TargetGo_x002d_LiveDate,'d')),'.')))

 

I replaced

 

TargetOpeningDate

 

 with

 

TargetGo_x002d_LiveDate

 

and received the following

dmattia_0-1692644488156.png

 

 

I accidentally left the single quotes in when copy-pasting, so you will need to remove the single quote at the beginning of the expression. I also forgot to put single quotes around the column name. Below should be the proper expression, but when I try it on my end it throws an error about the date not being ISO 8601 format. Which is confusing because it's a SharePoint Date and Time column, so I would assume it would work as is.

int(first(split(dateDifference(formatDateTime(utcnow(),'d'),'TargetGo_x002d_LiveDate'),'.'))) eq 100 and LeaseDate eq null

Unfortunately, I haven't been able to figure out where the problem is, so we may need to have some additional help on this.

Thank you! Could it be that the columns in sharepoint are not always "Date and Time' columns? Some are single line text, but dates. 

 

Sorry - I meant to mention this earlier. 

I'm not sure, I was trying the above formula with a date and time column. I didn't try it with a single line text column.

 

I was able to get it to work using a manual input trigger and selecting a date, but when swapping that out for a column in SharePoint it ceased to work. I even tried to format the column to be in ISO 8601 format, but it still errored out. Unfortunately, I'm not sure what the issue is, probably something to do with the "Get items" action being an array. I tried to select the column using "item()?['TargetGo_x002d_LiveDate']" but it gave me an error stating it was null.

 

Honestly, I'm at a loss as to what the issue is with this. The formula works, just not with the SharePoint column for some reason. Sorry I can't be of more help when the solution is so close.

Ryan_B
Resolver III
Resolver III

@dmattia 

 

This isn't as elegant as the previous potential solution, but this will at least fulfill your requirements:

 

Ryan_B_6-1692737732972.png

Ryan_B_5-1692737680134.png

 

Ryan_B_4-1692737623054.png

 

 

Create a new column in your SharePoint list called NotificationDate. The above portion of the flow will be right after your Reoccurrence trigger and before your email portion. This will get all the rows where the NotificationDate is blank, take the TargetGoLiveDate column and add 100 days to it, and set this value in your NotificationDate column. You will then get the entire list again, but this time filter it where the NotificationDate is today and the LeaseDate is blank. Then you will take these rows and send an email for each one, and you will only receive one email per row.

 

 

Ryan_B
Resolver III
Resolver III

@dmattia 

 

Just checking in to see if my previous solution worked out for you, or if you still require more help.

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,159)