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

Sending an Email based on when an Item is added to a list

I'm trying to build a flow in Power Automate that sends an email on the date an item is added to a SP list only if the start date (a column in the list) is a date later than the created date.

 

I created this filter query: Created ge '2023-02-21' and StartDate0 ge '2023-02-27' in the Get Items action.

There is a recurrence action to send at 5:00 EST. That is copied from a workflow that worked. The email is set to send to me (for testing purposes only).

 

I'm a novice so I know nothing about Odata or queries, etc. I looked up some queries on Google and I copied from another flow that worked. The column Start date has a '0' after it only because that's what I copied from another flow. I don't understand why that is there.

I tested and had no errors but I didn't receive an email. I don't know why the email didn't send. Any help is appreciated.

Tsamuel3_1-1677020139077.png

Tsamuel3_2-1677020228961.png

 

 

Tsamuel3_0-1677020055489.png

Tsamuel3_3-1677020256197.png

 

3 ACCEPTED SOLUTIONS

Accepted Solutions

Hi there, 

 

The other user had the 0 on their StartDate because that is their internal column name. You can find your internal column name by going to your list, going to settings, and clicking on the column you want to use. The internal name will appear in the URL, at the end. Mine is also StartDate0. If you have something else, edit that in the expression I give you below.

 

If you want this to run only if the Start Date > Created Date, you would probably use a different trigger - it doesn't need a schedule, but rather, "When an item is created".

 

If the goal is to send an email only, this is going to be a one-action-workflow. Our trigger and the email. Our triggers allow us to use a "trigger condition" so the workflow won't even fire if the criteria is not met.

 

Click on the triple ellipses on your trigger, and click Settings. 

 

Go to the bottom and click "+ Add" under Trigger Conditions.

 

Paste this:

 

@less(utcNow(),triggerBody()?['StartDate0'])
 
Click done.
Rhiassuring_1-1677024386897.png

 

It's just saying "only trigger this workflow if utcNow() (this means "what day is it right now?") is less than the Start Date that the user entered." Formulas / expressions take a bit to learn but not so bad when you get the hang of them - it just takes practice. And Googling. A lot of Googling.
 
So now your flow will only fire when the Start Date is less than the Creation date. 
 
Now all you need to do is add your email to the body of the flow and test it out. You will not see a run at all when your Start Date is equal to or less than today.
 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



View solution in original post

Thanks! I ended up deleting the ",'@ford.com within the expression, and added just @Anonymous.com in the value field after the concat, at that seems to work. I received an email in the test. Thanks so much for helping with the expression and dynamic content!

concat(triggerOutputs()?['body/MgrCDSID'])

Tsamuel3_0-1678729173075.png

 

View solution in original post

Then you can remove concat() and use just

triggerOutputs()?['body/MgrCDSID']

________________________________________________________

Welcome to my web site.

View solution in original post

22 REPLIES 22

Hi there, 

 

The other user had the 0 on their StartDate because that is their internal column name. You can find your internal column name by going to your list, going to settings, and clicking on the column you want to use. The internal name will appear in the URL, at the end. Mine is also StartDate0. If you have something else, edit that in the expression I give you below.

 

If you want this to run only if the Start Date > Created Date, you would probably use a different trigger - it doesn't need a schedule, but rather, "When an item is created".

 

If the goal is to send an email only, this is going to be a one-action-workflow. Our trigger and the email. Our triggers allow us to use a "trigger condition" so the workflow won't even fire if the criteria is not met.

 

Click on the triple ellipses on your trigger, and click Settings. 

 

Go to the bottom and click "+ Add" under Trigger Conditions.

 

Paste this:

 

@less(utcNow(),triggerBody()?['StartDate0'])
 
Click done.
Rhiassuring_1-1677024386897.png

 

It's just saying "only trigger this workflow if utcNow() (this means "what day is it right now?") is less than the Start Date that the user entered." Formulas / expressions take a bit to learn but not so bad when you get the hang of them - it just takes practice. And Googling. A lot of Googling.
 
So now your flow will only fire when the Start Date is less than the Creation date. 
 
Now all you need to do is add your email to the body of the flow and test it out. You will not see a run at all when your Start Date is equal to or less than today.
 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



Thank you so much! This is so helpful.

 

I was following you until this sentence “So now your flow will only fire when the Start Date is less than the Creation date.” confused me. I'm looking to do it the other way around, the creation date is less than the start date (created 2/22/23 - start 2/27/23, for example), which is what I thought you state in the other parts of your explanation. Is this sentence a mistake or should I change the expression? OR do I misunderstand expressions?

In addition, I need to be able to send emails based on a column in the list. That's why the variables are added. I tried to add variables with the When an Item is Created trigger and it doesn't seem to like that. I tried to add an Apply to Each action, but it asks for an output from previous step. I look for When an Item is Created output but none of the choices work. Am I totally off base?

Looks like I got it to work! The test email sent properly. Now just for some fine tuning. Thanks for the help in message #2.

Tsamuel3_0-1677107871017.png

 

With your question - that was me messing up my words, yes, the expression is to trigger when the Start Date is further in the future than "Today" (which will be the creation date since it's triggering on creation.) 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



I thought my flow was working and now realize it isn't. It doesn't show any flow errors but when I click Test it just twirls and doesn't do anything. I the last time I tested it worked. However, now when I look at run history, today's runs failed. Can you tell from the flow layout if I did anything wrong or do you need more details?

Tsamuel3_0-1677769806917.pngTsamuel3_1-1677769830977.png

 

VictorIvanidze
Community Champion
Community Champion

Yes we need more details 😉 Could you show the error?

________________________________________________________

Welcome to my web site.

@Tsamuel3 The most helpful things to see would be the spot where the workflow errors (if you click the "Failed" run you'll note the actions have a green check or something else. The things without the green check - probably a red icon - we'd need to see. And then, the configuration of that action that's failing.

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



I'm trying to compare the Send an email (V2)2 of the failed and succeeded versions to see what's different but not successful. The @Anonymous.com is what I used before when it worked.

Tsamuel3_0-1677851461323.png

Tsamuel3_1-1677851480135.png

Tsamuel3_2-1677851923978.png

 

 

 

VictorIvanidze
Community Champion
Community Champion

In "Set variable 2" use concat() function.

________________________________________________________

Welcome to my web site.

I'm sorry but I don't know exactly how or where to add it. 

But I want to say, I copied this action from another similar workflow that works as expected, and it doesn't have a concat, except for time zone. I'm curious as to why this flow needs one.

Is there anyone who can help me with this?

VictorIvanidze
Community Champion
Community Champion

Did you investigate why in "Set variable 2"  the dynamic value is empty?

________________________________________________________

Welcome to my web site.

I did. I copied the action from a previous workflow that did not have a value. That workflow is very similar to this one and since I'm not familiar with the "why" or "how" of things, I used the same one. If I need to add a value there, I don't know what it should be.

Hi @Tsamuel3 ,

 

  • In your "Set Variable 2", you'll want to backspace all of that. 
  • Click into the field, and you'll get 2 tabs appear - Dynamic Content or Expression.
  • In Expressions, type "concat" and then type a ( bracket. 
  • Then, keeping your cursor at the space after the (, click Dynamic Content and find that "Mgr COSID" value. 
  • Then, type ",'@ford.com'). 
  • Click "OK". 

That's just how we tell Power Automate that "i want to put these two pieces information into a single string".

 

It'll look like this:

Rhiassuring_0-1678574927058.png

 

That will put your two values together, properly, so that the variable will make sense in your email.

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



Thanks. Based on your instructions above, I added this to the value field: 

concat(triggerOutputs()?['body/MgrCDSID']",'@ford.com')
But I got this error:
Tsamuel3_0-1678715536837.png

 

 

Did you first write it out in the expression tab field, then click okay, and have it appear purple in the value field?

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



I wrote in Expression, then Dynamic, then clicked ok.

I see a " after your ] that doesn't need to be there

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



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 (752)