With Incoming Webhooks you can easily post messages from other apps into Pumble. When you create an Incoming Webhook, you receive a unique URL using which you can send a JSON payload with the message text.

Creating an Incoming Webhook

To create a new Incoming Webhook:

  1. Click on your Workspace name in the top left corner and open Workspace settings.
  2. Click on the Incoming Webhooks button in the sidebar.
  3. In the top-right corner, click on the New Webhook button.
  4. Select the channel where you want your Webhook to post messages.
  5. Click on the Add incoming Webhook button to create your new Webhook.

When you create your Webhook, the Editor will open up automatically. There, you'll be able to Customize its name, change the channel, add a Descriptive Label, Customize the icon, and most importantly, Copy or Regenerate your unique URL.

Using the Incoming Webhook to send a message

To send a message using the Incoming Webhooks you just created, simply make an HTTP POST request to the unique URL you copied from the Webhook Editor.

The request payload should contain the "text" property and that text will be posted into the specified channel. Currently supported content types are:

  1. application/json
  2. application/x-www-form-urlencoded

Here is a sample curl request for posting to a channel using an Incoming Webhook using the application/x-www-form-urlencoded content type:

curl -X POST --data-urlencode "payload={ \"text\": \"This is posted to general and comes from a bot named MyNewWebhook.\"}" https://api.pumble.com/workspaces/60a258a358a14a7515409f68/incomingWebhooks/postMessage/60a258a358a14a7515409f6a/UiRMkd218gb15eAQCIP3aaAL

Error Handling

If everything is set up correctly, you'll receive a "HTTP 200" status to indicate that your Incoming Webhook worked and message was sent successfully. This might not always be the case, and Webhooks can fail for numerous reasons.

Some of the errors you might encounter if your Webhooks fail are:

message: Incoming webhook is disabled.
code: 400700
The Webhook was disabled by the Workspace Admin
message: Incoming webhook is deleted.
code: 400702
The Webhook was deleted by the Workspace Admin
message: Not found.
code: 404100
Unique URL was not found and was most likely regenerated by the workspace Admin
message: You can not perform this operation.
code: 403200
You don't have permission to post in the specified channel
message: Channel is archived.
code: 400440
The channel where the webhooks is sending messages is Archived
message: Invalid payload format.
code: 400703
Request payload is not in one of the supported formats.