Do you want to send custom xAPI statements from your Glide App without writing any code? In this tutorial, we’ll create an xAPI-enabled button in a Glide App. Whenever someone selects the button, it will send an xAPI statement to Watershed Learning Record Store (LRS) using a convenient Zapier integration.
This will help you get important data from your Glide Apps into the LRS where the rest of your organization’s learning data lives.
Specifically, we’ll use this functionality to add a “Mark as Attended” button to a conference app — whenever the user selects the “Mark as Attended” button, it will send an xAPI statement with the user’s email address and the details for the session that they attended.
If you want to follow along with this tutorial, then you should open this Glide Apps Conference Template, sign in to your Glide account (if you’re not signed in already), and select the “COPY TEMPLATE” button at the top right of the screen.
When you have the template opened in your own Glide account, we’re ready to continue.
xAPI statements contain three elements: an actor, verb, and object. For example, Devlin attended the Robots 101 conference session. For this tutorial, we’ll identify our actor by their email address, our verb will be “attended,” and our object will be the conference session that the user marks as attended.
However, the plain english version of the verb and object are not enough. To satisfy the xAPI specification, we must include a Verb ID and Object ID, which come in the form of Uniform Resource Identifiers (URIs). These look like URLs, but they do not need to lead to public-facing web pages.
So, the first thing that we need to do is add a new column to the Google Sheet that powers the conference app. This column will hold the object IDs for each conference session.
To open the Google Sheet that drives the app, select the “Edit Sheet” icon that looks like a pen on the left toolbar.
Now right click on the Session column and select “Insert 1 right” to create a new column.
Title this column “Session URI” and create a URI for each session. I used https://www.exampleconference.com as the domain (since we’re only doing this for demo purposes), and I also added the year, “session” (so we know that the object is a conference session), and session name.
Now return to the tab that has the Glide App open and select “No” in the popup that appears.
Next, we need to add the button that people will select to record their attendance at a session.
Select any session from the editor. We’ll select the first one.
Select the blue plus icon in the top right of the screen to add a new component to this view.
Select “Button” to add a button component.
In the panel on the right, change the button’s text to “Mark as Attended.”
Now select “FEATURES” and change the action to “Zapier.” You’ll notice that it tells us we have “No Zaps configured in Zapier,” but it does allow us to add the values that we’ll want to pass.
Add the following values:
This will make the user’s email address, the session URI, and the session’s name available to us in Zapier.
Finally, change the confirm message to “Attendance Recorded.” This is what will appear on the user’s screen when the action is performed successfully
Now that we’ve configured as much as we can in Glide, it’s time to create the Zap in Zapier. Zaps easily get your data from one tool to another without any code. In this case, Zapier will bring our data from Glide to Watershed LRS.
Hover over the black button with the plus icon on the left side of the screen, then select “MAKE A ZAP.”
Enter Glide where it asks you which app you’d like to choose, then select the Glide icon.
When you’re asked to choose a Glide account, select the dropdown, then select the “Add a New Account” option.
It will ask for the Glide App API key. Go back to the tab with your Glide app and select the Settings cog on the left.
Then, on the right-hand side of the screen, select Integrations.
Select the “Copy to Clipboard” button next to “Zapier API key.”
Return to the Zapier pop-up window and paste the API key into the text box. Select the “Yes, Continue” button once you’ve pasted the key.
When you’ve done this successfully, you should see the “Glide Conference connected to Zapier!” message. You can then press the blue “CONTINUE” button.
Enter a name for your Zap under the “Customize Values” heading. This is also a good time to name your Zap in the Zapier interface by selecting the text in the top left of the screen where it says “Name your zap.”
Now that we’ve configured the first part of our Zap, we need to tell Zapier what to do with the data.
In this case, we’re sending the xAPI data to Watershed LRS. Watershed LRS has a native Zapier integration, and they offer a completely free Essentials LRS to hold the data.
Important note: If you use a different LRS, then you can either automatically forward the statements from Watershed LRS to your LRS of choice, or you can try using a "Code by Zapier" action. View this tutorial that I wrote to learn how to send xAPI statements to any LRS with Zapier. For the purposes of this tutorial, I recommend following along with Watershed LRS.
So, in Zapier, choose Watershed LRS as the app, then choose “Send a Statement” as the action.
Once the app and action event are configured, select the blue “CONTINUE” button.
In the dialogue box where it asks for your Watershed LRS account, select “Add a New Account.”
Now we need to get the LRS endpoint, key, and secret from Watershed.
If you do not already have a Watershed Essentials LRS, then go to their Essentials LRS webpage, scroll down, and select “Sign Up Now.” (DO NOT select “Request a demo” in the top right.)
Fill out the form to create your account, and then you’re in!
Next, select “xAPI Data” from the toolbar on the left.
On this page, you’ll see the LRS endpoint that you need. Select “Add Activity Provider” to generate the key and secret.
Copy and paste the Watershed LRS Endpoint, Key, and Secret into the designated spots on the Zapier popup window.
Once you’ve entered your credentials, select the “Yes, Continue” button. Then select the blue “CONTINUE” button in Zapier.
Now you’ll see the “Customize Statement” options. This is where you configure the xAPI statement that you want to send.
The first thing we need to do is set the Actor Email to Val1. This is because, when we were configuring the button in Glide, we set the following values:
Next, set the “Verb” to http://adlnet.gov/expapi/verbs/attended (which we find on the xAPI vocab server) and the Verb Display to attended. We use the “attended” verb to denote that the person attends the session.
After that, set the “Activity Id” to Val2 and the “Activity Name” to Val3.
And there we have it! Scroll down, select the blue “CONTINUE” button, then select “SKIP TEST.”
From there, you’ll see a popup at the bottom that says “Zap is ready - now turn it on!” Select the “OFF” toggle next to that message to turn on the Zap.
Return to Glide App, select Settings, then select Privacy.
Since we need to include the user’s email address with the xAPI statement, we need to require it for login. Change the privacy to “Public with email.”
We are almost done! Navigate to the layout panel so that we can finish setting up the button.
Select one of the sessions to get to the session details page, then, in the layout panel on the right, select the Button at the bottom that we added earlier.
Select “Features” and change the dropdown beneath “Zapier” to whatever you named the Zap that you just created.
Now it’s time to publish the app! Select the blue “Share” button at the top right of the screen, then select “Publish app.”
Copy the app link and paste it in a new tab. Sign into the app with your email address, and enter the code that gets emailed to you.
In the published app, navigate to a session and select the “Mark as Attended” button. Feel free to do this for as many sessions as you’d like.
To view the xAPI statements that these actions generated, return to Watershed LRS and navigate to the “Data Search” tab.
You should see the statement stream that shows who has been attending the sessions.
And that’s a wrap! Whenever someone signs into the app and selects the “Mark as Attended” button, it will send an xAPI statement with their email address and the session they attended.
In this tutorial, we used Zapier and Watershed LRS to send xAPI statements whenever someone selects a button in a Glide App. Using this functionality will help you get data from your Glide Apps into the LRS that holds the rest of your learning data.
If you want to collect other data from your Glide App, such as the global chat or comments, then you can use a Google Sheets to Watershed LRS Zap.
You can also use this “no-code” approach to send xAPI statements from many other apps. I’ll publish an article exploring these other possibilities in the near future.
Finally, if you have questions about how to complete this tutorial, then you should join the ID community. You can also sign up for the mailing list below to receive my latest tutorials directly to your inbox.