Overview#
Set up PocketHook’s background polling to automatically check for new information and deliver a daily summary notification.
How It Works#
- PocketHook polls your server periodically (configurable interval)
- When the polling endpoint returns
true, PocketHook sends a fetch message - The server responds with a summary and optionally triggers a Shortcut
Server Setup#
Polling Endpoint#
Create an endpoint that returns true when there’s new data. The URL is fully configurable in PocketHook Settings — you can use any path (e.g., /jobs, /check, /status):
// In your server
app.get("/jobs", () => {
const hasNewData = checkForUpdates(); // your logic
return new Response(hasNewData ? "true" : "false");
});
Summary Command#
Handle the fetch message in your router:
case "daily-summary":
const summary = await generateDailySummary(); // your logic
return toResponse(
shortcut(summary, "ShowSummary", {
date: new Date().toISOString(),
items: summaryItems
})
);
PocketHook Configuration#
- Go to Settings → Background Polling
- Enable polling
- Set Polling URL to
https://your-server.com/jobs - Set Fetch Message to
daily-summary - Choose your Polling Interval (e.g., 60 minutes)
- Grant notification permission when prompted
Required iOS Shortcut#
ShowSummary#
- Shortcut Input — receive the summary data
- Show Notification with the summary text
- Optionally: Add to Reminders or Create Note for reference