All Collections
Integrations
Zapier
Zapier tutorial: Automated download link after purchase
Zapier tutorial: Automated download link after purchase

Learn how to set up automated sending of download links to buyers via Zapier on a digital download marketplace.

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 automating the sending of digital downloads on a Sharetribe marketplace. Specifically, we’ll be creating an automation that automatically sends a download link to a buyer, once a listing they have purchased is bought.

This zap automation works well with its companion zap, which will automatically notify sellers that they need to provide a download link for their listing. You can read about it from this article.

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 do you need for this tutorial?

You will 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.

The free plan with Zapier has a limitation: it's only possible to create single step Zaps. So while you can follow through this tutorial, actually using this Zap requires you to have at least a Starter plan for Zapier, which supports multi-step zaps.

In order for Zapier to be able to draw relevant information from your marketplace, you will need to have some activity there. In this tutorial, we will be setting up a Zap that sends an email to a person who buys such a listing. It is enough that you have at least one recent transaction in your marketplace, so Zapier will be able to find that transaction and the related information from your recent events.

If there haven’t been any recent digital download test transactions on your marketplace, go ahead and do those now. If you want, you can read the section below on details on how to create a digital download listing type. The transaction can be done with just test details, so no real money needs to change hands.

IMPORTANT: After creating the listing and having someone buy it, the transaction needs to be in a state where someone has just bought a listing from the correct listing type (i.e., the one for digital downloads). Nothing should have happened in that transaction after that (for example, writing reviews).

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 listing that has been bought needs to have the download link in its extended data. It is stored in the ‘Private data’ of the listing, in ‘String’ format. With the Extend plan, you can have a developer implement automated ways to collect extended data to listings and user profiles, but you can also enter this data manually in the Console without coding anything. This is explained below.

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.

Creating a digital download listing type

  1. Log in to your Console at https://console.sharetribe.com/

  2. Click on ‘+ Add a new listing type’

  3. Enter a descriptive listing type name, such as “Digital downloads”

  4. Choose a descriptive listing type ID, such as digital-downloads (note that spaces can’t be used here)

  5. Choose ‘Purchase’ as the transaction process

  6. Choose ‘Infinite stock, single item’ as the stock type. This means that an unlimited number of users can buy the download link, one at a time.

  7. Adjust default listing fields as you see fit (for example, you probably want to remove the delivery fee options for pickup and shipping)

  8. Click on the green ‘Save changes’ button at the bottom of the page

Entering a download link in a listing

  1. Log in to your Console at https://console.sharetribe.com/

  2. Navigate to Manage > Listings

  3. Click on the user you want to edit

  4. Find the ‘Private data’ section, and click on ‘Edit’

  5. Click on ‘+ Add new field’ in the ‘Protected data’ section

  6. Write in a unique identifier key (such as ‘Download link’)

  7. Choose ‘String’ as the data type

  8. Enter the download link in the ‘Value’ field that appears after you selected ‘String’ above

  9. Click on the green ‘Save changes’ button at the bottom of the page

Note: Entering the download link currently needs to be done manually. We’re looking to update our Zapier integration so that it also allows the writing of extended data through Zapier in the future, but for now, extended data can only be entered via code customization or manual admin action in Console.​

Creating the customer download link 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 digital download links on Sharetribe here

  3. Click on ‘Try this Zap'

  4. Now, a lot of the work has already been done for you. You can use the steps below to verify that each step is configured correctly.

Step 1: Find a recent transaction 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 ‘Transaction transitioned’ as the ‘Event type’

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

  5. Test the trigger, and make sure it finds a recent transaction event associated with a digital download listing

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

Step 2: Filter the event

  1. We want to only run the zap in a situation where a listing has been bought. For this step, 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. Under the ‘Only continue if…’, select the following 3 entries for the lines:

    1. ‘1. Transaction Last Transition’

    2. (Text) Contains

    3. confirm-payment

  3. Test the filter, and make sure it says “Your Zap would have continued for this test data”

  4. Click ‘Continue’ to move to the next step

Step 3: Retrieve the transaction information

  1. In the “App & event” section of Step 2, select “Show Listing”.

  2. Go to the ‘Action’ section, and click on the Transaction ID’ field

  3. Scroll down the ‘Transaction events’ list and find and choose the option ‘1. Transaction Id’, and close the list

  4. Select ‘Listing’, Provider’, and ‘Customer’ in the ‘Included relationships’ section

  5. Choose ‘No’ in the dropdown ‘Should this step be considered a “success” when nothing is found?’

  6. Click on ‘Continue’ to move to the ‘Test’ section

  7. Click on ‘Test step’ and make sure it finds the listing information, and especially:

    1. Make sure the information includes ‘Listing Public Data Listing Type’, and it refers to your digital download listing type (such as ‘digital-download’)

    2. Make sure the information includes ‘Listing Private Data Download link’, and it includes the download link. Note that if you used a different identifier than “Download link” when entering the private data in the previous section, that affects this step too.

  8. Click ‘Continue’ to move to the next step

Step 4: Filter the events

  1. For this step, 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. Under the ‘Only continue if…’, select the following 3 entries for the lines:

    1. ‘3. Transaction Listing Public Data Listing Type’

    2. (Text) Contains

    3. digital-download

      1. Note that if you are using a different listing type ID, that should be reflected here too

  3. Test the filter, and make sure it says “Your Zap would have continued for this test data”

  4. If this step failed and the zap would not have continued, the most likely reason is that the Listing Type ID was typed incorrectly. Please check the Listing type ID from your Console if needed. If it differs, copy it to the zap (do not change it in the Console, as that can sometimes cause unrelated issues).

  5. Click ‘Continue’ to move to the next step

Step 5: Construct the email message from the available data

  1. In the ‘App & event’’ section, choose whichever email provider you want to use to send the email, such as Gmail

  2. Sign in with your email service provider in the ‘Account’ section, and move to the ‘Action’ section

  3. In the “From” field, choose your email account from the list.

  4. In the ‘To’ field, choose ‘3. Transaction Customer Email: ’ from the drop down field. After that, there should be a faded grey text that shows the actual email involved in the transaction. This is the customer’s email, who receives the download link.

  5. In the ‘Subject’ field, choose an appropriate subject line for the email. This can be for example “Download link for your recent purchase of [3. Transaction Listing Title: ]’. Note that in this case, you will write the text up until the word ‘of’, and after that, you would choose the variable [3. Transaction Listing Title] from the drop down menu. This will then construct the subject line appropriately for each listing, based on their title.

  6. In the Body field, you can now write in the message you want the customer to receive, and include the information that you want. When constructing the message, you will need to select multiple different variables that are placed within the message, and manually enter your own marketplace’s inbox address. The message could be, for example:

Hello there, 

Thanks for buying the listing [3. Transaction Listing Title]! This is an automated email on behalf of the seller, [3. Transaction Provider Profile Display Name]. Here's the link to download the file you bought: [3. Transaction Listing Private Data Download Link]

If you have any questions, please contact the seller on the marketplace directly. Here's a direct link to your inbox where you can access the messages: https://www.example.com/inbox/orders

Note that any replies to this email will not reach the seller, as this email was automatically generated by the marketplace.

Thanks again!

This would translate to something like:

Hello there, 

Thanks for buying the listing Mountain Biking Manual! This is an automated email on behalf of the seller, John. Here's the link to download the file you bought: www.example.com/mountainbikemanual.pdf

If you have any questions, please contact the seller on the marketplace directly. Here's a direct link to your inbox where you can access the messages: https://www.example.com/inbox/orders

Note that any replies to this email will not reach the seller, as this email was automatically generated by the marketplace.

Thanks again!

6. You can leave the other fields empty

7. Go to the ‘Test action’ and test the zap. If everything went well, you should now get an email with the download link to the email inbox associated with the customer’s account!

Final thoughts

Thanks for reading this tutorial about creating a Zap for automated download link sending! Feel free to read through other parts of our Zapier guide as well: the Introduction and the article about Events and Actions.

We also have tutorials and templates for various different Zaps available, including SMS notifications, Mailchimp integration, and more. You can read about all our templates in this article. You can also access other full tutorials directly from these links:

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?