Hi Everyone,
I would like to create an automation that every hour checks if there is an event within a one hour time and if there is then perform a set of operations.
To check for events, I would need to get the information from Teams Channel Calendar.
I do not see that option on the Teams connector, and on the Graph API docs...
Had anyone performed this before? Any suggestions?
Thank you
Regards,
LS
Solved! Go to Solution.
Teams channel calendar events will not automatically show up in Google Calendar, it seems like there is a another flow make it.
Yes, the Teams message regarding with the Teams channel calendar event will not contain details about the event except the name of the event.
So, the only way to get the details about the event is to get them in your Google calendar by using the name of the event to create a connection between the Teams message and Google calendar.
The whole flow is exactly the same as the one I’ve posted before except two steps are deleted and two steps are newly added:
The details for the two newly-added steps:
The code put in ‘Filter array’ in advanced mode:
@and(equals(item()?['summary'], items('Apply_to_each')?['attachments'][0]['name']), greater(item()?['start'], addHours(utcNow(), -1)), greater(item()?['end'], utcNow()))
The filter array is used to filter out the events in Google calendar--
whose name is the same as that in Teams message:
equals(item()?['summary'], items('Apply_to_each')?['attachments'][0]['name'])
whose start time is within an hour time from now:
greater(item()?['start'], addHours(utcNow(), -1))
whose end time is greater than now:
greater(item()?['end'], utcNow())
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes. There is no such option in Teams connector, but there is such option in outlook 365 connector.
And if someone schedule a meeting in Teams channel, then the event will automatically show in outlook 365.
So, there is a workaround for this problem.
First you can use ‘Get messages’ in Teams channel and use ‘Condition’ to filter out Teams calendar events.
However, ‘Get messages’ won’t show Teams calendar events’ start and end time.
So, then, use ‘Get events’ to get outlook calendar events and ‘filter query’ to filter out the Teams channel calendar events.
Finally, use ‘filter array’ to get events whose start time is within an hour and end time is less than now.
Here is the whole flow:
The meaning of the condition:
If the message body content contains ‘Scheduled a meeting’, then the message is from a Teams calendar event.
The detailed steps in ‘If yes’ of ‘Condition’:
Filter query:
subject eq ‘items('Apply_to_each')?['attachments'][0]['name']’
Filter array 3:
@and(greater(item()?['start'], addHours(utcNow(), -1)), greater(item()?['end'], utcNow()))
For more info about items(), item(), addHours(), utcNow():
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yiwenxie-msft ,
Thanks for your amazing reply.
I have tried to implement it and I was able to make it all work, except that the Get Events (v4) is not returning the list of events we want to filter for some reason.
Any ideas what can be wrong?
Thanks
Could you take a screenshot of your detailed steps with private information covered up?
Could you tell me whether the 'Get Events(V4)' is not returning any value or the returned value is not what you want?
If the 'Get events' returned the value you don't want, could you please tell me what kinds of value do you want?
Because in my example, the 'Get events(V4)' returns the value whose subject is equal to the title of the Teams channel calendar event.
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yiwenxie-msft ,
I get results on the Get Events v4 but they are for my personal calendar and not the teams channel calendar.
I believe I will need an AD admin to provide me the role Groups.Read.All so that I can see other calendars correct?
The only option that currently appears while selecting the calendar is "Calendar".
Thank you
From the tests I've made, I found that if one is neither the organizer nor the attendee of a Teams channel event, then he cannot get the event. And even AD admin or global admin cannot either.
But as a workaround, if you want to get those Teams channel events, you can use the connection of the user who is either the organizer or the attendee.
If the workaround doesn't suit your need, then you can post your need in Ideas forum to make the feature(Get all the details of Teams channel events) added to Power Automate if the votes you get are quite a lot:
Power Automate Ideas - Power Platform Community (microsoft.com)
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yiwenxie-msft ,
I am the organizer and I am one of the channel owners as well.
Still it is not appearing in the calendar (only shows my personal calendar events).
I am trying to get the role Groups.Read.All assigned to my user and will try after that.
Thanks
I've found that in outlook, events created from Teams calendar added to a channel will automatically show up in the calendar of attendee and organizer of the events without showing which Teams channel it's in.
So I'm afraid currently, one can only try to get Teams channel messages which representing a Teams channel calendar event and then get detailed information about the events from outlook.
Also, user can only get his own calendar events, if he wants to get others, then he will need to use others' connections. Global admin or other admin roles won't work.
If one can get all channel events using Teams connector rather than this workaround, it's no such limit.
But, currently, there is no such action, so I'm afraid it's quite limited.
If you want this feature to be added to Power Automate, you can post on Ideas forum (the more votes one gets, the more likely the feature will be added to Power Automate):
Power Automate Ideas - Power Platform Community (microsoft.com)
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have tried that approach as well but somehow the event is not created on my calendar on Teams.
Instead it appears on my corporate Google Calendar. Is this an issue with the integration? What can be done to tackle this situation?
In the meantime I was trying to use the Google Calendar to read the events but the problem is that on the Teams Message that is nothing that I can use to filter the event I need from the google calendar. No name, no start date etc...
This is the only thing I receive on the payload regarding the message:
"body": {
"contentType": "html",
"content": "Scheduled a meeting<attachment id=\"1614160918739\"></attachment>"
},
...
"attachments": [
{
"id": "1614160918739",
"contentType": "meetingReference",
"content": "{\"exchangeId\":null,\"organizerId\":\"408b87f9-6de8-....\"}",
"name": "eeee"
}
]...
Thank you
Regards,
LS
Teams channel calendar events will not automatically show up in Google Calendar, it seems like there is a another flow make it.
Yes, the Teams message regarding with the Teams channel calendar event will not contain details about the event except the name of the event.
So, the only way to get the details about the event is to get them in your Google calendar by using the name of the event to create a connection between the Teams message and Google calendar.
The whole flow is exactly the same as the one I’ve posted before except two steps are deleted and two steps are newly added:
The details for the two newly-added steps:
The code put in ‘Filter array’ in advanced mode:
@and(equals(item()?['summary'], items('Apply_to_each')?['attachments'][0]['name']), greater(item()?['start'], addHours(utcNow(), -1)), greater(item()?['end'], utcNow()))
The filter array is used to filter out the events in Google calendar--
whose name is the same as that in Teams message:
equals(item()?['summary'], items('Apply_to_each')?['attachments'][0]['name'])
whose start time is within an hour time from now:
greater(item()?['start'], addHours(utcNow(), -1))
whose end time is greater than now:
greater(item()?['end'], utcNow())
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your attention to this topic.
I was able to achieve my goal following your instructions.
Regards,
LS
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
45 | |
43 | |
43 | |
42 | |
35 |
User | Count |
---|---|
85 | |
78 | |
62 | |
51 | |
47 |