Looking for Nord.Js help on Integrating Typeform & Discord!

So Discord has:

  • Usernames (ex. ohms),
  • Discriminators (ex. #3539),
  • and User IDs (ex. 968557998576386149)

As of now my Typeform collects username only, I’m then running a find_user action on pipedream to get their ID, then I’m giving that ID a role. Problem is, if two users have the same name I could run into issues.

Pierce on slack recommends: You can bypass the props in the pre-built find_user action and recreate it in a Node.js step instead

So:

The trigger would be a typeform being filled with Username + Discriminator (ohms#3539) > a custom Node.Js action would accept this input, find the unique user, and output a Discord ID (968557998576386149) > the add_role action would give the Discord ID their role.

Pierce here, just to add more context for those looking to help with this project.

Initially I was suggesting to alter the underlying Discord find_user action: pipedream/find-user.mjs at master · PipedreamHQ/pipedream · GitHub

But after some research I think this uniqueness problem can be best solved with Data Stores.

1 Like

@zalmanlew @andres-at-connex @ForYourIT

Any interest in helping out here? The full context of the problem @omar-6698a3 is trying to solve is here:

I think this is very doable with just a bit of Discord API knowledge.

1 Like

I’ve also tried asking for JUST people’s usernames. Telling them: “DO NOT INCLUDE NUMBERS” but users are entering numbers anyway and I’m getting the following error:

Error

User not found

User not found

at Object.run (file:///opt/ee/c_7Wfwj6qD/user/actions/find-user/find-user.mjs:29:13) at process.processTicksAndRejections (internal/process/task_queues.js:95:5) at global.executeComponent (/var/task/launch_worker.js:134:22) at MessagePort.messageHandler (/var/task/launch_worker.js:597:28)

@pierce thanks for the mention.

@omar-6698a3 I’ll check with my team if this is something we can help with.

Why not just have the users enter the username with the number tag and just parse them out using a Nodejs step?

Hey @omar-6698a3 giving it a look and we’d probably solve this in 5 hours. Ping me if interested.

My team’s comment:

Your right, it is explained in the answer of this thread. It seems there is no way to ensure username will be unique. But the value to query in discord Database is their user number (username#discriminator) that is unique.With pipedream code Auth + NodeJS code example to search would need to do log in to discord and test the solution but doesn’t seem hard.

Hey @andres-at-connex sorry for the delay! Would love to move forward here and get this solved ASAP.