Our Clerk integration lets you:

  • Create and update contacts
  • Send events to trigger loops

Our Clerk integration is built on top of our Incoming webhooks feature. This system lets you send webhooks from supported platforms directly to Loops so you can easily sync users and customers as well as send automated emails.

Please read our guide about incoming webhooks

With Clerk, you can keep your user data synced to Loops so you can easily send emails to your userbase.

Synced data

We sync the following Clerk data to your Loops contacts for every incoming event:

  • User ID
  • Email address
  • First name (optional)
  • Last name (optional)

We use the IDs of Clerk users to match contacts in your Loops audience. If the user ID is not found in Loops, we will create a new contact.

Supported events

We accept the following events:

  • user.created
  • user.updated

Clerk webhook docs

If you send other events, they will be ignored.

If you would like to see more events supported, please let us know by sending an email to [email protected]. Please keep in mind only events that contain an email address are able to be processed.

Create a webhook endpoint in Loops

Follow the instructions here to create a new webhook endpoint, which will allow you to send webhook events directly to Loops.

Create a webhook in Clerk

Next, you need to set up webhooks in Clerk.

Inside a project in Clerk, go to Configure -> Webhooks and click + Add Endpoint. Paste in the endpoint URL from Loops, then select the event(s) you want to send (see our supported events above).

Click Create to finish.

The last step is to copy the signing secret into Loops. On the webhook page in Clerk, click the eye icon on the right to show the secret in the page. Copy the secret and paste it into the Signing Secret field in Loops.

Now you’re all set up.

Testing Clerk webhooks

Clerk offers a nice way to test webhooks. Click through to the webhook you created and then the Testing tab.

Select user.created or user.updated from the Send event dropdown, tweak the example data that’s shown, then click Send Example.

This will send real data to your Loops account.

You can also test your webhook by creating and editing users in the Users page in Clerk, or by signing up in your application.

You can see all sent webhooks by going to Webhooks, clicking on the webhook and scrolling down to the Message Attempts section.

On Loops’ end, you will see new contacts appear in your Audience page, and triggered events in the Events page.

Examples

Here are some examples of how you can send data from Stripe to Loops to sync contacts and trigger useful emails to your customers.

Syncing users to Loops

Create or update contacts in your Loops audience when a user is created or updated in Clerk.

  1. Create a new Clerk webhook endpoint in Loops (instructions).
  2. In Clerk, create a new webhook (instructions above) for the user.created and user.updated events and paste in your endpoint’s URL.
  3. In Loops, make sure user.created and user.updated are checked on the Clerk settings page.

Send an email to all new Clerk users

Send an email from Loops when a new user is created in Clerk.

  1. Create a new loop in Loops using our Onboarding drip template.
  2. For the loop trigger, select Event received and enter newClerkUser (or something similar).
  3. Set up your Clerk webhook endpoint in Loops (instructions).
  4. In Clerk, create a new webhook (instructions above) for the user.created event and paste in your endpoint’s URL.
  5. In Loops, make sure user.created is checked, and select the event name you chose in Step 2 from the Trigger an event field.

Enter all new Clerk users into an onboarding email sequence

Send an email from Loops when a new customer is created in Clerk.

  1. Complete Steps 1–5 from “Send an email to all new Clerk users” above.
  2. Add more emails and timers into the loop to complete your email sequence.

Was this page helpful?