All Collections
Integrations
Zapier
Zapier tutorial: Email notifications for admins for listings pending approval
Zapier tutorial: Email notifications for admins for listings pending approval

Learn how to set up Zapier to send admins notifications about new listings that need to be approved.

Vesa Vahermaa avatar
Written by Vesa Vahermaa
Updated over a week ago

Welcome to a practical Zapier tutorial! In this guide, we’ll go through the process of connecting a Sharetribe marketplace to Gmail via a Zapier automation. Specifically, what we are building here is an automated email message notification that is sent to the administrator(s) of your marketplace whenever a new listing is created that needs to be approved.

This Zap will have two versions: one that works with the free Zapier plan and triggers at the time the first listing draft is created, and another that requires a paid Zapier plan, but only triggers once the listing has been fully created.

If you haven’t gone through the introduction and the action/event article of our Zapier collection, we encourage you to do so to better understand how things work. If you want to dive straight into action either way, feel free to read on!

What is Zapier?

Zapier is a powerful and versatile tool that allows you to integrate different services to one another. You can learn more about Zapier in our introductory article or through this brief video from Zapier.

What is Gmail?

Gmail is one of the email services supported by Zapier, that allows you to automate email sending based on specific events. You can use another email service that Zapier supports if you'd like -- Gmail is just used here as an example as it's a very widely used email service.

What do you need for this tutorial?

You need a Gmail account, which you can create at www.gmail.com. This is the address from which the notifications come from. If you want to use the same email account as you use for the marketplace in general -- as the email address defined in your Console -- you can also use that. In this case, you may be sending an email to yourself (i.e., the sender and recipient addresses are the same), but this does not cause issues as you can send an email via Gmail to yourself, too.

You will also need a Zapier account, which you can sign up for at www.zapier.com. When registering, the process may ask you which Zapier apps you want to use. You can already find and select ‘Sharetribe’ from the list of applications, but you can also add it later.

In order for Zapier to be able to draw relevant information from your marketplace, you will need to have some activity there. It is enough that you have at least one recent listing created on your marketplace, so Zapier will be able to find that event from your recent events. If there haven’t been any recent listings created on your marketplace, go ahead and go do one now.

You’ll also need to create an application using the Integration API. For the purposes of this tutorial, you don’t need to know details about using the APIs, but if you want, you can read about them from our technical documentation here.

Finally, the marketplace needs to be configured so that all new listings require approval from admins. This can be configured in the "General" section of the Console, in the "Listing approval" section.

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

Getting your Integration API key from Sharetribe Console

  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.

    1. Think of the Client ID and secret as a sort of a password to your marketplace that can be used 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.​

Functional differences between the Zaps

As mentioned in the beginning of this article, there are two different versions of this Zap available below. To clarify the need for the difference: the 'listing created' event actually occurs *not* when the listing is fully created, but rather as soon as the provider has filled out the first page ('Details') in the listing creation screen.

At this point in time, a draft of that listing is created, and is visible in the Console, even though not all the listing details have been entered and the listing can't yet be approved by an admin. For instance, the price, delivery/shipping options, and photos have not yet been added to the listing, as those all come after the 'Details' section of the listing creation is finished.

What this means is that the more simple Zap technically already triggers before the listing is really ready for approval. However, in many cases, the listing creators quickly finish creating the listings: maybe even within a minute or two. For this reason, sending the notification prematurely may not matter, as the listing is often created by the time the administrator reacts to the email that is automatically sent by this Zap. Furthermore, it allows you to use the free Zapier plan which is limited to two-step zaps, so it's a great way to save costs.

However, there's a second version of this Zap available below, which parses all the listing events on the marketplace, and only triggers when it notices that the listing is specifically in the state of pending approval. This means that when you receive the notification email, you can rest assured that the listing is available to be approved immediately, and not 1-2 minutes (or more) later. Since this Zap is more complex, it requires at least the Starter plan of Zapier, which supports multi-step Zaps.

You can choose whichever of these Zaps better suits your preferences, of course!

Creating the two-step Zap, step by step

(Optional) Importing a pre-existing Zap

  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 sending an email to admins for new listings here.

  3. Click on ‘Try this Zap'

Step 1: Find a recent listing creation 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 ‘Listing created’ as the ‘Event type’

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

  5. Test the trigger, and make sure it finds a recent listing creation event from your marketplace

  6. Click ‘Continue with the selected record’ to move to the next step

Step 2: Send an email about the new listing

  1. In the ‘Account’ section, Sign in with your Gmail account

  2. Click ‘Continue’ to go to the ‘Action’ section

  3. In the ‘To’ address, choose the email address you want to send the notification to. You can add multiple addresses, also as CC, if you want multiple addresses to receive the notifications.

  4. (Optional) Add a "From Name" that shows up as the sender name, for example your marketplace's name

  5. In the ‘Subject’ field, write the desired subject. You can also use details from the listing itself, if you want the message title to give more information. For example, you can write "New listing: " and then choose "[1. Listing Title]" from the drop down list that appears. This way, each message includes the new listing's title in it.

  6. In the ‘Body’ field, you can write whatever you wish, and also include a direct link to your marketplace's listing section for convenience. For example:

“A listing called "[1. Listing title]" was just created on Biketribe. The listing needs to be approved before it is displayed on the marketplace. Go to Biketribe at https://console.sharetribe.com/a/listings to view and approve or decline the listing. 

The description of the listing is as follows: [1. Listing Description]”

This would translate to something like:

“A listing called "Mountain bike" was just created on Biketribe. The listing needs to be approved before it is displayed on the marketplace. Go to Biketribe at https://console.sharetribe.com/a/listings to view and approve or decline the listing.

The description of the listing is as follows: A used mountain bike in very good condition, made by Canyon. Used for two years, only during the summers. The price is non-negotiable, but I can deliver the bike for free if you live within a 30 minutes drive from where I live.”

6. Unless you have a reason not to, you can leave all other fields empty.

7. Go to the ‘Test action’ and test the zap. If everything went well, you should now get an email to your inbox that has the listing title, its description, and a direct link to the right Console page that allows you to review and approve or reject the listing.

Creating the multi-step Zap, step by step

(Optional) Importing a pre-existing Zap

  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 sending an email to admins for new listings here.

  3. Click on ‘Try this Zap'

Step 1: Find a recent listing update 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 ‘Listing 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 listing creation event from your marketplace. Choose the latest one.

  6. When you open the listing details, there is a variable called 'Listing State'. Make sure to find it, and that it says 'pendingApproval'. This signals that the listing creation wizard has been finished, and the listing is now waiting for approval.

  7. If the 'Listing State' variable does not contain 'pendingApproval', look at any other events that the test found. If none of them are in this state, go to your marketplace and create a new test listing. Make sure that in the Console, it appears as 'Pending approval'.

  8. After finding a listing update event in 'pendingApproval' state, click ‘Continue with the selected record’ to move to the next step

Step 2: Filter information by Listing State

  1. Add a new step, and choose 'Filter' from underneath the 'Built-in tools' heading. You can also search for it, and it appears as 'Filter by Zapier'.

  2. In the top field of 'Only continue if..', choose '1. Listing state' from the drop-down menu.

  3. In the second field, choose '(Text) Contains'

  4. In the third field, write in 'pendingApproval'

  5. Test the step by clicking 'Continue'

  6. Make sure the test completes successfully -- this is signalled by a green checkbox and the text 'Your Zap would have continue for this test data', and move to the next step

Step 3: Send an email about the new listing

  1. Add a new step, and choose 'Gmail' (or any email service you want to use)

  2. In the ‘Account’ section, Sign in with your Gmail account

  3. Click ‘Continue’ to go to the ‘Action’ section

  4. In the ‘To’ address, choose the email address you want to send the notification to. You can add multiple addresses, also as CC, if you want multiple addresses to receive the notifications.

  5. (Optional) Add a "From Name" that shows up as the sender name, for example your marketplace's name

  6. In the ‘Subject’ field, write the desired subject. You can also use details from the listing itself, if you want the message title to give more information. For example, you can write "New listing: " and then choose "[1. Listing Title]" from the drop down list that appears. This way, each message includes the new listing's title in it.

  7. In the ‘Body’ field, you can write whatever you wish, and also include a direct link to your marketplace's listing section for convenience. For example you could write in:

“A listing called "[1. Listing title]" was just created on Biketribe. The listing needs to be approved before it is displayed on the marketplace. Go to Biketribe at https://console.sharetribe.com/a/listings to view and approve or decline the listing. 

The description of the listing is as follows: [1. Listing Description]”

Note that you need to select any variables (such as [1. Listing title]) from the drop down menu when writing the message, so you can't just copy-paste them from above. When done correctly, this would translate to something like:

“A listing called "Mountain bike" was just created on Biketribe. The listing needs to be approved before it is displayed on the marketplace. Go to Biketribe at https://console.sharetribe.com/a/listings to view and approve or decline the listing.

The description of the listing is as follows: A used mountain bike in very good condition, made by Canyon. Used for two years, only during the summers. The price is non-negotiable, but I can deliver the bike for free if you live within a 30 minutes drive from where I live.”

6. Unless you have a reason not to, you can leave all other fields empty.

7. Go to the ‘Test action’ and test the zap. If everything went well, you should now get an email to your inbox that has the listing title, its description, and a direct link to the right Console page that allows you to review and approve or reject the listing.

Final thoughts

Thanks for reading this tutorial about creating a Zap for your Sharetribe marketplace to send email notifications for listings that are pending approval! Feel free to read through other parts of our Zapier guide as well: the Introduction and the article about Events and Actions. Also, there are the following Zapier/Sharetribe tutorials available:

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?