Manually defining a Backend Workflow API to get a nested field

First time poster. Long time reader.
So thank you all for your posts so far.

TLDR: I want to know how I can manually define a nested field in the response JSON.
In the below screenshots, I want to define event type, which is the nested field “type” in the field “event”.


As you can see, Slack have this in their definitions.

event_id, team_id and type all work, but event type is nested and I can’t seem to get it to work.

Any help?

Long story and Why didn’t I use Detect request data
I’m trying to use a backend workflow API as the Slack Events API.
Slack use this API to send my bubble app events, such as a Slack user going to the home page on Slack.
To confirm the Events API, Slack sent me a “challenge” string, which I had to return it using “Return data via API”.
So I used Detect request data…got the challenge and sent it back…and the Detect request data is now stuck at me getting only the challenge field.
As a result, I’ve gone down the route of defining the fields I need - which is why I need to be able to define the nested event { type field.

The unnested fields are captured easy - they work. Its the bloody nested fields.

How do you define them manually??

Thank you for reading and for your help (in advance).

Try event.type

Thanks @nocodeventure. I tried that but it doesn’t allow periods in the box. I even tried typing event.type in notepad and copy-pasting.
Got rejected :broken_heart:

What I then suggest you to do is, sign up for Integromat, and have it POST to Bubble =) Shouldn’t cost you more than $9 per month.

p.s. The tech team at Bubble might want to know of this issue, perhaps a minor adjustment to allow periods.

Thank you. I’ll check out Integromat as a precaution, and wait a little while for any other suggested solutions before reaching out to the Bubble team.

For OP, this is still an open ticket. I’m hoping the native Bubble backend Workflow creator can help with nested values.

I’d do this: craft a Frankenstein message, made up of both the challenge and the event. Send it to the endpoint while it is detecting parameters. Use another means to send than Slack.

1 Like

You can add your webhook in slack with the challenge via “Return data via API” and after that initialize your endpoint using Postman.

@sat_miha Micheal.K, you absolute legend.

This did the charm and I’ve learnt a workaround to use Postman to initialize API endpoints.

:bowing_man:‍♂ Gracias

Hi @Bubble_Ali ! Did you manage to solve this nested field issue? I’m stuck at the same issue. When I work with postman my endpoint works fine. But I just don’t seem to be able to receive any events from Slack. It looks like nothing is coming through from the event subscription. How did you test that the Slack API was actually sending you POSTs?

Hi @haschwerdt
It did end up working!
Let’s say that you have a POST API that you want to initialize and you know it has certain fields. Just use Postman to send those fields to the API endpoint.
Was able to initialize SLACK with it.

UPDATE: I got it to work! The comment from @mishav was the key. Took me a while to understand that comment, but it totally did the job for me.

Thanks for everbody’s help!

Hi @Bubble_Ali ! Great that you got it to work! Could you maybe post what your set-up looks like now? I’m still a bit stuck. I got the endpoint in bubble to work with postman. I used the examples from Slack’s documentation and it works fine. Regardless of how I’m sending the body of the POST (JSON, form-data, urlencoded), Bubble handles it well!. But when the POST comes from Slack, Bubble returns a 400 error. I learned that from the Slack support team who can see the POSTs go out from their API, but they only get the 400 back.
Any additional pointers of how to fix this would be support helpful!
Btw, the event I’m trying to subscribe to is app_mention…
Thanks!