Google Reports API for Meet attendance - strange conference_id - google-api

I'm trying to query attendance for a Google Meet conference created via Google Calendars API.
I've found that the conferenceId returned by Calendar API > Events > insert it's different from the one I can use to filter in Reports API.
conferenceId from Calendar API --> ["conferenceId"]=>string(12) "xxx-xxxx-xxx"
conferenceId from Reports API{"name": "conference_id", "value": "xxxxxxx_12234XXXXXxxxxXX56"}
Does anyone knows why?
How can I query attendance based on the data returned by Calendar API > Events > insert ?
Steps to reprocuduce:
Insert calendar events (be sure to add conferenceData structure to create also the Meet conference):
https://developers.google.com/calendar/api/v3/reference/events/insert
Use the conference
List activities from Report API and check the conference_id: https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list

It seems that the conferenceId from the Calendar event object is different from the conference_id in the Reports (note that the name is different). The activities.list output also has another field called meeting_code, it's also under items.events.parameters:
{
"name": "meeting_code",
"value": "ASDFASFFGJ"
}
This one matches the conferenceId in a calendar event, except that it's without dashes and capitalized, so for the example "conferenceId": "asd-fasf-fgj" in a Calendar Event object you'll find "meeting_code": "ASDFASFFGJ" in the activity reports. So you can just remove the dashes and capitalize the conferenceId to match it to its corresponding meeting_code.
As to why this discrepancy exists, my guess after reading the definition of the Meet activity events is that it tracks different "conference sessions" within the same meeting code. For example, if you join the meeting asd-fasf-fgj it will create a new conference_id until everyone leaves the meeting. Then if the same meeting code is used again a different conference_id will be created to track the new session and so on.
I did some cursory testing and the logs do create a different conference_id every time I joined the same Meeting code. I didn't have multiple accounts to test so I'm not sure if two users can have matching IDs, but I may be close. I couldn't find any in-depth documentation so it would require more testing to figure out exactly how it works.
Either way, to address your immediate concern, you should be able to match the Event's conferenceId with the Report's meeting_code to track the attendance.
Reference:
Meet Activity log definition

Related

Power Automate: How to get the message ID to forward an email using 'Forward an email(V2)'?

I have been trying to automate the process of forwarding an email(with teams meeting link) using Power automate.
I have attached how my flow looks currently.
User submits the form with an email address
The flow retrieves the email address
Gets the events from the calendar
Filters to get a specific series
Forwards the email
I am struggling with steps 4 and 5 to get the specific message ID for the teams meeting.
I would really appreciate it if someone could let me know of a way.
The overall flow
The expanded 4th and 5th steps:
(https://i.stack.imgur.com/DzQ6k.png)
I tried to just copy the meeting id you will get from the Microsoft teams calendar but it didn't work.
This is how my forward section looks like:
The Second Filter Array under Apply to each 3 appears from this view to be filtering to the point there are no matches. Because that appears to be the email ID and not the meeting ID. Have you considered using a Condition instead? Then you can add the Meeting ID into the body of the email in your last step.

Google People API: search contacts in a specific group and contacts updated after a specific time

I am migrating our code from Google Contacts API to Google People API as Google Contacts API will be deprecated soon, but I noticed new People APIs are simple to compare with the old Contacts API.
For example, we have below code use the old Contacts API to search in a specific contact Group and were updated after a specific date by passing in the Group and StartDate parameters, but now we can't do the same query with new People API.
My question is in the new People API, is there any way we can search contacts in a specific Group and only get contacts that were updated after a specific date?
I saw one question which uses syncToken, but I think it is not a good solution for us.
Option to get the contact entries updated after a specific time NOT given in Google People API
GData.Contacts.ContactsFeed feed = service.Query(
new GData.Contacts.ContactsQuery("https://www.google.com/m8/feeds/contacts/default/full/")
{
OAuthRequestorId = employeeUserEmail,
Group = [contact group url],
NumberToRetrieve = FetchSize,
StartIndex = 1,
StartDate = [a date that only get contacts were modified after it],
});
I think they intentionally moved away from using a timestamp approach (give me all contacts updated since 1/1/2021) to a SyncToken approach.
The SyncToken eliminates any race-condition that might lead to loss of data.
For example if a contact was updated while a query was already in progress this leads to a race condition whether that contact would be included in the next query or not, which might cause the data changes to not get synced and next sync would be overridden.
So in case you're doing a fresh sync, or haven't synced for over 7 days, just get all the contacts of a group via: contactGroups.get.
If the last sync was less then 7 days ago, use a sync token to get just the updated contacts.
You could potentially get all contacts of a group, and then run a loop that filters via sources.updateTime but again, you're risking data loss.

Item.Id.UniqueId is not unique

We have a service which syncs our calender with an exhange calender. In the synchronisation process we use the unique ids to identify the appointments. Now we have a customer, which has non-unique UniqueIds.
I used the EwsEditor (https://github.com/dseph/EwsEditor) to inspect the elements and yes, both appointments (same user, same month, same UniqueId, but a different appointment) have exact the same UniqueId.
Both appointments are not created with our software. They are manually created by the user via Outlook.
Is there a reason why the exchange creates appointments/meetings with the same Ids?
Are you saying that an Id has been reused (if so that's possible as it will still be unique). Or are you saying that you have two id's in the same calendar that are the same if so are you sure your not confusing recurring appointments or that fact that the UnqiueId's are base64 encoded so this means the Id's are case sensitive.
That said using the UniqueId for calendar appointment isn't a great idea and you would be better using the GOID property like PidLidCleanGlobalObjectId https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidlidcleanglobalobjectid-canonical-property

Facebook graph api Events and Venue Information, sometimes it only returns venue id when the event was created in a known venue

I'm creating an app in Titanium that uses the Facebook Graph API to get all the users events, however, the venue information, it only brought to me, after I was very specific about the field, and some times, a lot of the times, when the Event was created in a known location, it only brings the venue_id, and when I query the venue(via http://graph.facebook.com), then it gives me the venue location details, more importantly, the latitude and longitude of the thing.
Is it possible to bring the information of the venue in the same response?
Also, it only brings the events that the user is attending, is there any way to show the events recommended to him also?
Ti.Facebook.requestWithGraphPath('me/events?limit=5000&fields=id,owner,name,description,start_time,end_time,location,venue,privacy,updated_time', {}, 'GET', function(e) {
obj = JSON.parse(e.result);
Ti.API.info('Events: '+JSON.stringify(obj));
}}); // Facebook Events
Also, it only brings the events that the user is attending, is there any way to show the events recommended to him also?
Not sure what exactly you mean by “recommended” … if you mean events the user has been invited to, then you can query the FQL event_member table with the user id.
You can kind of “join” the info from the table above with the event table by selecting from that using WHERE eid IN (SELECT … FROM event_member WHERE …)
Is it possible to bring the information of the venue in the same response?
Using a multi-query you can do it, similar to as it is described here: FQL: query for event table returns venue.name instead of venue.id

What datastructure should i use storing and recording events?

I want to record events based on on a date. I also want people to be able to search for event based on a particular date and the person who recorded the event.
For example:
Person A logs in and sees a calendar, click on a day/date and records an event for that day.
Person B logs in and sees a calendar, click on a day/date and records an event for that day.
Person C comes and does the same thing.
Note that either of these persons can record more than one event.
I want to be able record this data effectively in the database and search for these events based on a number of different criteria.
Please can someone help me with a data structure for this problem?
Person
ID
Name
PersonalEvent
ID
Person
Name
Date

Resources