iHook

iHook

  • Blog
  • Docs
  • Dashboard

›Receiver Variables

Quick Start

  • Create your first task
  • Create your first receiver

Task Settings

  • HTTP Settings
  • Request Schedule

Task Notifications

  • Notification Overview
  • Source
  • Property / CSS Selector
  • Comparison
  • Message Template

Task History

  • Chart

Task Errors

  • Errors

Task Shortcuts

  • Keyboard Shortcuts

Receiver Variables

  • Receiver variables

Task Examples

  • Nintendo Switch availability monitor
  • Weather monitor
  • Insider trading monitor
  • Mortgage rate monitor
  • Github repo release monitor

Receiver Examples

  • Create an Okta Hook receiver
  • Create a SendGrid Event Webhook receiver

Receiver variables

When configuring the response body and notification message for your receiver, you can customize your message by using built-in variables.

Response body variables

You can use the following variables to customize your receiver's response body:

VariablesDescription
${requestHeaders}The request headers that are sent to the receiver
${requestBody}The request body that is sent to the receiver

Notification message variables

You can use the following variables to customize your receiver's notification message:

VariablesDescription
${receiver.name}The receiver name
${receiver.detailLink}The URL to review receiver configurations and request history
${requestHeaders}The request headers sent to the receiver
${requestBody}The request body sent to the receiver
${responseCode}The response code that is returned by the receiver
${responseBody}The response body that is returned by the receiver

JSON path expression

You can use JSON path expression to access property values nested in ${requestHeader}, ${requestBody}, and ${responseBody}. Note that this requires ${requestBody} and ${responseBody} to be presented in JSON format.

Given the request headers:

{
    "user-agent": "Awesome HTTP client",
    "content-length": "3721",
    "content-type": "application/json"
}

and the request body:

{
    "store": {
        "book": [
            {
                "category": "fiction",
                "author": "Herman Melville",
                "title": "Moby Dick",
                "isbn": "0-553-21311-3",
                "price": 8.99
            },
            {
                "category": "fiction",
                "author": "J. R. R. Tolkien",
                "title": "The Lord of the Rings",
                "isbn": "0-395-19395-8",
                "price": 22.99
            }
        ],
        "bicycle": {
            "color": "red",
            "price": 19.95
        }
    },
    "expensive": 10
}
ExampleResultNote
${requestHeaders['content-type']}application/jsonAccess header value via bracket notation, header key is single quoted and case insensitive
${requestHeaders.content-type}application/jsonAccess header value via dot notation, header key is case insensitive
${requestBody['store']['bicycle']['color']}redAccess bicycle color via bracket notation
${requestBody.store.bicycle.color}redAccess bicycle color via dot notation
${requestBody.store.book[1].title}The Lord of the RingsTitle of the third book

For more examples, please see JSON path examples.

← Keyboard ShortcutsNintendo Switch availability monitor →
  • Response body variables
  • Notification message variables
  • JSON path expression
Copyright © 2024 iHook, Inc.