In this example, we're going to add a role to a member when they first send a message in Discord. The flow will look like this:
User Sends a message > IF they don't have the [Active User] role > THEN add the role
Step 1: Create a role in Discord to track who has sent a message
You may already have a role created in Discord that you want to use. If not, you can easily create one. In the image below I'm creating a role called "Active User". We're going to assign this role to anyone that sends a message.
Step 2: Go to the BotDisco Builder and Create a New Flow
Step 3: Select "New Channel Message" trigger
In order to assign a role when someone sends their first message, we need to trigger the flow using the "New Channel Message" trigger.
Step 4: (Optional) rename the flow to "Assign a role on first message".
Giving the flow a name is a good idea because you'll be able to easily see what the flow is supposed to do just by reading the flow name.
Step 5: (Optional) Configure a specific channel to trigger the flow
If you want to track the user sending a message in a particular channel, then select a channel from the dropdown list. But if you want to track the user sending their first message across every channel, then leave this optional field blank.
Step 6: Add a filter
Click Add Action > Filter
Configure the filter to only continue IF the user does NOT have the Active User role.
The filter should look like this:
User that sent the message -> Roles Does not contain Active user
IMPORTANT: Make sure you double check your filter so that it looks like the one above!
Step 7: Add the "Add Role" action
This action should be configured to add the Active User role to the person that sent the message.
Step 8: Turn on the flow
The last step is to the flow on!