Skip to main content
All CollectionsIntegrationsZapier
Zapier tutorial: Limit access to your marketplace based on user's email domain
Zapier tutorial: Limit access to your marketplace based on user's email domain

How to use Zapier to limit your marketplace to users that register with a specific email address

Vesa Vahermaa avatar
Written by Vesa Vahermaa
Updated yesterday

Welcome to a practical Zapier tutorial! In this guide, we'll guide you through limiting your marketplace access to only specific email addresses or domains.

This functionality can be used for a purpose such as making a marketplace only available for users with an .edu email address, or some other similar limitation, such as the ability to initiate transactions or create listings being reserved.

About Zapier

Zapier is a powerful and versatile tool for integrating different tools into your marketplace. You can learn more about Zapier in our introductory article or through this brief video from Zapier.

If you haven’t read the introduction and the action/event Zapier articles, we encourage you to do so to better understand how Zapier works. But if you want to dive straight into action, feel free to read on!

What you need for this tutorial

External accounts

  1. Zapier Account

    • Create a Zapier account if you don’t already have one. You can sign up at www.zapier.com.

    • During registration, Zapier may ask which apps you plan to use. You can enter Sharetribe at this point or add it later.

How to set up your marketplace

Your marketplace must be configured in a certain way to support this Zap. Here is how you should set things up:

  1. Limit access control

  2. Marketplace Activity

    • Your Sharetribe marketplace (test or live) should have at least one user in a pending approval state (or any other relevant access control state), from the kind of email address you want to approve, so that Zapier can perform the actions and test whether they work. If you don’t have any recent users, sign up as one to ensure there’s data for Zapier to process.

  3. Email notifications

    • You likely want to make sure your users are notified when their account is approved. You can do this from the 'Email notifications' section of your Console. From there, you can check if the 'User approved' email notification is enabled, and enable/disable it if needed. You can read more about email notifications in Sharetribe from this article.

Note that if you for example want to allow only .edu addresses, but you yourself don’t have one, you can test this process with a different email address structure and later change it to .edu (or whichever you prefer).

With these pieces in place, let's get started!

Getting your Integration API key from Console

You'll need Integration API keys to connect your Sharetribe marketplace to Zapier.

  1. Click on "+ Add a new application".

  2. Give the application a descriptive name (like Zapier), and select "Integration API".

  3. Click "Add application".

  4. Important: Copy and paste the Client ID and Client secret to a safe place, like a password manager.

IMPORTANT: Think of the Client ID and Secret as a sort of a password to your marketplace that can be used to access your marketplace data through other services. Note that you won’t be able to ever see the Client secret to this application again in the Console under any circumstances. Make sure you copy it to a secure place. If you lose it, you will need to create a new application.

Creating the Zap, step by step

(Optional) Importing the Zap template

  1. Go to www.zapier.com and log in with your account (or create a free one if you don't already have one).

  2. Open the pre-made Zap for approving users based on email here.

  3. Click on "Try this Zap."

Step 1: Find the recently updated user from your marketplace

  1. Connect your Sharetribe account by entering your Client ID and Client secret

  2. Click ‘Continue’ to move to the ‘Trigger’ section

  3. Choose ‘User updated’ as the ‘Event type’

  4. Click ‘Continue’ to move to the ‘Test’ section

  5. Test the trigger, and make sure it finds a recent user updating event with the right email. If you find multiple events, make sure you choose the right one that you created for this test.

Step 2: Filter the event by email and account status

There is no need to continue this zap in case the user account is already approved, if the user's email is not verified, or the email address does not contain the required part (e.g., ".edu"). So we use a filter step to make sure these conditions are fulfilled.

  1. Choose ‘Filter’ as the app from the ‘Built-in tools’ list by Zapier. You can select it from the on-screen list if you see it, or search for it – in search results, it appears as ‘Filter by Zapier’.

  2. In the "Configure & test" section, select the following 3 entries for the first:

    1. 1.User State (select this dynamically with the plus + sign)

    2. (Text) Exactly matches

    3. pendingApproval

  3. Click "+ And" and add another filter with the following 3 entries:

    1. 1. User Email (select this dynamically with the plus + sign)

    2. (Text) Ends with

    3. .edu

  4. Click "+ And" and add yet another filter with the following 3 entries

    1. 1. User Email Verified (select this dynamically with the plus + sign)

    2. (Text) Exactly matches

    3. true

  5. Test the filter, and make sure it says "Your Zap would have continued for this test data" (assuming you have not yet verified the user account, and it fills the other conditions).

Tip: As mentioned earlier, you can test this step with a different type of filter, such as gmail.com, if you registered your test account with a different kind of email. Just make sure to change the filter text to the right one (such as .edu) later on after publishing the zap.

Step 3: Approve user (or any other access control step of your choice)

Once the Zap is triggered by the correct email address and the account hasn’t been verified yet, the next step is to approve the corresponding user in Sharetribe.

  1. In the Setup section, select Sharetribe as the app.

  2. Select "Approve user" as the Action event.

    1. You can also choose "Update permissions" here if you want to grant specific user rights to this account

  3. Connect your Sharetribe account.

    • Click Continue to move to the Configure section.

  4. Select "1. User ID: XXXX" from the dynamic list as the User ID.

  5. Select "False" in "Expand the response to return the full resource?"

    • Click Continue to move to the "Test" section.

  6. Test this action to confirm that Zapier approves the user on your marketplace.

  7. If you have enabled the relevant email notifications in your Console, and the test user wasn’t previously approved, they’ll automatically receive an email notification confirming their approval to join the marketplace.

Bonus: Possible variations of this zap

This Zap is built with the assumption that you have restricted general access to the marketplace (i.e., account approval), but it can be easily modified to fit different use cases: for example, granting rights to view listings, post listings, or do transactions.

Final thoughts

Thanks for reading this tutorial about creating a Zap for limiting access to your marketplace based on email address!

Please get in touch with us from your Console or from the bottom right section of this page from the chat widget if you have any questions about this guide, or anything else. We'll be happy to help!

Did this answer your question?