Our Bubble plugin lets you:

  • Add, find, update and delete contacts
  • Send events to trigger loops
  • Send transactional email

Install the plugin

Go to the Loops plugin and select your app from the “Install in an application…” dropdown.

Alternatively, go to the Plugins page in your Bubble admin, click “Add plugins” in the top right, and search for “Loops”.

Set up the plugin

To use the plugin you will need to add a Loops API key into Bubble.

First, go to your Loops API settings page and copy an API key. You may need to create a key first.

Then go to the the Plugins page in Bubble, select the Loops plugin and paste your API key into the “API key” field, prepended with the word “Bearer” and a space.

Using the plugin actions

To use the plugin actions in a workflow, select “Plugins” in the menu and you will see the options show up (prefaced with “Loops - ”).

Here’s a simple example of using the Bubble plugin to add all new users to your Loops audience.

After your sign up action, add a new “Loops - Create a contact” action.

In the form, add your user email into the “Email” field and user ID into the “User ID” field.

And that’s it!

Actions

The plugin contains actions that replicate what’s possible with the Loops API.

Create a contact

The Create a contact action will create new contacts in Loops using the email address and user ID that you send from Bubble.

If you want to “create or update” users, use the Update a contact action instead.

You need to provide both email and user ID values, otherwise the underlying API request from Bubble will fail.

API documentation

Find a contact

This action will find a Loops contact based on the provided email address. This can be used to see if one of your user already exists in your Loops audience.

API documentation

Update a contact

This action will update a contact in Loops using the provided user ID.

If a user with the provided ID is not found, a new contact will be created using the data you send.

API documentation

Delete a contact

This action will delete a contact from Loops using the provided user ID.

This is useful for when a user closes their account in your application and therefore you no longer want to email them from Loops.

API documentation

Send an event

The Send an event action can be used to trigger Loops from your application. For example, you may have a welcome loop which sends an email drip campaign to new users.

For the Send an event action, you need to provide an “Event name” value and the user’s ID.

API documentation

Send transactional email

Transactional emails are one-time emails like password resets sent by apps to users based on an action.

To send transactional emails, you will first need to create the email in Loops.

Once you have written the email and added data variables, you can click “Next” to see the example payload for the API.

Note the names of the dataVariables (which you added in the email) as you need these in Bubble.

Once you create the action in Bubble, you will see the three fields in the form.

Here is an example API payload for the Loops API:

{
  "transactionalId": "closfz8ui02yqk10npt9gnw5a",
  "email": "[email protected]",
  "dataVariables": {
    "lastLoggedIn": "20240214T10:01:29Z",
    "plan": "Pro",
  }
}

To get the same effect in Bubble, we need to enter the following into the “Data variables” field:

"lastLoggedIn": "20240214T10:01:29Z", "plan": "Pro"

To add user data into this field, place your cursor and select “Insert dynamic data” (see image above).

API documentation

Was this page helpful?