DEV Community

Cover image for Turning email and cron into webhooks
Emiliano Saurin
Emiliano Saurin

Posted on

Turning email and cron into webhooks

I had two small problems that kept coming back in side projects:

  • I wanted an email address that would call my webhook
  • I wanted a cron job that would call my webhook

I did not want another dashboard or a full automation product for that

Email mode creates an address like this:

r_abcd1234@hook.echovalue.dev
Enter fullscreen mode Exit fullscreen mode

Anything sent there is posted to the URL you configured

curl 'https://api.echovalue.dev/webhook' \
  -H 'x-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "webhookId": "support-alerts",
    "url": "https://example.com/hooks/support"
  }'
Enter fullscreen mode Exit fullscreen mode

There are also output formats for Slack, Discord, Teams and Telegram

The other mode is scheduled webhooks:

curl 'https://api.echovalue.dev/webhook' \
  -H 'x-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "webhookId": "daily-sync",
    "url": "https://example.com/hooks/daily-sync",
    "schedule": {
      "cron": "0 9 * * *",
      "timezone": "Europe/Rome"
    }
  }'
Enter fullscreen mode Exit fullscreen mode

Pricing uses credits, mostly to prevent abuse. The actual cost per request is very low. New tokens include free credits, if someone wants to test more seriously, I can create a voucher

Docs: https://docs.echovalue.dev/webhook/
Landing: https://www.echovalue.dev/webhook-api/

Top comments (0)