I’m a bit of a noob with Bubble, so this could be straight forward!
I have created an endpoint on Bubble to collect the response from Slack’s Interaction.
The response has ‘payload’ as key and a json as value.
I need to parse this json and use it for further operations.
Bubble does not map this json into key:value(screenshot attached).
How do I go about this?
Any pointers to further reading would also help.
The issue come from the API service probably more than from Bubble.
Can you provide link to API doc?
Here is the API documentation.
payload is the key
its value is a json object, which I am receiving as a text in bubble.
What I can see is that Slack API send a payload parameter that contain a json as text instead of sending the json itself (application/json). Sadly, this is an bad API webhook design from Slack. The only option I can see for you is to use a json parser action to parse the payload. I don’t know if you can find a plugin that already exist that can help. You can also use external service like Integromat. You will use webhooks and after parse json module and you can redirect data to Bubble Endpoint
Thanks Jici, got it to work using Integromat.
I see why Slack has defined the endpoint the way they have.
Its cos, all interactions(click of button, submit of form etc.) hit the same endpoint with a payload.
Now my issue is that the since the same endpoint is hit on bubble and based on payload content(which is processed on Integromat) have to take different actions.
But Integromat needs json definition.
So its a chicken and egg problem now.
I am sure there is a hack to solve this, but it just feels like too many hacks.
So would evaluate other options.
Thanks for the help!
You dont need to really define a payload in Integromat. You can leave it empty. And the json will be parsed. But in Bubble Its more complicated. I dont know if Bubble have fixed the issue but if yes, ypu ca manually edit the payload receuved in Bubble to add other fields from differents payload. Ypu can also use a tool like insomnia or postman to send a payload to Bubble. You merge all possible payload in one big payload and you send it to Bubble.
This topic was automatically closed after 70 days. New replies are no longer allowed.