Eventbrite to CDS Integration – Part 1

Eventbrite to CDS Integration – Part 1

In this series of posts, I will demonstrate how to integrate between Eventbrite and the Power Platform by creating a Model Driven App to store event information, Creation of Microsoft Flow to execute when a new event is created or a new order is added to an event in Eventbrite, and the creation of a Custom Connector to retrieve the event details from Eventbrite.

The series will cover 6 different blogs posts, which include the following: prerequisites (creating the entities for the model-driven app, creating the base for the flows). We assume that you already have an Eventbrite account that you can test this with, configuration of Eventbrite (setting the api and configuring the webhooks), creation of the custom connector, creation of the event flow to create a new event in CDS when a new event is created in Eventbrite, creation of the attendee flow to create a new attendee when an attendee is added to an event in Eventbrite, and finally running the tests.

The first post will concentrate on creation of the entities and the baseline flows. This is required for all the posts that will come after. The first step is to create a solution and then create or add the entities to the solution. For the purpose of this series of posts, we create a single Event entity, and make some changes to the Contact entity where we will store the values for the attendees of the event. You can create a different entity to store the attendees’ information if you would like.

The screenshots below show the fields that are used for the Event entity and the Contact entity. You should also customize the views and forms in order to display the fields that you want, and not only the default fields. We will create an app for this solution later on.

Eventbrite Integration - Event Entity

Eventbrite Integration - Contact Entity
* Note: The Contact Entity is not ideal for this scenario (as Contacts can exist in multiple events), but was used in order to simplify the process.

Once we have created the two required entities, we will create two flows for capturing the webhook from Eventbrite when an Event is Created/Updated and when an Attendee is Registered/Unregistered. To create a flow, within your solution click on the New button and select Flow. This will launch the Flow designer. In the search for trigger type HTTP, and select the When an HTTP request is received.

Eventbrite Integration - HTTP Request Received Trigger

This will show the Flow with the When a HTTP request is received trigger. There are a few properties in the trigger that need to contain data. The first is the HTTP Post URL which will be generated when the Flow is Saved. The other is the Request Body JSON.

In order to get the Request Body JSON, we navigate to the Eventbrite API reference to the Create an Event page: https://www.eventbrite.com/platform/api#/reference/event/create/create-an-event, Navigate to the area showing the JSON Schema and copy the Sample. You can copy the entire sample code, or just take the parts of it that you need, for example:

{
    "type": "object",
    "properties": {
        "config": {
            "type": "object",
            "properties": {
                "action": {
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                },
                "endpoint_url": {
                    "type": "string"
                },
                "webhook_id": {
                    "type": "string"
                }
            }
        },
        "api_url": {
            "type": "string"
        }
    }
}

HTTP Request Received Trigger - After Flow is Saved

Since a flow cannot be saved with only a trigger and requires at least one Action, add an Initialize Variable action. Set the name of the variable to Action Type and the Type to String. We will enter the default value later on.
Now you should be able to Save the flow. Once the flow is saved the HTTP Post URL will be automatically created. This can be copied into the Webhook and used by the process.
We will do the exact same process for the second Flow, which is the attendee registration flow. Let’s follow the same steps and create a flow for the attendee registration. We will create a new flow with a trigger of When a HTTP request is received. In order to get the Request Body JSON, we navigate to the Eventbrite API reference to the Retrieve an Attendee page: https://www.eventbrite.com/platform/api#/reference/attendee/list/retrieve-an-attendee
You can enter the simple JSON Schema just for the attendee (without using sample code) as in the sampe above.

We now have the HTTP Post URLs that are needed for the Event and Attendee webhooks. The flows still need to be completed, but they provided us with the minimal information needed.

Eventbrite to CDS Integration Posts:

1 – PREREQUISITES | 2 – EVENTBRITE SETTINGS | 3 – CUSTOM CONNECTOR | 4 – EVENT FLOW | 5 – ATTENDEE FLOW | 6 – TESTING