I would like to create a flow that automatically posts a message in a Microsoft Teams channel if an event exists on a SharePoint calendar for the current day.
The message in Microsoft Teams would include event details.
Please share any ideas for how to create this.
Kris,
I was able to get this flow to work by adding a number to the "Top Count" field in the Get Items step. It appeared the flow was only looking at a subset of the calendar events.
Now, I am trying to figure out how to add space between the table columns. The text is too close together. Can this be achieved?
I am also seeing this issue now:
The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "Title": "@formatDateTime(item()?['Title'],'MM/dd')", "Start": "@formatDateTime(item()?['EventDate'],'MM/dd')", "End": "@formatDateTime(item()?['EndDate'],'MM/dd')" }' failed: 'In function 'formatDateTime', the value provided for date time string 'Peggy - Vacation' was not valid. The datetime string must match ISO 8601 format.'.
Kelli
Kris,
My flow and event is setup the same way as shown in your screenshots.
I would share screenshots of my flow and event, but I do not see an option in the rich text editor to upload images. I have an event on the calendar today and when the flow runs the flow shows the condition was not met. This is not expected since today's calendar event should be recognized and a reminder should be sent.
Kelli
Hi @Anonymous,
Could you please show a bit more about the All-Day event that you mentioned within your SharePoint calendar list?
I have created an All-Day calendar event in my SharePoint calendar list and the details as below:
I have made a test on my side based on the date/time condition that I provided before and the flow works well. My flow's configuration as below:
The flow works successfully as below:
The All-Day event in my SharePoint calendar list today could be retrieved as above.
Please check if you have typed proper formula within Condition box of the Filter array action within your flow.
Best regards,
Kris
Kris,
Thank you! This is very helpful.
I tested the flow but did not receive the expected results. I have an all day event on the SharePoint calendar for today but a message was not posted to Teams and the flow results indicate no events matched the date/time condition.
Kelli
Hi @Anonymous,
Do you want to check if there is an event existing on current day and then post a message to Microsoft Teams?
I have made a test on my side and please take a try with the following workaround:
@equals(formatDateTime(item()?['EventDate'], 'MM/dd/yyyy'), utcNow('MM/dd/yyyy'))
@not(empty(body('Filter_array')))
The key of first entry set to Event Title and the corresponding value set to following formula:
item()?['Title']
The key of second entry set to Start Time and the corresponding value set to following formula:
item()?['EventDate']
The key of third entry set to End Time and the corresponding value set to following formula:
item()?['EndDate']
The key of forth entry set to Description and the corresponding value set to following formula:
item()?['Description']
The key of fifth entry set to Location and the corresponding value set to following formula:
item()?['Location']
Then add a "Create HTML table" action, From set to output of "Select" action, Include Headers field set to Yes.
Add a "Post message" action, Message field set to output of "Create HTML table" action.
Image reference:
The flow works successfully as below:
Best regards,
Kris
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1