Great job!
Absolutely.
You can do this using the Data API or Workflow API. I’ll explain using the Workflow API as using the Data API requires exposing it which I’d rather not do unless it’s essential.
Roughly speaking, what we’ll do is make an API call to a backend workflow that can bypass the privacy rules. This backend workflow will return a true/false statement via the API connector that tells us if an email exists in the database.
Create a backend workflow. Let’s call it ‘checkemails’. It takes one parameter - an email (of type text). Check ‘ignore privacy rules’ and check ‘expose this as a public API workflow’.
In this workflow, just add the ‘Return data from API’ action. The content-type should be Structured JSON. We’ll search the relevant data type (I’ve searched for users with a specific email, you might want to look for your Form submission data type).
So, if at least one user is found with this email, the API will return ‘yes’, and if none are found, it’ll return ‘no’.
Now, go to the API connector. Create a new API call group called ‘Bubble’. Use this group whenever you want to call your own app. Add the API token for your app (you can generate one in the API settings)
Then, let’s set up the actual API call. It’s dead simple. POST to https://appid.bubbleapps.io/[version]/api/1.1/wf/checkemails (checkemails is the ID of our backend workflow). [version] is a dynamic parameter so that we can dynamically specify the version when making the call using Isn’t live version:formatted as text. If Isn’t live version = yes, use version-test as the version parameter, and if = no, use version-live as the parameter. This way the call will work in both dev and live.
Add an email parameter which is of course the email you’re searching for.
Initialise, and voila:
If it finds a User with that email, it’ll return exists = true, otherwise it’ll return false. Hope it helps 