Best answer

Auto assign discord role

  • 23 November 2022
  • 8 replies
  • 311 views

Userlevel 1

Hey there everyone, this is my first time on this community and loving it here so far.

I have a question regarding setting up zapier on discord.

I’m trying to assign a specific role to users who send a message in a specific.

For example, “when Person A sends message in Channel A, Person A will receive a role”.

Could someone guide me on how to do it? Thanks! 

icon

Best answer by MohSwellam 30 November 2022, 17:32

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

8 replies

Userlevel 7
Badge +8

Hi @Ridge Tang 

 

Welcome to Zapier Community ! 

 

The question is, how many of those roles / channels do you have ? 

 

You can use Lookup Tables (in Formatter by Zapier) to add the Channel name and Discord Role associated with that Channel. The steps would be 

 

Trigger: New Message Posted to Channel in Discord

Action 1: Utilities in Formatter by Zapier > Lookup Table > Add the different channels and roles in this table

Action 2: Add Role in Discord (based on the data you got from Action 1)

 

Does that help?

Userlevel 5
Badge +7

Hi @dawidbackum (quick note, I removed the link in your post above, we don’t advocate for external links in posts). Glad you’re having a good time in our little corner of the internet!

A great resource to check out, that I would start with, is our help desk article on Discord: https://help.zapier.com/hc/en-us/articles/8496048271501-How-to-Get-Started-with-Discord-on-Zapier

 

What it sounds like you want is when [x] purchase is made, send [y] message. For that, you’ll have to set the action up with your point of sale app, be it Squarespace or anything else. 

 

Let us know how you get along with building your Zap, and we look forward to hearing about your progress. 

Userlevel 7
Badge +8

Hi @Ridge Tang! I know Lookup Tables can get a bit tricky, were you able to follow Moh’s outline above or do you still need any help with this? 🤓

Userlevel 1

Hi @Ridge Tang 

 

Welcome to Zapier Community ! 

 

The question is, how many of those roles / channels do you have ? 

 

You can use Lookup Tables (in Formatter by Zapier) to add the Channel name and Discord Role associated with that Channel. The steps would be 

 

Trigger: New Message Posted to Channel in Discord

Action 1: Utilities in Formatter by Zapier > Lookup Table > Add the different channels and roles in this table

Action 2: Add Role in Discord (based on the data you got from Action 1)

 

Does that help?

Hey there, just wanted to follow up on your solution, I’m trying the one you’ve suggested and I’m not sure what to input at this stage (shown in the picture below). Would it be alright if you showed me an example? Thanks a bunch!

 

FYI, I have 1 role and I want to be able to give said person that role once he sends a new message in that 1 channel.

 

Userlevel 7
Badge +8

Hi @Ridge T ,

 

If its 1 role, then there is no need for the lookup table then. You just need a filter after the Discord step to continue only if the word is in the message and add the role you want.

Userlevel 1

The message doesn’t have to contain anything specific, I want it to be as long as they input a new message in a given channel, they’ll receive the role.

 

My current zap sequence is:

Trigger: New Message Posted to Channel in Discord

Action: Add Role in Discord (using ID)

However I still receive this error shown in this picture.

 

Userlevel 7
Badge +8

Oh that is simple then, you just seem to be mapping the user incorrectly. 

 

Zapier would be expecting the User ID (in the light grey), make sure you are passing that, not the user name

 

 

Userlevel 1

It seems to be working when I test, but when another member tried sending a new message into the channel, the didn’t receive the role as intended. It only seems to work when “I” send a message but not for others who do the same. 
 

Is there anything else I’m missing? 

 

Edit: it worked, just took a while to process, thanks for the help MohSwellam!