# Check if a user with that "email" exists and if not, send an invite?

**URL:** <https://forum.bubble.io/t/check-if-a-user-with-that-email-exists-and-if-not-send-an-invite/132363>\
**Category:** Database\
**Created:** [January 25, 2021, 1:07am UTC](https://forum.bubble.io/t/check-if-a-user-with-that-email-exists-and-if-not-send-an-invite/132363 "2021-01-25T01:07:48Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![infinity](https://avatars.discourse-cdn.com/v4/letter/i/a587f6/32.png) [@infinity](https://forum.bubble.io/u/infinity)\
**Post date:** [February 15, 2023, 11:21pm UTC](https://forum.bubble.io/t/check-if-a-user-with-that-email-exists-and-if-not-send-an-invite/132363/10 "2023-02-15T23:21:14Z")

</div>

So what we do is have the ‘Continue with Email’ button run the Sign Up workflow, no matter if the user is signed up or not.

- If the email exists, it will throw the ‘USED\_EMAIL’ error, therefore triggering our Login workflow instead (which is separate from the Sign Up workflow, triggered using the screenshot I sent in my previous reply).

- If the email _doesn’t_ exist, the Sign Up workflow will run as normal without any errors. We don’t ask users for a password, instead we use passwordless sign in using Bubble’s ‘magic link’ feature.

To work around the password field, we generate users a random password. We generate passwords that are longer/more complex than necessary (probably a lot more secure than the average users’ password 😅) to ensure the security of their account. Of course, this password will never be needed, as every time the user logs in, we’ll just send them a magic link email to log in.

Hope this helps!

---

_[View the full topic](https://forum.bubble.io/t/check-if-a-user-with-that-email-exists-and-if-not-send-an-invite/132363)._
