PostHog product analytics automation
Fires on every pageview ($pageview).
1 field
Fires when a user leaves a page ($pageleave).
Fires on any autocaptured interaction ($autocapture).
Fires when PostHog detects a rageclick ($rageclick).
Fires when a person is identified ($identify).
Fires when a group is identified ($groupidentify).
Fires when person properties are set ($set).
Fires when a feature flag is evaluated ($feature_flag_called).
Fires when a survey is shown to a user (survey shown).
Fires when a survey response is submitted (survey sent).
Fires when a survey is dismissed (survey dismissed).
Fires when an exception/error is captured ($exception).
Fires on a web-vitals measurement ($web_vitals).
Fires on a mobile screen view ($screen).
Fires on a custom event you name (or every event with '*').
2 fields
Capture a single event.
4 fields
Capture a batch of events.
Identify a person and set their properties ($identify).
3 fields
Set properties on a group ($groupidentify).
Evaluate feature flags for a person.
Run a HogQL / structured query via the Query API (the universal read primitive).
List recent events.
5 fields
Call any authenticated PostHog REST endpoint (covers the huge long tail).
Files one Linear issue per exception with the events the user triggered just before it, a session recording link when PostHog captured one, and a queried count of how many people hit it. An exception with a minified stack and nothing around it is a puzzle; the same exception with the four things the user clicked before it is a bug report. This agent reads the person's event trail, runs one query to find out whether this hit one person or nine hundred, attaches a session recording where PostHog captured one, and files a single Linear issue with all of it in a fixed order. Impact is a number that came back from a query, so nobody argues about it from the shape of the error message. ## What people use it for - **Reproduction steps for free** - The events leading into the exception are the steps, in the order a real person did them, including the flags that were on for them. Engineers skip the part where they guess how anyone reached that screen. - **One person or nine hundred** - A query counts distinct persons and occurrences over your window, so severity is a figure written into the issue rather than an impression formed from the wording of the error. - **Watch the bug happen** - Where a recording covers that person at that moment, its link goes into the issue. Thirty seconds of replay settles arguments a stack trace leaves open all week. - **Extension noise stays noise** - Exceptions whose frames all belong to a browser extension or a third party script are reported with their counts and no theory attached, and your triage rules decide whether they are worth an issue at all. ## Before you fork **We already have an error monitor. Why triage exceptions in PostHog?** Because the context lives here. PostHog knows the pages, the clicks and the flags around the exception, and often has a replay of it, which is the difference between a stack trace and a bug somebody can reproduce. If you run both tools, point this at the exceptions where nobody can work out what the user did. **Will customer data end up in Linear?** People are identified by their PostHog id, and the instructions keep emails, names and other personal fields out of the issue body. The event trail is pages and actions rather than form contents. If your events carry sensitive properties, name them in the triage rules and they stay out too. **How much extra PostHog querying does this add?** One person lookup, one short event list, one aggregate query and one recording check per exception the trigger sends, which is small next to normal ingestion. You decide how many exceptions reach the trigger in the first place. Rehearsing on the staged exceptions first shows you what a day of this looks like before you point it at everything.
Wire PostHog into a coding agent and let it use these operations as tools.
Start building workflows in minutes with our visual builder. No code required.