creating-ai-subscription

Create recurring AI-generated PostHog reports delivered to email or Slack on a schedule.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill creating-ai-subscription
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-ai-subscription
Source: https://github.com/PostHog/posthog-foss/tree/main/products/subscriptions/skills/creating-ai-subscription
Command: npx skills add https://github.com/PostHog/posthog-foss --skill creating-ai-subscription

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams often want a recurring written analysis of their product data rather than a static chart snapshot. This Skill creates a PostHog prompt subscription that runs a free-text prompt on a cron schedule, where an LLM plans and executes HogQL queries and delivers a synthesized markdown report to email or Slack on each tick.

Core Features & Use Cases

  • Recurring AI reports: Schedule a free-text prompt to run daily, weekly, monthly, or yearly, with the LLM composing its own HogQL and writing a fresh markdown report each delivery.
  • Email and Slack delivery: Send reports to comma-separated email recipients or a Slack channel resolved via the integrations API.
  • Flexible recurrence rules: Configure interval, byweekday, bysetpos, count, and until_date to control exactly when deliveries fire.
  • Use Case: A founder wants a Monday-morning email summarizing top events week over week with the biggest drops called out. Create a weekly prompt subscription with byweekday set to monday and the report arrives automatically.

Quick Start

Create a weekly PostHog AI subscription that emails a summary of top events and new failure modes to [email protected] every Monday at 8am.

Frequently Asked Questions about creating-ai-subscription

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a recurring AI report subscription in PostHog?

Call the subscriptions-create tool with a prompt field, target_type of email or slack, frequency, interval, start_date, and title. Setting prompt with no insight or dashboard makes it an AI prompt subscription, returned with resource_type ai_prompt.

What is the difference between a prompt subscription and an insight subscription in PostHog?

A prompt subscription runs an LLM that composes its own HogQL and writes a fresh markdown report each tick, while an insight or dashboard subscription delivers periodic snapshots of existing saved charts. The kind is derived from which field you set and cannot be changed after creation.

How do I send a PostHog subscription to a Slack channel?

List integrations filtered by kind=slack to get the integration id, retrieve its channels, then set target_value as channel_id|channel_name and pass the integration_id. The subscription is pinned to that specific Slack integration.

Why does creating a PostHog AI subscription return a 400 or 403 error?

A 400 means one of three gates failed: the deployment is not PostHog Cloud or DEBUG mode, org AI data processing is not approved, or prompt subscriptions are not enabled for the org. A 403 means the access token lacks the query:read scope required alongside subscription:write.

When should I not use a PostHog prompt subscription?

Avoid it when an existing insight or dashboard already covers the question, since the LLM composes its own queries and numbers can drift from saved charts. Prefer a dashboard or insight subscription with summary_enabled set to true for scheduled delivery of known metrics.

Why did my PostHog subscription get auto-disabled and how do I re-enable it?

Only permanent failures auto-disable a subscription, such as a disconnected Slack integration, invalid prompt, or revoked AI consent. Re-enable with a PATCH setting enabled true, but the stored or new prompt must be valid and the original creator must still be an active user.