Skip to Content
Hookboard
Reference

Effects reference

Every effect a webhook reply or an onSuccess list can ask for.

An effect is an object with a type. Effects appear in three places: the effects list of a webhook reply, and an action's onSuccess and onError. An effect with no fields may be written as just its name, for example "dismiss".

dismiss

Remove the card.

No fields.

{
  "type": "dismiss"
}

patchData

Merge new values into the card's data.

FieldTypeRequiredWhat it is
dataobjectyesObject merged into data.
{
  "type": "patchData",
  "data": {
    "count": 5
  }
}

setState

Merge new values into the card's local state.

FieldTypeRequiredWhat it is
stateobjectyesObject merged into state.
{
  "type": "setState",
  "state": {
    "open": false
  }
}

replace

Replace the card's content.

FieldTypeRequiredWhat it is
uiElementNew element tree.
dataobjectNew data.
titlestringNew title.
{
  "type": "replace"
}

toast

Show a short message.

FieldTypeRequiredWhat it is
messagestringyesThe message.
tone"default" "success" "danger"default, success or danger.
{
  "type": "toast",
  "message": "…"
}

openUrl

Open a link.

FieldTypeRequiredWhat it is
urlstringyesAddress to open.
{
  "type": "openUrl",
  "url": "https://your-app.example/hook"
}

error

Report a failure to the user.

FieldTypeRequiredWhat it is
messagestringyesWhat went wrong.
{
  "type": "error",
  "message": "…"
}

On this page