# Tutorials

## Table of contents

| Scenario                                                               |
| ---------------------------------------------------------------------- |
| [Example 1: New Participant Reward](#example-1-new-participant-reward) |
| [Example 2: New Participant](#example-2-new-participant)               |
| [Example 3: Campaign Ended](#example-3-campaign-ended)                 |
| [Example 4: Trigger Referral](#example-4-trigger-referral)             |

## Example 1: New Participant Reward

In this example, we'll connect GrowSurf to Google Sheets, which will let us add a new row when a participant reaches a referral goal and unlocks a reward.

### [Step 1: Get access to GrowSurf on Make](https://docs.growsurf.com/integrations/integromat/..#getting-started)

Click on the link above to view how to get access to GrowSurf on Make.

Once logged into Make, click the clear **Create a new scenario** button.

### Step 2: Choose the services you want to integrate

In the search field, type G*rowsurf* and select **GrowSurf**. Then clear out the search field. Type *Google Sheets* and select **Google Sheets**.

Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8C9IbwX9FSD0P68do%2FScreen%20Shot%202020-09-13%20at%203.42.14%20PM.png?alt=media\&token=2310be25-f139-4a06-ba50-b1e3c90e0bb6)

Click the top-right **Continue** button to continue.

### Step 3: Set up the trigger

Click the **GrowSurf** module icon. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8EHpcp-v1txTpElqa%2FScreen%20Shot%202020-09-13%20at%203.51.51%20PM.png?alt=media\&token=812872ae-c151-4ae4-9ef4-6bd00511c0e9)

Select the **Watch New Participant Reward** option. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8GfLCH9OrMS4gNPiY%2FScreen%20Shot%202020-09-13%20at%204.02.17%20PM.png?alt=media\&token=f518ac7f-a96a-425f-a3da-732bef22ab41)

Click the **Add** button. Then in the new popup element, click the **Add** button. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8HG7GCJerDb36M1sg%2FScreen%20Shot%202020-09-13%20at%204.04.44%20PM.png?alt=media\&token=b68da0b4-6c9b-40ae-b77c-75ed29e24e2a)

Then go to <https://growsurf.com/settings#api-keys> to grab your GrowSurf API key.

Return to Make and paste the API key value into the **API Key** input field. Once pasted, click the **Continue**, **Save**, and **OK** buttons, respectively.

You've now successfully set up the Make scenario to trigger on a new GrowSurf participant reward. Now it's time to create the action of adding a new Google Sheet row.

### Step 3.5: Set up a filter

Before moving on, it's important to know if you need to use an Make filter. See the two questions below, and please follow the instructions if you answer 'yes'. Otherwise, if you answer 'no' to both these questions, you can skip this step entirely, and move onto [*Step 4: Set up the action(s)*](#step-4-set-up-the-action-s).

#### **Question 1: Is there are least one double-sided reward for your campaign?**

If you have at least one double-sided reward, then you will need to create two actions because two Make trigger events will happen for both referrer and referee. Here's how you can discern between the two by using a filter and the `Reward: Is Referrer` property:

* **Step A:** Within Make, click the wrench icon to add a filter ([see screenshot](https://gblobscdn.gitbook.com/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8Z1fu3ZWvt1XsZKlX%2F-MH8ZdlSzjr8mMUO_LhK%2FScreen%20Shot%202020-09-13%20at%205.25.02%20PM.png))
* **Step B:** Add a descriptive label (e.g, "*Is this reward for the referrer?")*
* **Step C:** Set the *Condition* field to `Reward: Is Referrer`
* **Step D:** Set the `Equal to` field to `true` or `false`, depending on what you are trying to achieve. Referrers will have `Reward Is Referrer` as `true` ([see screenshot](https://gblobscdn.gitbook.com/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8ZfJBQryyc7657mEO%2F-MH8aIeEUYvMRwfQuyhv%2FScreen%20Shot%202020-09-13%20at%205.32.26%20PM.png))&#x20;
* **Step E:** Click **OK** and save your changes

**Question 2: Is manual reward approval enabled for your campaign?**

If you have manual reward approval enabled, then two trigger events will happen: (1) when the reward is pending approval and (2) when the reward is approve&#x64;**.** Here's how you can discern between unapproved/approved rewards, by using a Make filter and the `Reward: Approved` property.

* **Step A:** Within Make, click the wrench icon to add a filter ([see screenshot](https://gblobscdn.gitbook.com/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8Z1fu3ZWvt1XsZKlX%2F-MH8ZdlSzjr8mMUO_LhK%2FScreen%20Shot%202020-09-13%20at%205.25.02%20PM.png))
* **Step B:** Add a descriptive label (e.g, "*Is this reward already approved?")*
* **Step C:** Set the *Condition* field to `Reward: Approved`
* **Step D:** Set the last field to `true` or `false`, depending on what you are trying to achieve. Approved rewards will have `Reward: Approved` as `true` ([see screenshot](https://gblobscdn.gitbook.com/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8ZfJBQryyc7657mEO%2F-MH8e11xDQ94iFROxron%2FScreen%20Shot%202020-09-13%20at%205.40.51%20PM.png))
* **Step E:** Click **OK** and save your changes

### Step 4: Set up the action(s)

Click the **Add another module** button that appears when you hover over the right-side of the GrowSurf module. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8KOm9nXES2Kt_YROC%2FScreen%20Shot%202020-09-13%20at%204.18.38%20PM.png?alt=media\&token=8d3a3918-4b04-410f-9b80-8527af57cc3a)

Click the **Google Sheets** module, then select the **Add a Row** action. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8KrRFlurJxTNwvJqe%2FScreen%20Shot%202020-09-13%20at%204.20.33%20PM.png?alt=media\&token=6b730b8e-def1-43e8-b13e-c88b6fe20362)

In the new popup element, click the **Add** button. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8L3tAO4YVwVhWQLeB%2FScreen%20Shot%202020-09-13%20at%204.21.27%20PM.png?alt=media\&token=b23c1b2f-97c5-46f6-813c-ffa3a8c36e1b)

Click the **Continue** button and authenticate with Google. Once you are authenticated, your screen should look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8LXOfA4YIYkTz7pLo%2FScreen%20Shot%202020-09-13%20at%204.23.33%20PM.png?alt=media\&token=3c0b600a-471a-4359-8ac5-3784d9ddf75b)

Then choose the *Spreadsheet* and *Sheet*, respectively. Once those values have been selected, set the*Values* per each column that you want to sync GrowSurf participant reward data with.

You've now successfully set up the Make action. Make sure to click the *Save* icon to save your changes.

{% hint style="info" %}
**Need multiple actions?**

You can add additional modules to create multiple action steps in your Make scenario. For example, with the above scenario you add a new row to a Google Sheet. You could chain an additional action, like 'get a notification in Slack', within the same scenario.
{% endhint %}

### Step 5: Add the Make webhook to your GrowSurf campaign

Open up the GrowSurf module within Make. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8QA80aV8hLLtiJTun%2F-MH8T4O1g8zWwJbb48Z6%2FScreen%20Shot%202020-09-13%20at%204.56.29%20PM.png?alt=media\&token=e4dbe6b4-a5ec-46d7-a395-e65cbcab3d0c)

Copy the Make webhook URL to your clipboard, then open up your GrowSurf campaign in *Campaign Editor > 4. Options > Integrations,* open the *Webhooks* integration card, then paste the webhook URL into the input field. Save your campaign changes.&#x20;

In the *Webhooks* integration card, click the **Test** button, then in the new popup window select *New Participant Reward* for the *Webhook Event.* Keep the GrowSurf campaign editor open (we will return to this in a moment).

#### Test and Publish the Make scenario

To make sure that the scenario is working as intended, return to Make and click the bottom-left **Run Once** button. Then return to the GrowSurf campaign editor and click the **Send** button to send webhook test data. Make should successfully accept the test data, and you should see a new Google Sheet row added.

Activate the Make scenario by clicking the bottom-left *Scheduling* toggle. When the popup element appears, keep *Immediately* selected for the **Run scenario** dropdown field value, then click **Activate**.

Your Make scenario is now live and will add a new Google Sheet row whenever a GrowSurf participant reaches a referral goal and unlocks a reward.

## Example 2: New Participant

In this example, we'll connect GrowSurf to HubSpot. Whenever a new participant is added to your GrowSurf referral campaign, we'll add/update them as a HubSpot contact.

### [Step 1: Get access to GrowSurf on Make](https://docs.growsurf.com/integrations/integromat/..#getting-started)

Click on the link above to view how to get access to GrowSurf on Make.

Once logged into Make, click the clear **Create a new scenario** button.

### Step 2: Choose the services you want to integrate

In the search field, type G*rowsurf* and select **GrowSurf**. Then clear out the search field. Type *HubSpot CRM* and select **HubSpot CRM**.

Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8ejTupuBh3U0mMY9X%2F-MH8f-cA9KyvRWcIbHdM%2FScreen%20Shot%202020-09-13%20at%205.53.01%20PM.png?alt=media\&token=70e377c5-103a-409a-84c8-1d2f30719c43)

Click the top-right **Continue** button to continue.

### Step 3: Set up the trigger

Click the **GrowSurf** module icon. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH7tFU6Enkbh026JsV6%2F-MH8EHpcp-v1txTpElqa%2FScreen%20Shot%202020-09-13%20at%203.51.51%20PM.png?alt=media\&token=812872ae-c151-4ae4-9ef4-6bd00511c0e9)

Select the **Watch New Participant** option. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8f2zQ7ff6EbI2GVSk%2F-MH8fTKvyXeYXythAcJA%2FScreen%20Shot%202020-09-13%20at%205.54.50%20PM.png?alt=media\&token=7e0c6b64-49a2-492d-9546-ac5fe2a6011d)

Click the **Add** button. Then in the new popup element, click the **Add** button. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8f2zQ7ff6EbI2GVSk%2F-MH8gH0oOL07PoBIO7b_%2FScreen%20Shot%202020-09-13%20at%205.58.31%20PM.png?alt=media\&token=f0e834e3-54fc-42ab-877c-c00a40d16db9)

Then go to <https://growsurf.com/settings#api-keys> to grab your GrowSurf API key.

Return to Make and paste the API key value into the **API Key** input field. Once pasted, click the **Continue**, **Save**, and **OK** buttons, respectively.

You've now successfully set up the Make scenario to trigger on a new GrowSurf participant. Now it's time to create the action of adding/updating the new GrowSurf participant.

### Step 4: Set up the action(s)

Click the **Add another module** button that appears when you hover over the right-side of the GrowSurf module. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8h29VvK7DmrNYRdK_%2F-MH8hAmynFWgnTXE1J5W%2FScreen%20Shot%202020-09-13%20at%206.02.27%20PM.png?alt=media\&token=d0019348-d3e0-45f2-a70f-06ae4e918ae6)

Click the **HubSpot CRM** module, then select the **Create/Update a Contact** action. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8h29VvK7DmrNYRdK_%2F-MH8hPXho6PFxXMoU1pF%2FScreen%20Shot%202020-09-13%20at%206.03.27%20PM.png?alt=media\&token=d0782c6f-4936-43cc-b1f2-f6596d2f3dc3)

In the new popup element, click the **Add** button. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8h29VvK7DmrNYRdK_%2F-MH8hWhZ5nd8ge_ZD2Ua%2FScreen%20Shot%202020-09-13%20at%206.04.02%20PM.png?alt=media\&token=bd44aa4c-f68d-4bd8-b3f2-3cdd4299f557)

Click the **Continue** button and authenticate with HubSpot. Once you are authenticated, your screen should look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8h29VvK7DmrNYRdK_%2F-MH8iBdGH_owZecNJylP%2FScreen%20Shot%202020-09-13%20at%206.06.50%20PM.png?alt=media\&token=9ea28dbf-95a7-4c24-a51b-f66684f9b817)

Set contact property fields that you want to sync GrowSurf participant data with.

You've now successfully set up the Make action. Make sure to click the *Save* icon to save your changes.

{% hint style="info" %}
**Need multiple actions?**

You can add additional modules to create multiple action steps in your Make scenario. For example, with the above scenario you added/updated a HubSpot contact. You could chain an additional action, like 'get a notification in Slack', within the same scenario.
{% endhint %}

### Step 5: Add the Make webhook to your GrowSurf campaign

Open up the GrowSurf module within Make. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8h29VvK7DmrNYRdK_%2F-MH8imqcW9jUpT7rZEtp%2FScreen%20Shot%202020-09-13%20at%206.09.26%20PM.png?alt=media\&token=de8e7b47-1a08-4514-99ab-201c5686d982)

Copy the Make webhook URL to your clipboard, then open up your GrowSurf campaign in *Campaign Editor > 4. Options > Integrations,* open the *Webhooks* integration card, then paste the webhook URL into the input field. Save your campaign changes.&#x20;

In the *Webhooks* integration card, click the **Test** button, then in the new popup window select *New Participant* for the *Webhook Event.* Keep the GrowSurf campaign editor open (we will return to this in a moment).

#### Test and Publish the Make scenario

To make sure that the scenario is working as intended, return to Make and click the bottom-left **Run Once** button. Then return to the GrowSurf campaign editor and click the **Send** button to send webhook test data. Make should successfully accept the test data, and you should see the HubSpot contact updated or added.

Activate the Make scenario by clicking the bottom-left *Scheduling* toggle. When the popup element appears, keep *Immediately* selected for the **Run scenario** dropdown field value, then click **Activate**.

Your Make scenario is now live and will create/update new HubSpot contacts whenever a new GrowSurf participant is added.

## Example 3: Campaign Ended

In this example, we'll email the results of the referral campaign to your company CEO when the GrowSurf campaign ends.

### [Step 1: Get access to GrowSurf on Make](https://docs.growsurf.com/integrations/integromat/..#getting-started)

Click on the link above to view how to get access to GrowSurf on Make.

Once logged into Make, click the clear **Create a new scenario** button.

### Step 2: Choose the services you want to integrate

In the search field, type *Email* and select **Email**. Then clear out the search field. Type *GrowSurf* and select **GrowSurf**.

Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9Nob9oN3k6VUR1DwB%2FScreen%20Shot%202020-09-13%20at%209.12.22%20PM.png?alt=media\&token=47223ff6-d04e-4555-90a7-e94560b1c97a)

Click the top-right **Continue** button to continue.

### Step 3: Set up the trigger

Click the **GrowSurf** module icon. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9NvgU1l8MurJgJpi_%2FScreen%20Shot%202020-09-13%20at%209.13.35%20PM.png?alt=media\&token=ee5cad48-e08b-43df-bfb4-eec4437b3dd0)

Select the **Watch Campaign Ended** option. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH8f2zQ7ff6EbI2GVSk%2F-MH8fTKvyXeYXythAcJA%2FScreen%20Shot%202020-09-13%20at%205.54.50%20PM.png?alt=media\&token=7e0c6b64-49a2-492d-9546-ac5fe2a6011d)

Click the **Add** button. Then in the new popup element, click the **Add** button. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9O5S96Sbmn3skdr79%2FScreen%20Shot%202020-09-13%20at%209.14.24%20PM.png?alt=media\&token=8ed9ea5d-fbe3-4696-aa0f-15ce24b94c5f)

Then go to <https://growsurf.com/settings#api-keys> to grab your GrowSurf API key.

Return to Make and paste the API key value into the **API Key** input field. Once pasted, click the **Continue**, **Save**, and **OK** buttons, respectively.

You've now successfully set up the Make scenario to trigger when your GrowSurf campaign ends. Now it's time to create the action of sending out an email.

### Step 4: Set up the action(s)

Click the **Add another module** button that appears when you hover over the right-side of the GrowSurf module. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9OZz1Vqt7ya4qzi7t%2FScreen%20Shot%202020-09-13%20at%209.16.26%20PM.png?alt=media\&token=c017e484-e353-4248-b33c-6a9058407454)

Click the **Email** module, then select the **Send an Email** action. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9OheEr-_Gsx_AwlFR%2FScreen%20Shot%202020-09-13%20at%209.17.05%20PM.png?alt=media\&token=59f30dd2-719f-4c12-9dae-82ac8026938b)

In the new popup element, next to the *Connection* dropdown input field, click the **Add** button. Then, select *Google Restricted* for the *Connection type*. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9PChfZRHoSbF7hBEg%2FScreen%20Shot%202020-09-13%20at%209.19.17%20PM.png?alt=media\&token=f5100387-95e2-4006-8199-64969de96303)

Click the **Continue** button and authenticate with Google. Once you are authenticated, your screen should look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9PSCawTMJ1I6oCSDm%2FScreen%20Shot%202020-09-13%20at%209.20.21%20PM.png?alt=media\&token=15140635-2f44-4a5f-ac04-3b1b699f0154)

Set the *To, Subject,* and *Content* fields for the email, then click the **OK** button.

You've now successfully set up the Make action. Make sure to click the *Save* icon to save your changes.

{% hint style="info" %}
**Need multiple actions?**

You can add additional modules to create multiple action steps in your Make scenario. For example, with the above scenario you sent an email. You could chain an additional action, like 'get a notification in Slack', within the same scenario.
{% endhint %}

### Step 5: Add the Make webhook to your GrowSurf campaign

Open up the GrowSurf module within Make. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MH9MtbIfrhtg3ohoctV%2F-MH9PqPF6M9xq7_4De4e%2FScreen%20Shot%202020-09-13%20at%209.22.01%20PM.png?alt=media\&token=1e74c24f-9117-4143-9760-e42a347244c6)

Copy the Make webhook URL to your clipboard, then open up your GrowSurf campaign in *Campaign Editor > 4. Options > Integrations,* open the *Webhooks* integration card, then paste the webhook URL into the input field. Save your campaign changes.&#x20;

In the *Webhooks* integration card, click the **Test** button, then in the new popup window select *Campaign Ended* for the *Webhook Event.* Keep the GrowSurf campaign editor open (we will return to this in a moment).

#### Test and Publish the Make scenario

To make sure that the scenario is working as intended, return to Make and click the bottom-left **Run Once** button. Then return to the GrowSurf campaign editor and click the **Send** button to send webhook test data. Make should successfully accept the test data, and you should see the HubSpot contact updated or added.

Activate the Make scenario by clicking the bottom-left *Scheduling* toggle. When the popup element appears, keep *Immediately* selected for the **Run scenario** dropdown field value, then click **Activate**.

Your Make scenario is now live and will send out an email report when your GrowSurf campaign ends.

## Example 4: Trigger Referral

In this example, we'll call the GrowSurf REST API to trigger a referral when there is a new charge in Stripe.

### [Step 1: Get access to GrowSurf on Make](https://docs.growsurf.com/integrations/integromat/..#getting-started)

Click on the link above to view how to get access to GrowSurf on Make.

Once logged into Make, click the clear **Create a new scenario** button.

### Step 2: Choose the services you want to integrate

In the search field, type G*rowsurf* and select **GrowSurf**. Then clear out the search field. Type *Stripe* and select **Stripe**.

Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhGggnRiAw_qzc-6Bn%2F-MHhGp4puEy0-gk0w2XB%2FScreen%20Shot%202020-09-20%20at%203.49.10%20PM.png?alt=media\&token=50676cdb-dc5e-477d-93f8-ae51d3067ef3)

Click the top-right **Continue** button to continue.

### Step 3: Set up the trigger

Click the **Stripe** module icon. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhGvVTlTpeXE18nPwI%2F-MHhH6jalG-aiZ86LRqj%2FScreen%20Shot%202020-09-20%20at%203.50.01%20PM.png?alt=media\&token=a3da15dc-dd62-433c-aa0e-4b5247a5439e)

Select the **Watch Events** option. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhGvVTlTpeXE18nPwI%2F-MHhHCUsZfQvvwCcpULk%2FScreen%20Shot%202020-09-20%20at%203.50.59%20PM.png?alt=media\&token=5b24f5a1-fd24-4a4e-b328-1f720377b211)

Click the **Add** button. Then in the new popup element, click the **Add** button. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhGvVTlTpeXE18nPwI%2F-MHhHSJ61etEMZMfqJ03%2FScreen%20Shot%202020-09-20%20at%203.52.03%20PM.png?alt=media\&token=86ee0043-e90b-4c23-a7eb-c88216567bc0)

Then go to <https://dashboard.stripe.com/apikeys> and follow the instructions below to create and grab your Stripe API key:

* **Step A:** Click the 'Create Secret Key' button
* **Step B**: For *Key name*, enter `Make (for triggering GrowSurf referral)`  and click the *Create* button
* **Step E:** Copy the new API key to your clipboard

Return to Make and paste the API key value into the **API Key** input field. Once pasted, click **Continue**.

Then for **Group**, choose **Charge** from the dropdown. From the *Events* list, check the box **Charge succeeded**. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhGvVTlTpeXE18nPwI%2F-MHhKYMfINlB9nvgQKy6%2FScreen%20Shot%202020-09-20%20at%204.04.06%20PM.png?alt=media\&token=3f7f9fd2-7a79-429a-9192-b0997121e918)

Click the **Save** and **OK** buttons, respectively.

You've now successfully set up the Make scenario to trigger on a new Stripe charge. Now it's time to create the action of triggering a referral using the GrowSurf REST API.

### Step 4: Set up the action(s)

Click the **Add another module** button that appears when you hover over the right-side of the Stripe module. Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhMNo8ajhJII7fuHHO%2F-MHhMXM5GufqsXC2XMgI%2FScreen%20Shot%202020-09-20%20at%204.14.06%20PM.png?alt=media\&token=98b7437e-64ed-4166-b88d-1c8a9681bda6)

Click the **GrowSurf** module, then select the **Make an API Call** action.

At **Connection**, click the **Add** button. Then go to <https://growsurf.com/settings#api-keys> to grab your GrowSurf API key and paste it into the **API Key** field in the new popup element.

Your screen should now look like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHhMNo8ajhJII7fuHHO%2F-MHhMgFkqyeJt06AidxG%2FScreen%20Shot%202020-09-20%20at%204.14.52%20PM.png?alt=media\&token=a529952f-363b-41bd-9eee-b4f43e905235)

We will be calling the GrowSurf API endpoint [*/POST Trigger Referral By Participant Email*](https://docs.growsurf.com/integrate/rest-api/api-reference#trigger-referral-by-participant-email).

* For the **URL** field, enter `/v2/campaign/:id/participant/:participantEmail/ref` and replace the following values in the URL:
  * Replace `:id` with your campaign ID (e.g, `p9sqjo`)
  * Replace `:participantEmail` with the *Stripe > Object > Receipt Email* variable
* For the **Method**, select `POST` from the dropdown menu.
* For the **Headers**, delete the default `Content-Type: application/json` header item

Your screen should now look something like this:

![](https://2794996218-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LeklWo0yn03AhWro2Ux%2F-MHqBKmje0f3XbKyZ_BK%2F-MHqENU_okzRJqOi7fPL%2FScreen%20Shot%202020-09-22%20at%209.32.12%20AM.png?alt=media\&token=9d39e238-106d-4d5c-9021-544676b4e95f)

You've now successfully set up the Make action. Make sure to click the *Save* icon to save your changes.

#### Test and Publish the Make scenario

To make sure that the scenario is working as intended, return to Make and click the bottom-left **Run Once** button. Then return to Stripe and create a new charge so that webhook test data is sent. Make should successfully accept the test data, and you should see the GrowSurf API called.

Activate the Make scenario by clicking the bottom-left *Scheduling* toggle. When the popup element appears, keep *Immediately* selected for the **Run scenario** dropdown field value, then click **Activate**.

Your Make scenario is now live and will call the GrowSurf REST API to trigger a referral anytime you get a new charge in Stripe.
