Blob Primary Left

Connect Tools

Blob Primary Right

Incoming Webhooks for Pumble

jovana

With the incoming webhooks, you can easily post messages from other apps into Pumble. When you create an incoming webhook, you receive a unique URL by 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 at the top left corner
  2. Navigate to the Workspace settings
  3. Click on the Incoming Webhooks button in the sidebar
  4. Click on the New Webhook button at the top right corner
  5. Choose the channel where your webhook will post messages
  6. Click on the Add incoming Webhook button to complete the process

When you create your webhook, the editor opens 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 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 a specified channel. Currently supported content types are:

  • application/json
  • 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 an HTTP 200 status to indicate that your incoming webhook worked and the message was sent successfully. This might not always be the case, and this action 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.