Forum Discussion
Custom Fields in Microsoft Bookings
- Oct 13, 2020
You will need to extract custom fields values using graph. You will need to filter with the following (use the exact same values). Then the returned value will need to be Base64 Decoded. I'm using this with Power Automate that start whenever a new event created (Outlook new event), extract the info and put into a SharePoint list.
https://graph.microsoft.com/beta/users/[BookingMailboxAddress]/events/[event Id]?$expand=singleValueExtendedProperties($filter%3Did eq 'Binary {ccb88e73-951a-4b10-bb49-e6628b8d8494} Name BookingItemAnsweredCustomQuestions')
https://docs.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-beta&tabs=http
You will need to extract custom fields values using graph. You will need to filter with the following (use the exact same values). Then the returned value will need to be Base64 Decoded. I'm using this with Power Automate that start whenever a new event created (Outlook new event), extract the info and put into a SharePoint list.
https://graph.microsoft.com/beta/users/[BookingMailboxAddress]/events/[event Id]?$expand=singleValueExtendedProperties($filter%3Did eq 'Binary {ccb88e73-951a-4b10-bb49-e6628b8d8494} Name BookingItemAnsweredCustomQuestions')
https://docs.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-beta&tabs=http
- Lobsang_akaOct 13, 2020Copper Contributor
Martin-Coupal Thank you!
- jbailissDec 09, 2020Copper Contributor
We have bookings that return the standard fields using:
https://graph.microsoft.com/beta/users/[BookingMailboxAddress]/events/[event Id]
Within the body content of the returned data I can see there's custom fields e.g.
Custom Fields<br>
----------------------<br>
Question 1- ...<br>
Answer- ...<br>
Question 2- ...<br>
Answer- ...<br>
<br>However, when I extend the call with the Extended Properties it doesn't return the additional fields:
https://graph.microsoft.com/beta/users/[BookingMailboxAddress]/events/[event Id]?$expand=singleValueExtendedProperties($filter%3Did eq 'Binary {ccb88e73-951a-4b10-bb49-e6628b8d8494} Name BookingItemAnsweredCustomQuestions')
I'm simply copying and pasting and replacing the mailbox and event ID so struggling to see what I'm missing. Do you have any suggestions?
Thanks very much!
- Martin-CoupalJan 10, 2021Steel Contributor
jbailiss ,
Sorry for late reply,
When calling the API, what is the JSON response? You should find something like this is the response.
"singleValueExtendedProperties": [{"id": "Binary {ccb88e73-951a-4b10-bb49-e6628b8d8494} Name BookingItemAnsweredCustomQuestions","value": "W3siQW....."}] - Kimberly_HuffmanJan 17, 2021Brass Contributor
jbailiss I was able to extract custom field data successfully using Power Automate. Lobsang_aka in case you have future needs. Martin-Coupal here is another approach in case you are interested.
Flow Description
This flow runs nightly and extracts user data from events located in a custom account calendar (this account is being used by the Bookings app to schedule appointments) then creates a CSV file stored in a Shared Documents team library. Attached are the details of my solution.Hope this helps!~Kimberly- ddmurrayjrJan 21, 2021Copper Contributor
Kimberly_Huffman We're trying to extract the custom field information and populate excel with the caveat being we have multiple bookings services with overlapping times. I setup the multiple services because the group appointments don't show the custom data in the calendar event. In theory we can have up to six appointments, with six services, all at 9am. I'm totally new to power automate and don't have a clue as to how to capture the data. Any ideas?
- Martin-CoupalJan 22, 2021Steel ContributorJust in case, are you using group event scheduling (multiple participants) in your service configuration? If that's the case it will not work.
- Kimberly_HuffmanJan 22, 2021Brass Contributor
Martin-Coupal No I'm not and and you're correct, this will not work for group events. I noted that in the document I attached to my original post.