Returning data to Slack API

Hi folks, I’ve set up a Slack app that let’s people use an interactive button in Slack to send data to my Bubble app. I’m now trying to get Bubble to send back a confirmation. I’m just using the vanilla Bubble Slack plugin, nothing extra.

My workflow looks like this. The payload comes in, I use some Server Scripts to dismantle it into usable text for the Bubble App, send an email to let me know it happened, but that’s it. It works, but Slack throws up an error message, which I believe is due to not returning a 200 OK from Bubble.

I’ve tried two ways so far:

Using a Server Script, and the code from Slack:

And one using the Return Data from API block (no idea if this is something relevant):

image

Any help at all would be appreciated!

Also have tried setting up return data from API in plain text:

image

1 Like

The issue seems to be that Return data from API is not using the correct key names. I’ve reported a bug and awaiting a response.

1 Like

Thank you!

So it turns out my issue was that Bubble returned data in the following format:

{
“status”:“success”,
“response”: {
“RESPONSEBODY”}
}

The issue for my webhook is that they only want the response body. No status key or even the response key name. I had to use Integromat to capture the webhook, run an HTTP request to my bubble app to get the necessary information, then process the JSON response to only capture the response body, and return that to my webook. I hope this helps!

The Integromat workflow: