In backend wf: how can I access values from the frontend?

Hello guys, I cannot wrap my head around the following:

I have a frontend where the visitor inputs data into a form. The submit button starts an API call to pdfmonkey. When the generation of the pdf is done a backend workflow gets triggered through a webhook. When this is done I want to send an email to this visitor. But since I cannot access the frontend data I don’t know how to get a visitors email or any other field.

And note: I am not signing up any users. The visitors of the page don’t register.

Any ideas?
Thank you!

You’ll need to send some meta data into the API call so that you can retrieve it from the webhook…

1 Like

Hi, yes that does not really work because I cannot add first level items to the json call. I am indeed adding a payload inside the json-body where all the userdata is inside:

"payload": {
    "name":"<name>",
    "email":"<email>",
	...
},

But this is only accessible as a whole. I cannot access the json payload: email.

Any ideas for an easy solution?

Thank you!

Then I guess you’ll have to extract it from the payload… using ‘split by’ should do it…

If the payload is "name":"john", "email":"[email protected]", etc.

Then split by comma , that will give you a list of texts:

"name":"john"
"email":"[email protected]"

Use a filter to find the email (use split by : first item is "email")

Then split that text by : and take the second item: "[email protected]"

Remove the quotes if you need to with a find and replace.

1 Like

Thanks I will try this. I am just a little concerned that this is actually a bit too much heavy lifting for bubble don’t you think?

Cheers

What, splitting a text?!..

Or do you mean whatever else you’re doing in your workflow/app?..

Yes splitting, filtering and finding seems for my understanding too heavy since the data I need is actually really close but there is no way of sending it to the backend.

Maybe I just have a misconception about heavyness. Anyway thank you very much for your help.

If anybody wonders here is my email-filtering with the helpt of adamhholmes:

step11

1 Like