Webhooks

As a gridscale Partner, you can be notified about important events.

Webhooks can be configured to inform you about events like a new contract having signed up. You can specify how you want to be informed and if you want to be informed about a failing webhook. Logs will keep track of all webhook activities.

Settings

The default settings intend for the webhook feature to be disabled. Go to Parter Panel > Settings > Webhooks to change your settings.

Configuration

You can switch on and off the feature entirely here and choose if you want to be informed about failing hooks. If so, you can leave an email address here where you will be notified about a failure.

Adding and changing webhooks

You can create a new webhook and must choose a channel which this webhook will use. You can select the events about which this webhook will notify you. You must specify a URL to which the message will be sent. To find out how to create a URL, see for example slack, discord, or RocketChat for setting up webhooks. When creating a new “custom_url” webhook, you will see a “secret” that you can use to authenticate the incoming requests at your specified custom URL, see Signature authentication

Events

Contract Signup

Whenever someone signs up and gets an email with a request to verify the specified email address, the newly created account data is sent to the configured webhook channel. (See “Notification Payloads”)

Contract Finalize

Whenever an account first logs in after the sign up, they will be asked to fill in additional data like name, email, phone number, and contract name. This data is send to the configured webhook channel. (See “Notification Payloads”)

Notification payloads

Contract Signup

Custom Url

{
   "message":"Account created with email \"<email address>\" and uuid \"<account uuid>\". See <panel link>. (Webhook: \"My custom url webhook\")",
   "text":"Account created with email \"<email address>\" and uuid \"<account uuid>\". See <panel link>. (Webhook: \"My custom url webhook\")",
   "account_email":"<email address>",
   "account_uuid":"<account uuid>",
   "account_link": "<panel link>"
}

Discord

{"content":"Account created with name \"<email address>\" and uuid \"<account uuid>\". See <panel link>. (Webhook: \"My discord webhook\")"}

RocketChat

{
   "text":"Account created with name \"<email address>\" and uuid \"<account uuid>\". See <panel link>. (Webhook: \"My rocket chat webhook\")",
   "event":"My rocket chat webhook",
   "emoji":"🆗"
}

Slack

{
   "text":"*New Account Sign up*",
   "icon_emoji":"🆕",
   "mrkdwn":true,
   "attachments":[
      {
         "title":"",
         "text":"",
         "fields":[
            {
               "title":"Message",
               "value":"Account created with email \"<email address>\" and uuid \"<account uuid>\"",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Account-Uuid",
               "value":"<account uuid>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"E-Mail",
               "value":"<email address>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Panel link",
               "value":"<Panel link>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Webhook",
               "value":"My slack webhook",
               "short":true,
               "mrkdwn":true
            }
         ]
      }
   ]
}

Contract Finalized

Custom Url

{
  "message":"Account finalized with following data: email \"<email address>\", first name \"<first name>\", last name \"<last name>\", phone number \"<phone number>\", account name \"<account name>\", user uuid \"<user uuid>\" and account uuid \"<account uuid>\". See <panel link>. (Webhook: \"My custom url Webhook\")",
  "text":"Account finalized with following data: email \"<email address>\", first name \"<first name>\", last name \"<last name>\", phone number \"<phone number>\", account name \"<account name>\", user uuid \"<user uuid>\" and account uuid \"<account uuid>\". See <panel link>. (Webhook: \"My custom url Webhook\")",
  "email":"<email address>",
  "first_name":"<first name>",
  "last_name":"<last name>",
  "phone_number":"<phone number>",
  "contract_name":"<account name>",
  "user_uuid":"<user uuid>",
  "account_uuid":"<account uuid>",
  "account_link":"<panel link>"
}

Discord

{"content":"Account finalized with following data: email \"<email address>\", first name \"<first name>\", last name \"lastName\", phone number \"<phone number>\", account name \"<account name>\", user uuid \"<user uuid>\" and account uuid \"<account uuid>\". See <panel link>. (Webhook: \"My discord webhook\")"}

RocketChat

{
   "text":"Account finalized with following data: email \"<email address>\", first name \"<first name>\", last name \"<last name>\", phone number \"+4912345678\", account name \"<account name>\", user uuid \"<user uuid>\" and account uuid \"<account uuid>\". See <panel link>. (Webhook: \"My rocket chat webhook\")",
   "event":"My rocket chat webhook",
   "emoji":"🆗"
}

Slack

{
   "text":"*Contract finalized*",
   "icon_emoji":"🆕",
   "mrkdwn":true,
   "attachments":[
      {
         "title":"",
         "text":"",
         "fields":[
            {
               "title":"Message",
               "value":"Account finalized",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"First name",
               "value":"<first name>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Last name",
               "value":"<last name>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Phone number",
               "value":"<phone number>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"E-Mail",
               "value":"<email address>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Account name",
               "value":"<account name>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Account Uuid",
               "value":"<account uuid>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"User uuid",
               "value":"<user uuid>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Panel link",
               "value":"<panel link>",
               "short":true,
               "mrkdwn":true
            },
            {
               "title":"Webhook",
               "value":"My slack webhook",
               "short":true,
               "mrkdwn":true
            }
         ]
      }
   ]
}

Webhook signature authentication

When a custom URL webhook sends a request to the specified URL, a signature and the timestamp are sent along to allow for an authenticity check. The request will contain two fields in the headers: ‘X-Auth-Signature’ and ‘X-Auth-Timestamp’. Concatenate the timestamp and the JSON content of the request, then encode this concatenated string with HMAC, using the webhook’s secret as key and sha256 as algorithm. The result must be identical to the X-Auth-Signature value in the header.

Top