Getting Started
Reward users with points for off-chain actions with Zapier
Automatically issue points to users using Zapier “Zaps” and Absinthe’s API. Here is a general guide, and we have also provided specific examples for integrations such as Discord Role points.
Setting Up A Zap
To reward users with points when they perform an off-chain action, you’ll need to set up a Zap in Zapier that listens for events of your choice, and then triggers a point issuance through Absinthe’s API.
Create a New Zap in Zapier
Log in to your Zapier account and click on “Create Zap”.
Choose a Trigger App of your desired integration
Search for your desired app such as Discord in the app selection and choose it as your trigger app.
Select an Event you want to issue points for
From the list of events, select the Event you would like tracked, such as Role Assignment from Discord.
Connect Your App Account
If you haven’t already, you’ll need to connect your App account to Zapier. Follow the prompts to authorize Zapier to access your App account.
Choose the Account
Select the specific Account you want connected to Zapier. For example, a specific Discord server.
Test the Trigger
Zapier will attempt to find a recent event matching your trigger. If successful, proceed to the next step.
Add a 'Run JavaScript' Action
For the action step, search for and select “Run JavaScript” by Zapier.
Set Up the JavaScript Action Data
In the Input Data field of the Run JavaScript action, you’ll set up keys with meaningful names of your choice (for example: user_discord_id), and the values for those keys to the relevant fields field, such as the User Id from the value field dropdown.
For Discord Integration, use Discord ID as the user identifier, with “DISCORD_USERNAME” as the identifier_type. For Twitter Integration, use Twitter Username as the user identifier, with “X_HANDLE” as the identifier_type. For most other Integrations, use Email as the user identifier, with “EMAIL” as the identifier_type.
Set Up the JavaScript Action Code
In the Code field of the Run JavaScript action, you’ll paste and modify the provided JavaScript code to issue points through Absinthe’s API. Insert the API KEY we provided you to the “bearerToken” variable in the code where it says “your_api_token_here”. Then, set up the amount of points you want to assign for conditions such as the role granted, under the section “set up points based on conditions”.
Finish
Simply Publish your Zap to go live!
Custom JavaScript Action
Use the given JavaScript code in your Zapier “Run JavaScript” action to issue points when a Discord role is assigned.
The code has been commented to guide you through what needs to be filled in. These comments are found by ”//” marks with green text