Hi All
Need some help, new to Flow so I'm a little stuck with this one.
I'm generating an automatic email response to users that book an appointment in a sharepoint calendar.
I want my flow to determine if the event is scheduled for a weekday or weekend then respond accordingly.
I've created the flow, just stuck on the part that determines day of week the event falls on.
Any ideas?
Please share more details about the sharepoint list and the schedule date column in the list.
You could update the expression in the Compose with the schedule date expression.
If the schedule date is a "ScheduleDate" column with a date type in the sharepoint list, the flow should as below:
The expression in the Compose:
dayOfWeek(triggerBody()?['ScheduleDate'])
Best regards,
Alice
HI @v-yuazh-msft
As per your steps.
I'm not after the create date, but when it's scheduled. For example, I make the event today Monday, but the event is schedule for Saturday, so that would be true and it would generate an email with the Weekend predifined text as the event falls on a weekend.
Thanks for the help!
Really apperciate it!
C
Hi @ChristianZappa,
Could you please share a screenshot of the configuration of your flow.
If you want to check the create date of the event,please refer to screenshot below to create the flow:
The expression in the Compose should as below:
dayOfWeek(triggerBody()?['Created'])
When the flow runs,if event is created on Thursday, the Value of the Compose should be 4, if event is created on Saturday ,the Value of the Compose should be 6.
Best regards,
Alice
Hi @ChristianZappa,
Could you please share a screenshot of the configuration of your flow.
If you want to check the create date of the event,please refer to screenshot below to create the flow:
The expression in the Compose should as below:
dayOfWeek(triggerBody()?['Created'])
When the flow runs,if event is created on Thursday, the Value of the Compose should be 4, if event is created on Saturday ,the Value of the Compose should be 6.
Best regards,
Alice
Thanks v-yuazh-msft
Followed your steps, but I wasn't able to simulate the weekend reponse.
When I created an event for Thursday, I had the weekday email generate, when I created an event on Saturday it still returned the weekday email.
C
Hi @ChristianZappa,
You could refer to screenshot below to create the flow:
The expression in the Compose as below:
dayOfWeek(utcNow())
The exression in the Condition as below:
@or(equals(outputs('Compose'), 0),equals(outputs('Compose'), 6))
Note:
If the result of the Condition is true, that means the event is scheduled for weekend, you could add respond actions inside the If yes branch of the Condition.
If the result of the Condition isn't true, that means the event is scheduled for weekday, you could add respond actions inside the If no branh of the Condition.
When an item is created or modified in the sharepoint list, the flow would run successfully as below:
Best regards,
Alice