Calendly APIs, Zoho CRM and Me

To be clear, I am not complaining about someone else’s API or IP here.  I just found the Calendly APIs to be odd, and wanted to write about what I learned.  I am thankful for having had the time to dig into this, getting all into Postman making this work – and having had a chance to reflect.

The thing about Zoho CRM is once you dig in, and especially if your company has a healthy Zoho One account with a great selection of products – you can do a whole lot.  However, most of the SaaS world is still catching up to that, so often the Zoho family of products seem like second class citizens in the integration world.

Case and point – Calendly and Zoho CRM.

Ideally if you did something in Calendly and wanted to update Zoho CRM you could use Zoho Flow to listen for a webhook trigger from Calendly and start doing your stuff.  Zoho Flow does have a Calendly Connector – but like a lot of things in the integration space having a prebuilt connector doesn’t mean it’s fleshed out – or in our case really that usable.  When these connectors are bare bones, it means it’s time to play with the API.

The point of this post is not to go so much over the use case details, but more about the Calendly API and the nesting doll of calls that had to happen to really find out what we needed about a Calendly meeting with a prospect.  I’m sure that Calendly structures their API the way they do for a reason, but it felt like jumping through a lot of hoops to get where I needed to be.

The first thing that has to be done is looking up the users in our Calendly org.  We’re not a huge company but big enough that Calendly’s 100 results per page on an API call requires pagination.  Not a huge deal, but remember the cool other part here is we are doing this in a Zoho CRM function written in Deluge.  The plot thickens.

A quick step back.  Not saying this is the right way to do this, but at the time having a Calendly webhook hit a Zoho CRM function wasn’t in the cards for a few reasons – mostly because of the business process around the meeting data.  Zoho Flow was going to be fine for that – if a meeting was a certain type, do a certain thing kind of stuff.  If you aren’t familiar with Zoho Flow – it’s basically a drag and drop iPaaS like Workato or Zapier – but built by Zoho and part of their ecosystem.

Zoho Flow didn’t have a great CRM connector built in to get to the function I needed to write to get Calendly Data – so it meant I had to make a Zoho Flow Custom Function that could act as a proxy to the Zoho CRM function.

It was like this.

Calendly Webhook -> Zoho Flow -> Zoho Flow Custom Function -> Zoho CRM Function

A little bit gross.

OK, so back to the first Calendly API call.  I had to do this to get a full list of all of the users at my company with a calendly ID so I could inspect the JSON for an email match to find out a particular user’s Calendly ID for subsequent API calls.  At the time (and I’ve not gone back to check) Calendly did not have an API to search a user by email.

Once I had that, I could take a Google Meeting ID (we use GCal at work but book prospect meetings via Calendly) and that Calendly User ID to get a list of events.  Hoping that a given user wouldn’t have more than 100 events, or I’d have to paginate over the Calendly results again.  Luckily for us most users would have less than a dozen meetings and you can pass in some time parameters if needed so you only look at future events for example.

So now we have a list of scheduled meetings in Calendly for a user and we can match it to a Google Meeting ID.  If we find a match, now it’s time for the next Calendly call.  We need to look up a Calendly Event ID so we can get things about the Invitee to the meeting, cancel/reschedule links, etc.

Finally, it was time to update the Zoho CRM Meetings module.

So it doesn’t seem that bad right?  I think for me the biggest issue was there some basic API calls that were missing from Calendly that would have made this a lot cleaner.  Given an org ID (our company account ID in Calendly) – it would have been nice to just have an API that allowed me to look up the user by email and org ID.

Then it would have been great to have an API to query an event directly based on some key like external event ID.  We can’t be the only company that uses Calendly to book and want it integrated with our GCal.  If that wasn’t possible at least querying a user by email would have eliminated one paging call.

In the end it worked, but it felt like there was unnecessary looping for a few of the calls to get what I wanted.  

If you’d like to know more about the Calendly APIs you’ll likely need a developer account to get to their docs.  You can learn more here:

https://developer.calendly.com

Scroll to Top