iHook

iHook

  • Blog
  • Docs
  • Dashboard

›Receiver Examples

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

Create an Okta Hook receiver

You can create an iHook receiver to receive Okta Event Hooks, and send email/Slack notifications whenever an Okta event is fired.

1. Create receiver

After signing into the iHook dashboard, go to the Receiver tab, and click the CREATE RECEIVER button at the top left corner:

receiver-tab

A new receiver will be created. Under the Receiver Settings section, you can see the receiver's unique URL, which you will use to receive Okta events. The endpoint accepts GET and POST requests.

Click the EDIT button at the top right corner of the Receiver Settings section, and provide the following values:

receiver-okta-create

FieldValueDescription
NameOkta Event Hook receiverThe name of the receiver.
Status Code200The response status code of the endpoint.
Content Typeapplication/jsonThe response content type of the endpoint. The value will appear in response header content-type
Response Body{"verification": "${requestHeaders.x-okta-verification-challenge}"}The response body of the receiver. It contains the x-okta-verification-challenge request header value to perform a one-time verification with Okta.

Then click SAVE. With the new settings, the receiver will respond to HTTP callers with a 200 status code, and a JSON formatted response body.

Note that in the response body, we use the built-in variable ${requestHeaders} to access a HTTP request header value. The expression follows JSON path syntax, for more information about built-in variables and JSON path expression, see here.

2. Register an Okta Event Hook

Now you can register your receiver URL to your Okta Event Hook. Go to your Okta Event Hooks page, click Create Event Hook and provide the following value:

okta-hook-create

FieldValueDescription
NameiHook receiverThe name of the Okta Hook.
URL200The response status code of the endpoint.
Authentication fieldYou may leave this field empty.
Authentication secretYou may leave this field empty.
Custom header fieldsYou may leave this field empty.
Subscribe to eventsUser createdTells Okta to notify iHook receiver whenever an Okta user has been created.

Then click Verify:

okta-hook-verify

If everything went smooth, your Okta Event Hook should have been verified:

okta-hook-verified

3. Setup notification

Next let us set up an email notification, so we can be notified whenever the receiver gets an Okta event.

Under the Notification section, click on ADD button next to Email label:

add-notification

Then a notification setup dialog will show up:

edit-notification

Enter your email address, and click SAVE, you will see the new notification appear under the Notification section.

Note that in the message template, you can use JSON path expression to extract desired properties in ${requestBody}, e.g. ${requestBody.data.events[0].target[0]}.

Congratulations! You've successfully created a receiver that accepts Okta Event Hooks, with email notification enabled!

← Github repo release monitorCreate a SendGrid Event Webhook receiver →
  • 1. Create receiver
  • 2. Register an Okta Event Hook
  • 3. Setup notification
Copyright © 2024 iHook, Inc.