Best answer

Discord "Cannot read property 'username' of undefined" error

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

35 replies

Hi @SamB 

I’ve been having this issue for more than 3 months now and haven’t get any solution. How much more time do I need to wait? It’s frustrating to read that there’s no ETA. I got the premium subscription to be able to do this type of integrations, you should put on your website that this integration is not working fine. 

Hey @Kathy,

I’m so sorry you’re running into that same “Cannot read property 'username' of undefined” error here. I’ve added you to the list of affected users which helps to increase its priority. I don’t have an ETA on when it would be resolved but we will send an email notification to you as soon as it is. 

Until then, it’s been reported that selecting the username using the Custom value option to specify the User’s ID instead should help to get around the error in the meantime. :)

I also tried doing this and selecting custom, but I get this message: 

We’re having trouble loading 'User' data (Cannot read property 'username' of undefined)

Any new on the bug?

Userlevel 7
Badge +9

Hi there, @Axasts! Thanks for checking in and welcome to the community!

No updates to to share at the moment but I did add you to the list of impacted users. We’ll keep you in the loop via email once there’s a fix in place. We’ll also be sure to keep this thread updated so feel free to follow along here. 🙂

Userlevel 7
Badge +11

Hey @Kathy,

This sounds really frustrating, I’m very sorry about that. I checked on the bug report again but it’s still open at present. I really wish I could give a better indication of how long it will take for this issue to be fixed, I know how difficult it is when Zaps aren’t working as expected. :(

I’ve passed your comments here about flagging issues with integrations on the website over to the relevant teams. While I can’t promise anything specific all feedback is considered when looking at making improvements to the messaging on our website. 

When you tried selecting the custom option got the error again, did it appear in red text under User field? Or did it present itself when you attempted to test the step?

If it just appeared under the User field, then it looks like it should be possible to ignore that error message and click the Continue button to continue and test the step:
In which case, can you try clicking that Continue button to see if that allows you to then test the Discord step?

Userlevel 1

Ok so after some research I got a workaround that works great.

Ignore my attempt at the “snowflake” username. I didn’t realize snowflake is some sort of developer term or something lol (I’m no developer).

Here’s the workaround:

Your Zap will need a step in between the trigger and the “role” action, and that step in the middle is “search user” (discord).

So for me, I have people fill out a form to get access to a channel on discord. That form includes a field where they have to type in their discord username.

Once the form is submitted, that data is passed to Zapier via webhook -- so webhook is my trigger.

Then my first action is a Discord “search for user” where I Zapier will actually find the user with the username they put into my form and get all the other info from Discord about that user (such as their nickname).

The key with the search for user in Discord is you also get the actual “userID” (userid is DIFFERENT than the username).

Then the last action is Discord add role (or remove role). The difference is instead of putting in their username where zapier says username, change that to be the userID from the last action.

That worked for me.

Just a note, I also had to give “Zapier” a separate admin role to make it work (the default “zapier” role didn’t work even with everything allowed).

So my zap now looks like this:

Webook → Discord “search user” → Discord “add role”

Hope this helps!


What form did you use to set up the webhook, and what format did you have users submit their username in? I am using the exact same strategy however Zapier is unable to find any users under this format “Dev.N#2655”. 

Userlevel 7
Badge +11

Hey @ZapperMan, welcome to the Community!

Thanks for letting us know, I’m really sorry that didn’t work as hoped. I’ve added you to the list of affected users too. We’ll be in touch by email as soon as it’s sorted. :)



We are new Zapier subscribers and are having the same issue described above here. We would like to discuss with customer support our options moving forward. 


Thank you. 

I have a update for this. It appears that the error is caused because instead of grabbing the inputted/grabbed username data it is grabbing the variable name and using that as the username. Let me explain this better.

It grabs the username of the message/reaction and stores it in a variable.

Instead of grabbing the variable value it is grabbing the variable name.



I tried it with mentions:

i sent a new message mentioning someone

i selected that in the test trigger thing that puts the variable values in the variables

set everything to that and the username to mentions username

it still does the same thing as before where it just grabs the variable name not the variable value