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
- 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 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, 2021Copper 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.
- Kimberly_HuffmanJan 17, 2021Copper 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- ArlartJan 21, 2022Copper Contributor
Kimberly_Huffman Thanks a lot for the documentation. It helps a lot.
The only challenge i have is that it doesnt work with the customs fields. I think the problem is CRLF between the the question and the answer. Any idea how i can get this into the function?
Calendar Event:
Benutzerdefinierte Felder
----------------------
Frage 1–Geburtsdatum
Antwort – 1.12.2021
Frage 2–Ausweisnummer
Antwort – 0Current workaround:
trim(last(split(first(split(outputs('HTML_zu_Text')?['body'],'Frage 2')),'Frage 1–Geburtsdatum')))
The problem is that the return is --> "Antwort – 1.12.2021"
I tried to use substr, but that doesnt work....
- 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....."}]
- Lobsang_akaOct 13, 2020Copper Contributor
Martin-Coupal Thank you!