is it possible to modify what is sent in the post body on webhooks?

Asked on December 1, 2016 in Technical.

We want to get updates to our Slack-channel when a user installs the app, with specific parameters, like a specific referrer. We will later use web hooks for live statistics.

Slack requires the following:

You have two options for sending data to the Webhook URL above:

  • Send a JSON string as the payload parameter in a POST request
  • Send a JSON string as the body of a POST request

For a simple message, your JSON payload could contain a text property at minimum. This is the text that will be posted to the channel.
A simple example:

payload={"text": "This is a line of text in a channel.\nAnd this is another line of text."}
123on — Other
2 Answer(s)
Answered on December 1, 2016.

Hey – thanks for posting the question. Unfortunately, you cannot modify the schema of the Webhook. However, what you can do is send data into your system using Branch webhooks, process the payload and then send it to Slack.

Let me know if you have more questions.

Answered on December 2, 2016.

Thanks for your answer!

123on — Other