Scheduler Metadata not available in event or booking

I’m using the Scheduler (via the nylas-scheduling component). Using the configuration creation API, I’ve added additional_fields, e.g. phone number. I’ve also added a metadata field which has an internal ID that we want to keep with the event. But I haven’t found any way, using APIs, to retrieve this metadata. I was hoping it’d be attached to the event or the booking, but they aren’t there.
Here’s an example of the additional_fields that I’ve added to the configuration:

{
    "scheduler": {
        "additional_fields": {
            "phone_number": {
                "label": "Phone number",
                "type": "phone_number",
                "required": true,
                "order": 1
            },
            "internal_id": {
                "label": "Internal ID",
                "type": "metadata",
                "required": false,
                "order": 2
            }
        }
    }
}

Is there an API that returns those additional_fields, particularly the metadata, for a given event_id? or a booking_id?

@jgoodnoe_css Thanks for posting, let me take a look and circle back!

Hi @jgoodnoe_css at the moment, I don’t see this as possible for Scheduler.

Let me make a note to check.

Hi, just to clarify, is the idea to keep this information available when needed, or it would be a specific field entered by the user?

Also, have you tried attaching metadata as mentioned in the API reference: via metadata field?

Also, can you share an example of your full request? The code given is the configuration sent back, not the request.

Hi Ram,

Hi, just to clarify, is the idea to keep this information available when needed, or it would be a specific field entered by the user?

I would like to keep additional information with the booking, metadata that isn’t visible to the user. I would then like to be able to retrieve that information when I look up the booking via the API. To be more specific, we have internal IDs that represent the locations where the booking/meeting will take place. When creating the booking using the Scheduler, I would like to add a hidden metadata field that sends the location ID with the booking. Then when I I use the booking API to retrieve the booking, I’d like to be able to get that metadata back with booking.

Here are the steps I followed:

  1. Created the configuration using the Java library. You could also do this using cURL with the endpoint that you mentioned: Create Configuration. In this configuration I only text fields as additional_fields.
  2. Then used cURL to update the additional_fields, adding a metadata field.
curl --location --request PUT 'https://api.us.nylas.com/v3/grants/[grant]/scheduling/configurations/[config]' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer [token]' \
--data '{
    "scheduler": {
        "additional_fields": {
            "phone_number": {
                "label": "Phone number",
                "type": "phone_number",
                "required": true,
                "order": 1
            },
            "restaurant_name": {
                "label": "Restaurant name",
                "type": "text",
                "required": false,
                "order": 2
            },
            "facility_id": {
                "label": "Facility ID",
                "type": "metadata",
                "required": false,
                "order": 3
            }
        }
    }
}'
  1. Using the nylas_scheduler, I booked an event with that meta data. Here’s an example of the request:
    POST https://api.us.nylas.com/v3/scheduling/bookings?configuration_id=[config_id]
{"additional_fields":{"phone_number":"1115551212","restaurant_name":"Metadata Tester","facility_id":"[an ID]"},"additional_guests":[],"guest":{"name":"Metadata Tester","email":"someone@gmail.com"},"start_time":1750268700,"end_time":1750272300,"timezone":"America/Los_Angeles","email_language":"en"}
  1. Now, this gets to my question. How can I retrieve that facility_id metadata from the booking? or the event? What’s the point of taking additional fields, particularly metadata, if we can’t retrieve it? I understand that the visible fields, like the phone number is included in the email and the google calendar event, but the metadata doesn’t appear to be available anywhere. How can I access that metadata that was added to the booking.

Thanks for looking!!

@jgoodnoe_css - will clarify this with the team, and circle back.

@jgoodnoe_css at the moment, metadata is not available in our booking API

@jgoodnoe_css a possible workaround, are you able to retrieve the metadata via a webhook event?

We’re in the process of setting up webhooks now. We’ll go that route.

1 Like

Hello,
Sorry to jump in, but I’m dealing with the same issue.

I’ve already implemented webhooks, and I noticed that it returns data in the customFields as you mentioned:

But I have quick questions hope you can help me @ram:

  • Should I use additionally instead of metadata for storing custom event data?
  • Is there a way to obtain a custom field from the API instead of the webhook?
  • And is the metadata attribute just for filtering and not for storing data?

I need a stable feature where I can build my feature

Thanks!

@mrosales just to follow up

The feature is stable, if you find any issues or potential bugs, do share steps to reproduce.

1 Like

Thanks for the clarification.

One final question, I noticed that when I create a new event by the API, metadata fields are not being applied either to the webhook or when I get the individual event.

I made it wokring only if after the creation, I send another PUT request with the metadata.

  • Does it mean metadata can only be updated by PUT request(after creation) and it cannot be not set at creation time?

You can set metadata fields directly when creating a new event by including the metadata property in your POST request body.

If metadata is not be applied, on each event creation, can you share a code sample where this is reproducible?

Also note specific rules for adding metadata to recurring events.

I cannot upload the Postman file, but after reading your comment, I noticed that I’m currently using the booking endpoint to create the event. I think this is why the metadata is not being saved.

Metadata in Booking won’t be inherited by the event, right?

Payload used:

POST booking

Read event

Thanks!, I still have additional questions but I’ll created another ticket for those

that’s correct: Scheduler Metadata not available in event or booking - #9 by ram

For additional questions, if unrelated, do create a new post :slight_smile:

1 Like