A generic webhook receiver that cleans messages and submits them to the Spok/USA Mobility web form via direct HTTP POST (no browser).
- Receives
POST /webhookpayloads from monitoring/alerting webhooks - Cleans the message (removes emojis, formats status/timestamp)
- Automates the Spok “Send a Page” form: fills pager number, continues, fills message, sends
pageify/
├── src/
│ ├── index.js # Express server + webhook handling
│ ├── messageClean.js # Emoji removal + formatting
│ └── pagerApi.js # Direct HTTP POST sender
├── package.json
└── README.md
- Node.js 18+ recommended
- Node.js dependencies
Install dependencies:
npm installCreate a .env alongside package.json:
PORT=3000 # optional
PAGER_PHONE_NUMBER=7322063021
PAGER_URL=https://secure.spokwireless.net # optional overrideNotes:
- Messages are truncated to 240 chars (service limit).
npm startEndpoints:
POST /webhook– monitoring webhook targetGET /health– basic health checkGET /– service info
Quick webhook test:
curl -X POST http://localhost:3000/webhook \
-H 'Content-Type: application/json' \
-d '{"msg":"Pageify Testing"}'The service expects a JSON payload with these optional fields:
monitor.name– name of the monitorheartbeat.status–1for up, anything else for downmsg– descriptive message
Any additional fields are ignored but logged for visibility.
- Express receives the webhook.
cleanMessagestrips emojis and formats text with timestamp.pagerApisends a server-side HTTP POST directly to Spok.
-
Port in use: change
PORTin.env. -
Retry sending: restart the server after changing
.env.
MIT