Webhooks

Edit

Receiving webhooks in SAMMI #

You can receive a webhook trigger in SAMMI by following these steps:

  1. Create a new button and add a Webhook Trigger
    • the Message field must match the trigger key supplied in the HTTP Request
    • If you leave * in the Message field it will accept any webhook triggers

  2. Add Trigger Pull Data command inside the button that will pull any data supplied in the webhook request body when SAMMI receives the trigger.
    Pull Webhook data
    Pull Webhook data


Edit

Sending webhooks to SAMMI #

The default URI is localhost:9450/webhook for all POST webhook requests.
You must pass an Authorization header supplying the password if it’s enabled in the SAMMI Settings.

Parameter Required Type Description
trigger yes string trigger name matching the webhook trigger message field attached to a button
any no any Any custom data you wish to pass to SAMMI

Example Request

{
	"trigger": "myWebhookTrigger",
	"customData": "Some cool data",
	"customObjectData": {
		"key": "Hello World",
		"anotherKey": "Bye"
	},
	"customArrayData": ["Silver", "Sugar"]
}