A CronDog receiver provides a CronDog hosted API endpoint that allows you to receive HTTP requests, and send email/Slack notifications whenever those requests happen. A CronDog receiver is a handy tool to accept webhooks from web services such as SendGrid and Okta. Or you can simply use it to test and inspect HTTP requests. In this tutorial, we will show you how to set up a CronDog receiver that sends out email notification when it receives an HTTP request. After signing into the CronDog dashboard, go to A new receiver is created and opens on its detail page. Under the Click Then click Note that in the response body, we use the built-in variable ${requestHeaders.user-agent} to access the user agent info of the HTTP request. The expression follows JSON path syntax, for more information about built-in variables and JSON path expression, see here. At this point, you should be able to see the receiver in action. In your web browser, visit your receiver URL: Congratulations, your receiver has been configured properly and is actively accepting HTTP requests. Next let us set up an email notification, so we can be notified whenever the receiver gets called. Under the The Enter your email address, and click In your browser, enter your receiver URL again. Shortly after that, you should receive an email triggered by the receiver. If you go to the Here you can check the request details such as request timestamp, request/response body, and request/response headers. Congratulations! You've successfully set up your first CronDog receiver that accepts HTTP requests publicly, with email notification enabled!Receivers, and click + New receiver.Receiver Settings section, you can see your receiver's unique URL, which you can use to receive HTTP requests from external resources. The endpoint can receive GET and POST requests.Edit in the Receiver Settings section, and provide the following values:
Field Value Description Name HTTP request receiverThe name of the receiver. Status Code 200The response status code of the endpoint. Content Type application/jsonThe response content type of the endpoint. The value will appear in response header content-typeResponse Body {"message": "Hello World", "requestUserAgent": "${requestHeaders.user-agent}"}The response body of the receiver. You may customize the response body by adding built-in variables such as ${requestBody} and ${requestHeaders}. Variables support JSON path for property value extraction.Save. With the new settings, the receiver will respond to HTTP callers with a 200 status code, and a JSON formatted response body.https://crondog.dev/receivers/{receiverId}, then you will see the response:{
"message": "Hello World",
"requestUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
}
2. Set up notification
Notifications section, click Add next to the Email label.Add email notification dialog opens.Save. The new notification appears under the Notifications section.3. Test task
4. Check request history
History tab, you can see a history of all HTTP requests that your receiver received.