Zapier: Awarding Points For Actions In Discussions

In this article, we will go through the steps required to automatically award points to an Advocate who contributes to your discussions. This could be through any of the below actions:

This article will cover:

Prerequisites: You will need to have a Zapier account in order to begin this process. The free Zapier account comes with 5 "Zaps" and 300 "tasks" (i.e. events) per month. So, if you expect to have more than 300 new advocates per month, you may have to pay for a premium account.

Additionally, the free plan only allows two step Zaps. This will suffice for a basic version of the setup below, but should you want to add additional steps or filters, you will need a paid account and I will highlight these below as we encounter them.


Posting A Topic

1. Go to Zapier, and click on Make a Zap!

2. Choose  Webhook for the 'App' and select Catch Hook for the 'trigger'. At this point it should look like below:

3. Copy the webhook link present in the  View Webhook section and then continue to Test this step and copy the webhook link

4. Now open up a new window/tab and navigate to your AdvocateHub's Webhook configuration page:   Settings > System > Webhooks

5. Click on the  Add a Webhook button:

6. Here you fill out the name of the webhook, the URL and the format. You also select the event you want this webhook to run on:

  • Name - Is not important and you can call it whatever makes most sense for you
  • Webhook Provider URL - This is the URL we retrieved from Zapier in point 3 above
  • Format - Must be 'JSON'
  • Event - In this case it will be 'Posted a topic'
  • Type - Event

7. Staying in the hub, we want to create an event type. Go to Settings > Scoring & Achievements > Event Types and click "Add an Event Type"

8. Now we have to fill out some quick information. The most crucial thing below is the API Code, we will need this later on - it has to be in the format below ie. there can be no blank spaces, you need to use and underscore.

9. Now we are ready to test that the webhook is being caught so head back to Zapier and go to the 'Test this step' stage. Click 'OK, I did this' and quickly go back to your hub and post a test topic in your Discussions. If the webhook is working at this point you will see a screen like below:

image001.jpg@01D4E963.466E60E0

Note: This next part of the article covers filter which are only available if you have a paid Zapier account. If you do not need filters because you intend to award points for all activity, you can skip to step 13.

10. To add a filter you need to click the small '+' sign and then select FIlter.

11. Go to the Edit Options. You will see 3 fields on the right-hand side. The first field is the data we want to select for our filter, in this case it is 'forum'. We want to have the text match exactly the name of our Forum in the AdvocateHub. In this example our forum is called 'Topic 1'.

12. On the Test this step section Zapier will give you an overview of when your Zap will succeed or fail.

13. The final part requires us to complete the action on our webhook. We want to select Webhooks here.

14. On the next step Custom Request we need to click 'show less common options'.

This will reveal an option called Custom Request which is the one we want.

15. Click continue to move on to the next Edit Template section. Here we will see a lot of fields that need to be filled. I will explain what information needs to go into which field below. I will ignore fields that do not affect us:

Field Value
Method POST
URL https://api.influitive.com/events
Data           
 "type": "post_topic",   //use the API code from point 8 in this article
 
 "contact": {
   "email":  "[advocate's email]"   //use Zapier's insert field function here, you can find the button in the 
                                                   // top right of this field
 },
 
 "points": 50   //amount of points you want award
 }
Unflatten Yes
Headers Content-Type: application/json
Accept: application/json
X_ORG_ID: [Insert X_ORG_ID token from hub]
Authorization: [Insert API token from hub]

16. Finally we test the whole Zap, similarly to how we did it earlier. Click 'test' and quickly go back to the hub and post a topic we should get a message saying it has been successful. Now in the AdvocateHub, in the Activity Feed you should be able to see you Zap in action:

In Step 15 make sure to replace "type": "post_topic" with the API code you set for this zap, so it would likely be 'topic_reply' but it can be anything you choose.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us