Skip to main content
  1. Shortcuts/

Daily Summary

Overview
#

Set up PocketHook’s background polling to automatically check for new information and deliver a daily summary notification.

How It Works
#

  1. PocketHook polls your server periodically (configurable interval)
  2. When the polling endpoint returns true, PocketHook sends a fetch message
  3. 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
#

  1. Go to SettingsBackground Polling
  2. Enable polling
  3. Set Polling URL to https://your-server.com/jobs
  4. Set Fetch Message to daily-summary
  5. Choose your Polling Interval (e.g., 60 minutes)
  6. Grant notification permission when prompted

Required iOS Shortcut
#

ShowSummary
#

  1. Shortcut Input — receive the summary data
  2. Show Notification with the summary text
  3. Optionally: Add to Reminders or Create Note for reference