Example: Automatically issue points to users when they post messages in your Discord server using Zapier and Absinthe’s API.

Setting Up Discord New Message Listener

To reward users with points when they post messages in your Discord server, you’ll need to set up a Zap in Zapier that listens for new message events and then triggers a point issuance through Absinthe’s API.

IMPORTANT: The event UUID should be used instead of the event name. Please disregard this section in the Loom.

Here is a Loom helping you walk through each step! https://www.loom.com/share/9ea95b730fbd40238c440442b5a1108f?sid=51231545-e233-4aee-ba6e-d6c41019b96e

1

Create a New Zap in Zapier

Log in to your Zapier account and click on “Create Zap”.

2

Choose Discord as the Trigger App

Search for “Discord” in the app selection and choose it as your trigger app.

3

Select the 'New Message Posted To Channel' Event

From the list of Discord events, select “New Message Posted To Channel”.

4

Connect Your Discord Account

If you haven’t already, you’ll need to connect your Discord account to Zapier. Follow the prompts to authorize Zapier to access your Discord server.

5

Choose the Discord Server

Select the specific Discord server you want to monitor for assignments.

6

Test the Discord Trigger

Zapier will attempt to find a recent role assignment to test the trigger. If successful, proceed to the next step.

7

Add a 'Run JavaScript' Action

For the action step, search for and select “Run JavaScript” by Zapier.

8

Set Up the JavaScript Action Data

In the Input Data field of the Run JavaScript action, you’ll set the key name to a recognizable name of your choice, for example: user_discord_id and the value to the Author Id from the value field dropdown.

9

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 your daily point threshold, the amount of points to issue, and the event name in the code as marked.

10

Register Event Name on Points API

Register the event name that you want to issue points for. The UUID from this will be used in the Event UUID section in the step above.

Copy and paste the following query into the GraphQL playground at https://dka7gqe6jrgst.cloudfront.net/absinthe-gql.html Add your desired event name and description! Make sure to add your API key in the Authorization header in the Headers section as shown.

IMPORTANT: You must save the returned UUID from the response for that event. Insert this UUID into the “EVENT UUID” field when setting up your Zap!

By following this guide, you can create a seamless integration between your Discord server and the Absinthe points system, automatically rewarding users for their engagement within your community.