I was speaker at a FileMaker event a couple of months ago. The organizer used Eventbrite to register all the attendees. It worked great and they got a nice list of all attendees, but it was only one problem: the list was not in FileMaker 🙂
Eventbrite has a lot of features organizing an event, even an app the organizer can use to scan barcodes when an attendee arrives. I believe it is also easy to export all attendees to several useful file formats. But don’t you think it would be nice to get all the attendees directly into FIleMaker? I do! As Eventbrite also provides an extensive API it is actually rather easy using the new cURL and JSON features in FileMaker 16.
Obviously you will need an Eventbrite account, and hosting one or more events. If you don’t have an Eventbrite account you will need to create one at www.eventbrite.com. It is free.
When you created an account at Eventbrite you will need to create an ”app”. I followed the instruction at the Eventbrite web page. I used the url for this blog as Application URL. The most important thing you will need later is the ”Your personal OAuth token” in step 5. Copy the token, it should be included in all requests to the Eventbrite API.
In this small sample I will get all events I have created in Eventbrite, and all attendees for each event. The API url for the request to get all events is:
The header ”Authorization: Bearer TOKEN” needs to be sent with every request. In FIleMaker 16 it is possible to enter headers in the cURL part of the Insert from URL script step. If Your personal OAuth token is in the variable $oauth_token the cURL part looks like:
"-H \"Authorization: Bearer " & $oauth_token & "\" "
The result from Eventbrite is in JSON format and I use the function JSONListValues to get a list of all events. Then it is straight forward to iterate the list and create one record in the Events table for each event.
The Eventbrite API uses something called ”paginated response”. It means a request resulting in a lot of data is divided into smaller chunks called pages with approx. 50 records. You might need to call the Eventbrite API several times to get all the data for a request. In every response/page you will get information if it is the last page, or there are more pages to get. If there are more pages you add a continuation token to the url for the next query to let Eventbrite API know you want the next page. The continuation token is provided in every response.
The final script for getting all events looks like:
When you have all the events the next step is to get all the attendees for an event. The url you use to get all the attendees of an event looks like:
"https://www.eventbriteapi.com/v3/events/" & $id_event & "/attendees/"
The variable $id_event holds the Eventbrite event id. As a result you will get a paginated response of all attendees in JSON format.
All attendees are returned in a list call ”attendees”. I use the JSONListValues function again to split the result into an ”ordinary” virtual list where every row is an attendee. I iterate the list and create a record in the Attendees table for each. If needed I make another request with the continuation variable added to the url.
The final script for getting the attendees is very similar to the get events script. The request url is of course different.
As you can open this database with FileMaker Go on iPad/iPhone it becomes very useful checking in users on the event site. You can of course do much more integration between FileMaker and Eventbrite.
Download the database: Eventbrite.fmp12