Skip to content
Skillpedia
Email & messaging41k Β· #6956

creating-ai-subscription

What it does

This skill creates a recurring report in which an AI writes a fresh summary from a plain-language prompt on a schedule. It is for people who want an ongoing analysis, not a fixed chart.

When to use it

  • βœ“When you want a daily, weekly or monthly AI summary of a topic in your data.
  • βœ“When you want the analysis itself, not a fixed chart you already built.
  • βœ“When you want the summary sent by email, Slack or Microsoft Teams.

Skill link

https://github.com/PostHog/posthog/blob/master/products/subscriptions/skills/creating-ai-subscription/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/products/subscriptions/skills/creating-ai-subscription/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œSend me a weekly AI summary of how our signups and churn changed, every Monday by email.”

5 new skills a week. 1 minute to read.

How it works

It schedules your prompt to run on a set timetable. Each time, an AI plans its own data queries, writes the report in markdown and delivers it to your chosen destination.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Creating a prompt subscription

When to use this

A subscription delivers a PostHog report to email, Slack, or Microsoft Teams on a recurring schedule. There are three kinds, distinguished by which field you set β€” the kind is derived and returned as the read-only resource_type:

  • insight β€” periodic snapshots of one existing insight (resource_type: "insight")
  • dashboard β€” periodic snapshots of a dashboard's tiles (resource_type: "dashboard")
  • prompt β€” a recurring AI-generated report from a free-text prompt: an LLM plans and runs HogQL over the project's data and synthesizes a fresh markdown report each tick (resource_type: "ai_prompt")

Use this skill for the prompt kind β€” i.e. when the user wants a recurring AI summary of X (on any cadence β€” daily, weekly, monthly, yearly) rather than a recurring snapshot of one existing insight/dashboard, or a single one-off report. Pick a prompt subscription when the value is the analysis itself (the LLM deciding what to query and writing it up), not a fixed chart they already built. For an insight/dashboard subscription, set insight/dashboard instead of prompt and the AI gates below don't apply.

Prefer a dashboard or insight subscription first. A prompt subscription is the heaviest option, and the LLM composes its own HogQL, so its numbers can drift from what a saved insight or dashboard already shows. Reach for it only when (a) the user specifically asks for a free-text / AI-written report, or (b) no existing insight or dashboard covers the ask and the value really is the analysis itself. If the user wants the key numbers from an existing dashboard or insight delivered on a schedule β€” even phrased as "set up a scout/bot to post this daily" β€” a dashboard (or insight) subscription with summary_enabled: true is usually the better fit. Respect a user who's sure they want a prompt subscription, but when it's ambiguous, suggest that and confirm first. See managing-subscriptions for the happy path.

This skill covers creating the subscription. Once it exists you manage its lifecycle with the same subscriptions-* tools (see below): list it, edit/disable/ re-enable it, send a test delivery, or delete it.

Tools

Tool Purpose
posthog:subscriptions-create Create the recurring prompt subscription
posthog:subscriptions-list Confirm it landed; inspect existing subscriptions
posthog:subscriptions-partial-update Edit, disable (enabled: false), or re-enable it
posthog:subscriptions-test-delivery-create Send an immediate test delivery to its target(s)
posthog:subscriptions-delete Soft-delete it (stops all future deliveries)
posthog:integrations-list Find a Slack integration_id (filter kind=slack)
posthog:integrations-channels-retrieve List a Slack integration's channels (id + name)

What you need before calling

The endpoint enforces three create-time gates and will return 400 if any fails:

  1. PostHog Cloud, or DEBUG=true β€” self-hosted production deployments are not eligible (the LLM call routes through a PostHog-managed key).
  2. Org-level "AI data processing approved" β€” must be toggled on in Org settings β†’ Data β†’ AI data processing. The user must opt in to AI features for the organization first.
  3. Prompt subscriptions enabled for the organization β€” a PostHog-managed rollout flag. If it's off, the org has not been granted access yet; tell the user to reach out to PostHog to enable it (there is no self-serve toggle).

If any of the three is missing, stop and tell the user which one to fix β€” re-calling the tool will not help.

Your access token also needs the query:read scope in addition to subscription:write: a prompt subscription runs LLM-generated HogQL over the project's data, so the backend requires query access to create, edit/re-enable, test-deliver, or delete one. A subscription:write-only token is rejected with a 403.

Required arguments

prompt: "..."                         # ≀4000 chars; setting this (with no insight/dashboard) makes it a prompt sub β†’ resource_type "ai_pr
FAQ

Should I use this or a chart subscription?

Use a dashboard or insight subscription first when a saved chart already shows what you need, since the AI's numbers can differ from saved charts.

Who writes the report?

An AI writes it, composing its own queries over your project's data.

Where can it be sent?

It can be sent by email, Slack or Microsoft Teams.

Details

Original description by the author

Create a recurring AI-generated PostHog report β€” schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email, Slack, or Microsoft Teams on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight/dashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)

repo: PostHog/posthog

Popularity

GitHub stars
41k
Ranking position
#6956
License
β€”
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills