I am certain that the “PROFILE” element has a custom state with text containing an email because I can see it on the inspector before the “create an account for someone else” action runs. But for some reason the “create an account for someone else” action won’t recognise it.
I have seen a few other people on the forum talk about using an “email” type for the custom state instead of “text” but I don’t see that option upon creation. Maybe that is what I’m missing? Or something else?
I added a big pause in between so I could inspect the “PROFILE” element before the “create an account for someone else” action runs. The email is there.
But when I use the debugger to step through everything we can see the email has been sent to the “Create an account for someone else” action (see screenshot of my previous post).
So the email text value is available to the action regardless of the pause because we can see it in the debugger, the action just doesn’t process it for some reason.
I also tried your solution (sending it to a scheduled backend API) but the email does not get passed through to backend workflow. It is blank.
Turns out that this has to do with the way plugins are loaded.
I submitted this as a bug to Bubble and they explained that plugins (and their data) are loaded asynchronously, while all other actions are loaded synchronously.
Put simply, that’s JavaScript speak for “Normal Actions are loaded first, while plugin actions are loaded last”.
So I triggered an event in my plugin after the data is loaded, to make sure everything was available on the front end before proceeding. This has fixed the problem. Hope it helps anyone else seeing this in the future.
It is strange that the debugger showed the email value (even though it was not accessible) but nonetheless it’s working as expected now.