RhinoAgents × PostHog
Connect AI Employees to PostHog Product Analytics, HogQL Queries, Feature Flags, Cohorts, and Session Insights via PostHog Personal API Keys and Action Webhooks.
How RhinoAgents Connects Safely to PostHog
RhinoAgents connects to PostHog Cloud (US or EU) or self-hosted PostHog via a scoped Personal API Key, running HogQL analytics queries, inspecting user event timelines, and reacting to PostHog Action webhooks.
Pattern A — Support & Churn Context
When a customer opens a ticket, the AI Employee checks their recent PostHog events and errors before replying.
Pattern B — Product-Qualified Lead (PQL)
PostHog Action webhooks (e.g. invited 5 teammates or hit API quota) notify sales reps and update CRM.
Pattern C — HITL Feature Flag Rollout
Before toggling enterprise beta feature flags for an org, agents request 1-click Slack/Teams approval.
Step-by-Step PostHog Setup
Create a scoped Personal API Key in PostHog Settings → User → Personal API Keys.
Create Scoped Personal API Key
- Open PostHog → Settings → Personal API Keys → Create personal API key.
- Grant read scopes for Query, Insight, Person, and Feature Flag (write only if toggling flags).
Copy Project ID & Cloud Host
- Note your Project ID and host (
us.posthog.comoreu.posthog.com).
Forward High-Intent Product Actions
- In PostHog Data Management → Actions (or Destinations), configure a webhook to RhinoAgents for key PQL or error events.
Verify Connection
- Open RhinoAgents → Integrations → PostHog → Connect and verify
GET /api/projects/{id}/.
| Parameter | Example Format | Purpose |
|---|---|---|
| host | https://us.posthog.com | eu.posthog.com | PostHog Cloud region or self-hosted URL |
| project_id | 49102 | Target PostHog Project ID |
| personal_api_key | phx_•••••••• (Vault Encrypted) | Scoped PostHog Personal API Key |
Supported PostHog Tools & Triggers
Typed PostHog tools for HogQL queries, saved Insights, Person event lookup, Cohorts, and Feature Flags.
{
"tool": "posthog.execute_hogql_query",
"input": { "hogql": "SELECT properties.$browser, count() FROM events WHERE timestamp > now() - interval 7 day GROUP BY 1" },
"result": { "rows": [["Chrome", 18420], ["Safari", 6110], ["Firefox", 1940]] }
}
Ready-to-Use PostHog AI Employees
AI PQL Spotter
Detects high-usage trial accounts in PostHog and alerts AEs in Slack/HubSpot.
Use Template →AI Debug Support Agent
Inspects a user's recent PostHog events and errors before answering tickets.
Use Template →AI Retention Briefer
Runs weekly HogQL funnel and retention queries and posts Slack digests.
Use Template →AI Release Annotator
Creates PostHog Annotations automatically whenever GitHub releases ship.
Use Template →PostHog Integration FAQ
Are both PostHog US and EU Clouds supported?
Yes. Select us.posthog.com, eu.posthog.com, or your self-hosted domain.
Can AI Employees run HogQL queries safely?
Yes. HogQL queries are read-only and automatically capped with row limits.
Can we use PostHog Actions to trigger outreach?
Yes. Forward PostHog Action webhooks to RhinoAgents to enrich signups and alert sales.
Can Feature Flag changes require human approval?
Yes. Keep flag mutations behind 1-click Slack/Teams HITL sign-off.
Build & Test Your PostHog AI Employee Today.
Start on the RhinoAgents platform with credits, or have our engineering team build, integrate, and manage your PostHog AI workflows end-to-end.