Best answer

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


Hello, I am currently setting up an integration for when members cancel their subscription on Kajabi, this then removes their role within my Discord server to revoke their access to all content.

I am doing this by setting up an automation in Kajabi that when a customer cancels, they receive a specific tag. Then when this tag is applied, Zapier picks up on the Kajabi tag and will remove the role from the Discord user.

However, after connecting both Kajabi & Discord to my Zapier account to create the zap. I am receiving this error code: "Error during execution: Cannot read property 'username' of undefined"

icon

Best answer by SamB 25 January 2022, 14:51

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.

35 replies

Userlevel 7
Badge +11

Hey @Devin Paul and @dfscoachtalk!

@Devin Paul, I don’t have any details of how exactly @zschuenke set up their webhook, but I believe it’s the username only that needs to be searched on, not the ID number as well. So just Dev.N not Dev.N#2655.

@dfscoachtalk, to contact our Support team you’ll need to use the Get Help form here: https://zapier.com/app/get-help 

Hope that helps! :) 

Hello, 

 

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. 

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 everyone!

You should have all received email notifications about this already, but I just wanted to give a quick, if somewhat belated, update here to confirm that this issue was closed last week. So that error should now be gone. :)

If you’re still running into this issue I’d recommend reaching out to our Support team who can investigate further.

Userlevel 7
Badge +11

Thanks for sharing that workaround here @zschuenke! :)

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!

Actually I have some more context as well that may help with the fix.

I’m not using kajabi at all. I’m using a webhook from a form where we ask what their discord username is.

The idea is when they sign up for our offer, their discord user gets a new role automatically.

So we have Webook (catchhook) → Discord add role.

I’m using my own discord user as the test and I get that same Value is not snowflake error.

It seems to me that for some reason Zapier is wanting the userid to be “snowflake”.

I tried changing the username from the webook to snowflake just to see what happens and I get the same error:

{"user_id": ["Value \"snowflake\" is not snowflake."]}

I’m getting that “snowflake” error as well. Please add me to the noify list.

Userlevel 7
Badge +9

Hi there, @JRCC! I’ve got you added to that bug report as well. We’ll be sure to let you know just as soon as we know more!

I’m also experiencing this issue. Can you please add me to the list to be notified when a fix is available? Thanks.

Userlevel 7
Badge +11

I’m so sorry you’re running into this issue as well, @sam9s! :(

I’ve added you to the list of affected users. I still don’t have an ETA on when it will be resolved but we’ll email you to let you know as soon as it is! :)

Having the exact same issue …… wish zapier could do something about it seeing so many users are facing the same issue

Userlevel 7
Badge +11

Hey @Boysclub and @ApexTraders!

I’m so sorry you’re both running into this issue as well. There isn’t an another workaround or estimate on when this will be resolved that I can share here unfortunately. I’ve added you both to the list of affected users so we’ll definitely be in touch by email the minute it’s been sorted.

Also I’m trying to set up product specific roles, if anybody can help with this

I just paid for the woocommerce zapier plugin. And now I can’t even use it. I’m getting the same snowflake issue.

Hi there. I am also having this issue and receiving the below error message: 

{"user_id": ["Value \"natashahoskins\" is not snowflake."]}

 

Do you have an ETA on when this bug will be resolved? Or a work around we could try? 

 

 

Userlevel 7
Badge +11

Thanks for reaching out here, @OverlandGeeks. I’ve added you to the list as well. We’ll be in touch as soon as it’s been sorted. 

I am also having this issue trying to assign Discord roles based on my MemberPress members and getting the same error…

https://og.d.pr/g7XBww

Please add me to the list. I am sure ANYONE who is trying to use this integration is having this issue...since the zap has no idea where to get that ID.

Userlevel 7
Badge +11

Hey @UNA@setsnzaps and @FlyRyde!

I’m really sorry you’re still being affected by this issue. :( @UNA and @setsnzaps, it looks as though our Support team have already added you both to the list of affected users. @FlyRyde, I’ve added you to that list as well. 

I don’t have any timeline I can share for when this will be resolved but we’ll be sure to email all of you and will post an update here once it’s been resolved! :)   

Yup, same deal. I think if Zapier can get Kajabi integrated with Discord in a meaningful way, it will be a full on game changer. We’ll be able to easily gamify the experience for our members who can trigger access to various roles in our discord communities. 

Please add me to the list of eager Kajabi Users who need Zapier to save the day.

I am getting this error as well. @christina.d @SamB this is a major issue for us.

We are facing the same problem and have submitted a ticket. Very unfortunate that nothing seems to have been done regarding this problem for 3 months. If this is not fixed we will definitely not purchase a plan but look somewhere else to find an integration that actually works.

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. 🙂

Any new on the bug?

Userlevel 7
Badge +9

Interesting! I’ve passed your feedback along to the team. Thanks so much for sharing this, @Clyde