Question

"Error during execution: Cannot read property 'username' of undefined"

  • 23 February 2022
  • 5 replies
  • 171 views

Hello, I am currently setting up an integration for when members cancel their subscription on AC, 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 AC that when a customer cancels, they receive a specific tag. Then when this tag is applied, Zapier picks up on the AC tag and will remove the role from the Discord user.

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


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

5 replies

Userlevel 7
Badge +12

Hi @Deb_MYM 

Can you please share screenshots of your current Zap setup? You will need to know the Discord Users Username in order to find them so you can retrieve their user id which will be used to remove the role. 

Hi,

 

Attached the whole configuration of the Zap. As you can see, when I try to do the test, appears the error notification.

 

Is very urgent solve this problem. Please, could you help me?

 

Thank you.

Hi,

I’m waiting for an answer about my discord problem. Could you be so kind to help me, please?

 

Thank you,

Userlevel 7
Badge +11

Hey there, @Deb_MYM,

Thanks for sharing those helpful screenshots of your setup! It looks like an email address has been selected from ActiveCampaign for the User field. And that is causing that “Value \test@test.com\” is not a snowflake” error. As you’re using the Custom value option for that field Discord is going to want to receive an ID for the user instead.

To help get the ID value that Discord is expecting you may want to try adding a Find User search step (Discord) to search for the user and obtain their ID. That said, the Find User step is only able to search by username so you’d need to have their Discord username sent over from the ActiveCampaign? Do you have the Discord username information stored in ActiveCampaign for the contact?

Hi,

This option is not valid for us, because the user name could be common for the major part of the members.

 

We need the following:

When a user buy on Hotmart our product, we need to create a new role in Discord automatically.

We have seen that from Hotmart to Discord Directly is not possible, and we thought that the soluction could be that when the contact has  been tagged on AC, Zapier can do a Zap with Discord to asign the role.

 

Could you give me the best option for that?

 

Thank you