iHook

iHook

  • Blog
  • Docs
  • Dashboard

›Task 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

Insider trading monitor

Insider trading activity can provide important insights into a company's performance and prospects. If you want to stay on top of insider trading activity for a particular company, you can set up a monitoring task and receive notifications whenever there is new insider trading activity for that company.

In this tutorial, we'll show you how to use iHook to monitor Elon Musk's insider trading activity for Tesla, by consuming the data provided by the website www.insidertrades.com.

1. Create an iHook scheduled task

After logging into iHook, click the CREATE TASK button at the top left corner, then you will see the task creation form:

General Settings

Under the Request Settings and Request Schedule sections, provide the following values:

FieldValueNotes
Task NameElon Musk Insider Trading Monitor - TeslaThe name of the task
URLhttps://www.insidertrades.com/tesla-inc-stock/elon-muskThe URL to fetch Elon Musk insider trading information from www.insidertrades.com.
Request MethodGET
Request HeadersNoneNo headers are needed
Request ScheduleEvery 1 dayThe task will run once every day

This tells the task to fetch insider trading information for Tesla from www.insidertrades.com once every day.

2. Create email notification

The HTTP response body contains a table of insider trading activity in HTML format. Now let us set up an email notification, so we get notified whenever there is new insider trading activity appears in the table.

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

add-notification

Then a notification setup dialog will show up:

email notification

Then provide the following values in the dialog:

FieldValueNotes
1st conditionResponse Body (HTML) - tbody > tr > td:nth-child(3) - is any valueExtract share number from insider trading table's first row, third column, always evaluates to true. The extracted value is referenced as ${condition.evaluatedSourceValue[0]} in email template
2nd conditionResponse Body (HTML) - tbody > tr > td:nth-child(4) - is any valueExtract sell price from insider trading table's first row, fourth column, always evaluates to true. The extracted value is referenced as ${condition.evaluatedSourceValue[1]} in email template
3rd conditionResponse Body (HTML) - tbody > tr > td:nth-child(1) - has changedExtract sell date from insider trading table's first row, first column, evaluates to true when first row's sell date changed. The extracted value is referenced as ${condition.evaluatedSourceValue[2]} in email template
EmailYour email address
SubjectElon Musk sold Tesla again!The email subject
MessageNew sell: ${condition.evaluatedSourceValue[0]} shares sold at ${condition.evaluatedSourceValue[1]} on ${condition.evaluatedSourceValue[2]}The email body

This tells iHook to send an email notification whenever the insider activity table's first row's sell date column changes (3rd condition). The first 2 conditions are configured not as filters, but to populate the messaging context. This way we can show the number of shares sold and sold price in the email message.

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

3. Save task

Click the CREATE button at the bottom of the task creation page:

create-task-button

You'll see the created task in ACTIVE state.

4. Test task

To make sure your task settings such as URL and notification rules are properly configured, it's recommended to test your task at least once.

You can perform the test by clicking the TEST button at the top of your task page. The TEST button will trigger the HTTP request right away, and evaluate all configured notification conditions.

If everything went smoothly, you would receive an email notification the first time the task runs successfully since the evaluated condition value has changed from non-existent to some value.

email-delivered

Congratulations! You can now sit back and wait for the iHook email notification whenever Elon Musk sells his Tesla shares.

← Weather monitorMortgage rate monitor →
  • 1. Create an iHook scheduled task
  • 2. Create email notification
  • 3. Save task
  • 4. Test task
Copyright © 2024 iHook, Inc.