I'm trying to create a flow that will send an automatic Gmail reply to any email that arrives in my inbox for the whole duration of an event (with a specific title) in my Google Calendar.
This was my attempt:
It works as it's supposed to, the only problem is that it runs only once after the event is started and I need it to keep running until the end of the event. Some other attemps using switches have not worked.
Thanks for the help!
Solved! Go to Solution.
Hi @nhafala,
Do you want to reply to an email when an email arrives while you are in a meeting?
Please try with the following configuration.
It is triggered by When an email arrives.
Then List the events on a calendar.
Add an apply to each, with in the apply to each, add a condition and enter the following code to check if the email received time is within the event duration.
@and ( greaterorequals(triggerBody()?['DateTimeReceived'], items('Apply_to_each')?['start']), lessorequals(triggerBody()?['DateTimeReceived'],items('Apply_to_each')?['end']) )
Under if yes branch, reply to the email automatically.
Note: I have added two compose actions to check the return value just for testing. You could just remove them from the flow.
Hope it could be your reference.
Best regards,
Mabel
Hi @nhafala,
Do you want to reply to an email when an email arrives while you are in a meeting?
Please try with the following configuration.
It is triggered by When an email arrives.
Then List the events on a calendar.
Add an apply to each, with in the apply to each, add a condition and enter the following code to check if the email received time is within the event duration.
@and ( greaterorequals(triggerBody()?['DateTimeReceived'], items('Apply_to_each')?['start']), lessorequals(triggerBody()?['DateTimeReceived'],items('Apply_to_each')?['end']) )
Under if yes branch, reply to the email automatically.
Note: I have added two compose actions to check the return value just for testing. You could just remove them from the flow.
Hope it could be your reference.
Best regards,
Mabel
Hi,
Thank you for your reply. I tried your suggestion but when I run a test the apply to each just keeps processing for 4 minutes and then fails. I tried it while an event was happening in my calendar.
EDIT: I tried again and it worked. I don't know what I did wrong the last time. Thanks for the help!
User | Count |
---|---|
89 | |
40 | |
21 | |
20 | |
16 |
User | Count |
---|---|
137 | |
56 | |
46 | |
36 | |
26 |