Schedule a meeting for a channel members from Flow Designer MS plugin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 03:53 AM - edited 01-31-2025 03:56 AM
How to schedule a meeting being the invitees the members of a channel using the Microsoft Teams Graph plugin and the Create Meeting action.
Solution:
1. Add the Look Up Channel Members action. Configure it with the Group and Channel ID (both can be found in the link of the channel).
2. Add the Create Meeting action:
- Configure it with the requirements you might need, like:
- User ID: might be some kind of assigned to.
- Subject: what will appear as the title of the meeting.
- Start/End: might be scripted with GlideDateTime.
Being the most import part of this post the Attendees, the structure that the plugin requests is the following:
{
emailAddress: {
address: 'mail of the user to invite',
name: 'display name of the user to invite'
},
type: 'required/optional, whether is required or not'
};
var attendees = [];
for(var key in fd_data._POSITION_OF_THE_ACTION:_look_up_channel_members.members) {
var member = fd_data._POSITION_OF_THE_ACTION__look_up_channel_members.members[key];
var attendee = {
emailAddress: {
address: member.email,
name: member.displayName
},
type: "required"
};
attendees.push(attendee);
}
var attendeesObject = {};
for (var i = 0; i < attendees.length; i++) {
attendeesObject[i] = attendees[i];
}
return attendeesObject;
Important: modify the value POSITION_OF_THE_ACTION with the actual position of you look up action, like 1,2,3...
Note: the channels should be private to be allowed to add members to them. Moreover, the connection user between SN and MS should be on this group.
Result: Meeting is created with the attendees defined.
Question: Does this solution looks find? Is there an easier one? The most important part was the modification to attendeesObject, MSTeamsGraphMeetingUtils line 96 was failing when this conversion was not added. JSON.stringify wasn't an option because this would imply modifying the MSTeamsGraphMeetingUtils method adding JSON.parse, which is not an option.