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 a SendGrid Event Webhook receiver

You can create an iHook receiver to receive SendGrid Event Webhooks, and send email/Slack notifications whenever a SendGrid 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 SendGrid 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:

sendgrid-add-receiver

FieldValueDescription
NameSendGrid webhook receiverThe name of the receiver.
Status Code200The response status code of the endpoint.
Content Typetext/plainThe response content type of the endpoint. The value will appear in response header content-type
Response BodyThe response body to be sent back to SendGrid. You may leave this field as empty.

Then click SAVE. With the new settings, the receiver will respond to HTTP callers (SendGrid) with a 200 status code and empty response body.

2. Setup notification

Next let us set up an email notification, so we can be notified whenever the receiver gets a SendGrid 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 objects/properties in ${requestBody}, e.g. ${requestBody[0]}.

3. Register a SendGrid Event Webhook

Now you can register your receiver URL in your SendGrid account. Go to your SendGrid Event Webhook setting page (Settings -> Mail Settings -> Event Webhook), provide the following values:

sendgrid-webhook-setup

FieldValueDescription
Authorization MethodNoneNo authorization method.
HTTP Post URLhttps://ihook.us/receivers/{your-receiver-unique-id}The iHook receiver URL.
Deliverability DataDropped and BouncedTells SendGrid to notify the iHook receiver whenever an SendGrid email delivery is dropped or bounced.

Then click Test Your Integration, you should receive an email that contains the test data generated by the SendGrid event webhook.

Finally, toggle the SendGrid Event Webhook status to ENABLED, and click Save.

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

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