Please see the full REST API documentation for API implementation details.

An Integration Example (Zapier)

Connect Your Apps and Automate Workflows. Easy automation for busy people. Zapier moves info between your web apps automatically, so you can focus on your most important work.

The Lucid Meetings integration with Zapier is a good example because it uses a variety of the supported REST API features. This is not a full description of the Lucid Meetings Zapier integration, but it does show how to use the REST API to accomplish several things.


Polling API Endpoints for Changes

#

A polling trigger is the least efficient, but simplest way for Zapier to ask if anything new has happened in Lucid Meetings. At regular, timed intervals, Zapier will run specific queries against the REST API.

For polling trigger purposes, the Zapier integration platform requires resource endpoints that deliver collections with unique id fields, sorted in reverse chronological order of creation.

Meetings and Action Items in a Room

Here's how to create a polling-ready list of newly scheduled meetings (in a room) using the timeframe, state, and embed query parameters to deliver the correct meetings, with a reasonable set of data fields. The text_outline embed will supply a text formatted agenda outline. Note that the default sort order for all Lucid Meetings API collections is reverse chronological order of creation (-create_ts).

Recently scheduled meetings:
Zapier GET: /lucid/api/v1/rooms/{{room_id}}/meetings?timeframe=scheduled&state=pending&embed=text_outline

Here's how to create a polling-ready list of newly created meeting sessions for running meetings using the state and sort query parameters. Note that we need to return the meeting list ordered by the state_ts because we want to capture the timestamp of the state change from pending to started. That is, we are creating a start event.

Recently started meeting sessions:
Zapier GET: /lucid/api/v1/rooms/{{room_id}}/meetings?state=started&sort=-state_ts

And finally, here's how to create a polling-ready list of newly ended online meeting sessions using the state and sort query parameters. The text_view embed will supply a text formatted meeting record. Again, note that we need to return the meeting list ordered by the state_ts instead of the create_ts to capture the timestamp of the meeting session's ending event.

Recently ended meeting sessions:
Zapier GET: /lucid/api/v1/rooms/{{room_id}}/meetings?state=ended&sort=-state_ts&embed=text_view

Action Items always exist in a room context, even if they are created within a specific meeting (which always occurs in a room). Here's a super easy way to create a polling-ready list of new, open Action Items (in a room) using the default query for room Action Items.

Recently created Action Items:
Zapier GET: /lucid/api/v1/rooms/{{room_id}}/action_items

My Personal Meetings and Action Items

Here's how to create the polling-ready lists for my personal meetings (any meetings I've been invited to attend, in any room). These queries use a different endpoint (/meetings), but the same query parameters as the room-based query above.

Recently scheduled meetings:
Zapier GET: /lucid/api/v1/meetings?timeframe=scheduled&state=pending&embed=text_outline

Recently started meeting sessions:
Zapier GET: /lucid/api/v1/meetings?state=started&sort=-state_ts

Recently ended meeting sessions:
Zapier GET: /lucid/api/v1/meetings?state=ended&sort=-state_ts&embed=text_view

Here's how to create a polling-ready list of open Action Items assigned to me. This query needs one parameter (state) to restrict the list to show only open action items. The endpoint used here (/action_items) returns only those items assigned to the API caller.

Recently created Action Items:
Zapier GET: /lucid/api/v1/action_items?state=open

Subscribing to Notification REST Hooks

#

Zapier also supports REST Hooks in addition to polling triggers. The REST hook idea is pretty straightforward — configure a dynamic callback for specific events in Lucid Meetings. So, rather than polling, the Zapier setup can specify notifications they would like to receive and Lucid Meetings will perform an asynchronous callback when they occur. This is much more efficient than timed interval polling.

The Lucid Meetings REST Hooks implementation matches up very closely with the Zapier recommendation for Notification REST Hooks. The required fields for both Zapier and Lucid Meetings hooks are target_url and event .

Create a new hook in Lucid Meetings:

POST /lucid/api/v1/hooks
Content-Type: application/json
{
  "event" : "meeting_scheduled",
  "target_url" : "https:\/\/zapier.com\/hooks\/standard\/286082\/e139ef7fb5174f42953716e966621fc0\/",
  "room_id" : 74
}

Zapier Trigger Settings

The Zapier interface requires a small bit of setup to identify where the subscribe and unsubscribe URLs live in Lucid Meetings. In the examples below, the subdomain token identifies the Lucid Meetings installation and the webhook_id token is the resource identifier for the hook created in Lucid Meetings.

REST Hook Subscribe URL
https://{{subdomain}}.lucidmeetings.com/lucid/api/v1/hooks

REST Hook Unsubscribe URL
https://{{subdomain}}.lucidmeetings.com/lucid/api/v1/hooks/{{webhook_id}}

Zapier Scripting to Support Subscriptions

Most Lucid Meetings events require additional context, such as the organization or room for the event (e.g., meeting_scheduled in a specific room_id). For these events we need Zapier to send us this information as part of the subscription process. This additional data can be added via the Zapier scripting feature (see below).

We also need to add some support to help Zapier store information needed for removing subscriptions via the REST API. Specifically, we need to store the resource id for the hook in a webhook_id Zapier variable. This is also shown in the code below.

"use strict";

var Zap = {
    pre_subscribe: function(bundle) {
        bundle.request.method = 'POST';
        var data = JSON.parse(bundle.request.data);
        data.room_id = bundle.trigger_fields.room_id;
        bundle.request.data = JSON.stringify(data);
        return bundle.request;
    },
    post_subscribe: function(bundle) {
        var data = JSON.parse(bundle.response.content);
        return {webhook_id: data.id};
    },
    pre_unsubscribe: function(bundle) {
        bundle.request.method = 'DELETE';
        bundle.request.data = null;
        return bundle.request;
    },
    new_meeting_post_poll: function(bundle) {
        var key = bundle.request.headers['X-API-Key'];
        var records = JSON.parse(bundle.response.content);
        return _.map(records, function(record) {
          record.docx_file = z.dehydrateFile(record.resource_url + '?format=docx', { 
            headers: { 'X-API-Key' : key }
          });
          return record;
        });
    },
    new_meeting_post_hook: function(bundle) {
        var key = bundle.request.headers['X-API-Key'];
        var content = JSON.parse(bundle.response.content);
        content.docx_file = z.dehydrateFile(content.resource_url + '?format=docx', { 
          headers: { 'X-API-Key' : key }
        });
        return [ content ];
    },
    ...
 };

Creating Entities in Lucid Meetings

#

In Zapier, actions are the mechanism for creating new entities in Lucid Meetings. For example, when a calendar event is added to a Google calendar, create a corresponding meeting in Lucid Meetings. The processes for creating new meetings and new Action Items are very clear and simple.

Creating a Meeting in a Room

Zapier POST: /lucid/api/v1/rooms/{{room_id}}/meetings
{
  "duration_seconds": 1800,
  "start_time": "2015-09-21T19:00:00Z",
  "name": "Briefing meeting",
  "description": "Update the management team with status info"
}

Creating an Action Item in a Room

Zapier POST: /lucid/api/v1/rooms/{{room_id}}/action_items
{
  "description": "<p>Buy coffee for the team</p>"
}

Retrieving Dynamic Lists from Lucid Meetings User Data

#

A dynamic select list is just a fancy way of saying "create a select list from live data so people don't have to hardcode numbers." Example of dynamic select lists in Lucid Meetings could include the organizations a person can see, the rooms in an organization, the templates available in a room, the roles a person can have in an organization, room, or meeting, etc.

For room-based triggers we need to specify the room_id in the REST API query. The room_id we use should be scoped within a specific organization. Here is how to retrieve a list of organizations for use in a Zapier dynamic select list.

Zapier GET: /lucid/api/v1/organizations?fields=organization_id,name

Once we have a selected organization, we can find the list of rooms in that organization. Here is how to retrieve a list of rooms for use in a Zapier dynamic select list. The organization_id token in the room list query obtains its value from the organization dynamic select list.

Zapier GET: /lucid/api/v1/organizations/{{organization_id}}/rooms?fields=room_id,name

Once we have a room we can ask for the available meeting templates in that room. We might want the specify a template when creating a meeting as the action for a given trigger. Here is how to retrieve a list of room templates for use in a Zapier dynamic select list. The room_id token in the template list query obtains its value from the room's dynamic select list.

Zapier GET: /lucid/api/v1/rooms/{{room_id}}/templates?fields=template_id,name