Hi,
I have a flow that is triggered when a Sharepoint list item is created or modified with one condition that one of the fields needs to be completed ( its a date). So when a user adds a date in that field I want a email to be sent.
This happens but:
I also update the list each day and that its triggering an email also for ALL past items so it generates a high volume of emails.
How can I make it to generate only for the items that are modified after my daily update?
Considerations:
Modified date is going to be changed each day in the morning by me.
Modified by is going to be me each morning
thanks
Solved! Go to Solution.
Hi @CristianD,
Do you want to send emails to the user who modified the items after your daily update?
I have created a SharePoint list on my side and the data structure of it as below:
I have made a test on my side, please take a try with the following workaround:
@and(equals(formatDateTime(triggerBody()?['Modified'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy')),not(equals(triggerBody()?['Editor']?['Email'], 'Test1@xxxxxx.onmicrosoft.com')),not(empty(triggerBody()?['Due_x0020_Date'])))
Note: The 'Test1@xxxxxx.onmicrosoft.com' represents the email address of my SharePoint account, on your side, you should type the email address of your own SharePoint account. The 'Due_x0020_Date' represents the Date column (on my side, it is Due Date) in my SharePoint list, if there is a space within your Date column, please replace the space with '_x0020_'.
Image reference:
The flow works successfully as below:
More details about using expression in flow actions, please check the following article:
Use expression in flow actions
Best regards,
Kris
Hi @CristianD,
Do you want to send emails to the user who modified the items after your daily update?
I have created a SharePoint list on my side and the data structure of it as below:
I have made a test on my side, please take a try with the following workaround:
@and(equals(formatDateTime(triggerBody()?['Modified'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy')),not(equals(triggerBody()?['Editor']?['Email'], 'Test1@xxxxxx.onmicrosoft.com')),not(empty(triggerBody()?['Due_x0020_Date'])))
Note: The 'Test1@xxxxxx.onmicrosoft.com' represents the email address of my SharePoint account, on your side, you should type the email address of your own SharePoint account. The 'Due_x0020_Date' represents the Date column (on my side, it is Due Date) in my SharePoint list, if there is a space within your Date column, please replace the space with '_x0020_'.
Image reference:
The flow works successfully as below:
More details about using expression in flow actions, please check the following article:
Use expression in flow actions
Best regards,
Kris
Hi @v-xida-msft, Kris,
Thank you, I have implemented it but I received an error message.
Please have in mind that I want this email to be triggered to a recepient and CCing the requestor (user that modified).
This is the code I added ( notice that I have to put one additional email as my colleague updates too.
@and(equals(formatDateTime(triggerBody()?['Modified'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy')),not(equals(triggerBody()?['Editor']?['Email'], 'user1@company.com'),equals(triggerBody()?['Editor']?['Email'], 'user1@company.com')),not(empty(triggerBody()?['START_x0020_DATE_x0020_ETA'])))
This is the error message:
InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2377': 'The template language function 'not' expects one parameter: the boolean value to negate. The function was invoked with '2' parameters. Please see https://aka.ms/logicexpressions#not for usage details.'.
Could you please guide me here too?
thanks
Cristian
hi Kris,
I figured that the Not statement needed and OR to accept 2 conditions. Now works properly ( I hope )
thank you for the help!
cristian
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
42 | |
37 | |
36 | |
23 |
User | Count |
---|---|
46 | |
31 | |
29 | |
28 | |
28 |