> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Support tickets Canonical URL: https://posthog.com/docs/workflows/recipes/support ## On this page - [Before you start](#before-you-start) - [Which recipe to use](#which-recipe-to-use) - [Triage new tickets with AI](#triage-new-tickets-with-ai) - [Keep tickets moving](#keep-tickets-moving) - [Set SLA deadlines](#set-sla-deadlines) - [Warn before a breach, and escalate](#warn-before-a-breach-and-escalate) - [Tell the account team](#tell-the-account-team) - [Reassign while someone is out of office](#reassign-while-someone-is-out-of-office) - [Send CSAT surveys](#send-csat-surveys) - [More ideas](#more-ideas) - [Tips](#tips) - [References](#references) These recipes automate a support inbox in [PostHog Support](https://posthog.com/docs/support.md): triage, ticket status, SLA deadlines, alerts for the account team, out-of-office cover, and CSAT surveys. Each recipe starts from a template, so you change a working automation instead of building one from nothing. The templates are generalized from the automations that PostHog's own support team runs on. To read why they built them in Workflows and how they work day to day, see [how we run support through PostHog Workflows](https://posthog.com/blog/support-workflows.md). ## Before you start - **Support with at least one channel**, such as email, the widget, or Slack. See [start here](https://posthog.com/docs/support/start-here.md). - **The ticket events and steps.** Tickets emit events, such as `$conversation_ticket_created`, that start automations. The **Get ticket**, **Update ticket**, and **Send message** steps read and change tickets. See [automate ticket handling](https://posthog.com/docs/support/workflows.md) for each event and its properties. - **Status changes from an Update ticket step start no automations.** When an **Update ticket** step changes the status, no `$conversation_ticket_status_changed` event is emitted. Automations that start on a status change, such as the SLA pause, don't run for that change. The recipes below say where this matters. - **A verified sending domain**, for the recipes that email customers. Pick a sender in each email step before you enable the automation. See [set up your domain](https://posthog.com/docs/workflows/domain.md). - **Slack connected**, for the recipes that post to Slack. The templates leave the workspace and channel empty, so pick them in each Slack step, also in the branches, before you enable the automation. See [Slack, SMS, and webhooks](https://posthog.com/docs/workflows/automations/slack-sms-webhooks.md). - **[Customer Analytics](https://posthog.com/docs/customer-analytics.md)**, for the recipe that tells the account team. To see every support template, open [**Workflows** > **Templates**, filtered to support](https://app.posthog.com/workflows/templates?tagFilter=support). The template links on this page open US Cloud. If your project is on EU Cloud, change `app.posthog.com` to `eu.posthog.com` in the link, or find the template by its name in **Workflows** > **Templates**. ## Which recipe to use | Recipe | Starts when | Templates | | --- | --- | --- | | [Triage new tickets with AI](#triage-new-tickets-with-ai) | A ticket is created | 1 | | [Keep tickets moving](#keep-tickets-moving) | A ticket is created, your team replies, a customer replies, or the status changes | 4 | | [Set SLA deadlines](#set-sla-deadlines) | A ticket is created, your team replies, a customer replies, or the status changes | 5 | | [Warn before a breach, and escalate](#warn-before-a-breach-and-escalate) | A ticket is created, your team replies, a customer replies, or the status changes | 2 | | [Tell the account team](#tell-the-account-team) | A ticket is created, or a customer replies | 2 | | [Reassign while someone is out of office](#reassign-while-someone-is-out-of-office) | A customer replies | 1 | | [Send CSAT surveys](#send-csat-surveys) | A ticket is resolved, or a survey is completed | 2 | Each recipe works on its own, with two exceptions: the breach warning and the escalation need a deadline from the SLA recipe, and the follow-up and reopened SLA templates read the tier tags that the first response template adds. ## Triage new tickets with AI A customer shouldn't have to pick a product area when they open a ticket, and you shouldn't have to keep a branch for each team. Instead, an AI task reads each new ticket, picks a category and a priority, and investigates. Template: [**Ticket: AI triage and investigation**](https://app.posthog.com/workflows/new/workflow?templateId=01a12fb6-3cfe-0000-5d45-25a5b3a944e0) How it works: 1. A ticket is created. 2. A read-only [AI task](https://posthog.com/docs/workflows/automations/ai-steps.md#ai-tasks) reads the ticket, and looks up the customer's recent activity, errors, and session recordings. It starts its answer with one line in a fixed format: `TRIAGE: | `. 3. If the AI task returned nothing, the ticket gets the `needs_triage` tag, and the automation posts to Slack, so a person triages it. 4. Otherwise a conditional branch checks the line. The category must match `category_`, and the priority must be `low`, `medium`, or `high`. If the line is valid, **Update ticket** adds the category tag and sets the priority. If it isn't, the ticket keeps its tags and priority. 5. **Send message** saves the AI task's findings and a suggested reply as a private note, and the automation posts to Slack. The AI task never replies to the customer. Your team reads the private note and decides what to send. What to change: - **The categories.** Change the list in the AI task's instructions to the areas of your product. Keep the `category_` prefix, or change the check in the branch to match. - **What the AI task can read.** Add your docs as **Connectors**, so the AI task can find known issues and docs pages. Add only connectors that read. The task reads text that customers wrote, so a connector that can change data could act on instructions hidden in a ticket. - **The Slack channel** in both Slack steps. How PostHog's support team extends it: - **Checks before the AI task.** Spam and prompt-injection checks run first. Spam is resolved, and anything suspicious goes to a person. - **A team tag, not a branch per team.** The AI task picks a team tag and an expert tag from the live pages that list the teams and their experts. The automation checks that each tag has the expected shape, and only then applies it. Then it captures a custom event, and a [custom destination](https://posthog.com/docs/data-pipelines/destinations/customizing-destinations.md) builds the team's Slack channel name from the team tag. A new or renamed team needs no change to the automation. - **A second AI task for the investigation.** The first task only classifies. A second read-only AI task then investigates the ticket and gathers context for the support engineer. Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[building-workflows](https://posthog.com/docs/workflows/skills.md) “Create a draft automation from the Ticket: AI triage and investigation template. Change the categories to the areas of our product, post to our support Slack channel, and explain each step before you save the draft. Do not enable it.” Copy ## Keep tickets moving These four automations do what most helpdesks do out of the box. As automations, you can change each one to fit your process. | Template | What it does | | --- | --- | | [**Ticket: acknowledge new tickets**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-6b1e-2f4e8a6d71c3) | Replies on each new email or widget ticket to confirm that you have it. The reply goes out through the ticket's own channel, so the customer can reply straight back. Slack tickets are skipped. | | [**Support reply notification**](https://app.posthog.com/workflows/new/workflow?templateId=a638999a-bf53-4fde-af36-c85ad9827076) | Emails the customer when your team replies on a ticket that didn't come in by email, so a widget customer doesn't have to check in the app. It only runs when the customer's email is verified. | | [**Ticket: reopen when the customer replies**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-1f8d-9b3a5c7e2d14) | Sets a pending, on hold, or resolved ticket back to open when the customer replies, so it shows in your queue again. For an example `plan` of `enterprise`, it also posts to Slack. | | [**Ticket: nudge, then auto-resolve pending tickets**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-a4c2-6e1d0f8b3a57) | When a ticket is still pending with no message for 5 days, checks in with the customer on the ticket. If the ticket is still pending with no new message 2 days later, resolves it. A day later, if it's still resolved, emails a CSAT survey. | What to change: - **The email** in the reply notification: its sender, subject, and text are empty in the template. - **The wording** of the acknowledgement and the nudge. - **The Slack alert** in the reopen automation: change the `plan` condition to how you mark important customers, or delete the Slack step. - **The waits** in the auto-resolve automation. - **The survey link.** The auto-resolve automation sends a CSAT survey. Paste your survey link into its `csat_survey_url` variable, or delete the survey steps. Keep them if you want a survey for tickets that this automation resolves: the CSAT send template doesn't run for tickets that an **Update ticket** step resolves. See [send CSAT surveys](#send-csat-surveys). ## Set SLA deadlines Most helpdesks decide behind the scenes when an SLA clock starts, pauses, and stops. In Workflows, each of these is a step that you can see and change. The SLA templates work as a set: | Template | Sets the deadline when | Deadline | | --- | --- | --- | | [**Ticket SLA: set first response time**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-5b93-e08a4c1f7d26) | A ticket is created | By the customer's `plan` person property. Enterprise and Pro tickets also get a tier tag, `tier_enterprise` or `tier_pro`. | | [**Ticket SLA: set next response time when the customer replies**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-c7a0-1d5e93b8f4e2) | The customer replies on a ticket that is no longer new | By `plan`. Skips new tickets and leaves their deadline as it is. Skips tickets whose deadline has passed. If the ticket had a sooner deadline, it puts that one back, so more messages never push a deadline back. | | [**Ticket SLA: set follow-up time after the team replies**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-9f14-b6c03e7a2d58) | Your team replies and leaves the ticket new or open | By tier tag, so open tickets don't go quiet. Replaces the first response deadline. It waits a minute and skips the ticket if a newer message came in. | | [**Ticket SLA: pause while pending, on hold or resolved**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-4a8c-d27f15e6b093) | The ticket is set to pending, on hold, or resolved | Clears the deadline, so the clock doesn't run while you wait on the customer. | | [**Ticket SLA: set next response time when a ticket is reopened**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-2e6f-8a4d1c9b5f73) | A pending, on hold, or resolved ticket is set back to open, except by an **Update ticket** step | By tier tag. Without it, a reopened ticket has no deadline, because the pause automation cleared it. | Use the first response template with at least the follow-up and pause templates. Otherwise the first deadline stays on the ticket after your team replies. What to change: - **The plan conditions.** The first response and next response templates branch on an example `plan` person property, with `enterprise` and `pro` branches and a default for every other ticket. Change the branches to the property and the values that you use. The follow-up and reopened templates branch on the tier tags, so change those too if you rename the tiers. - **The deadlines** in each **Update ticket** step. - **The working hours.** The templates set **Working hours** on each **Update ticket** step to Monday to Friday, 9:00 to 17:00 UTC, so a deadline only counts down during those hours. Change them to your own. How PostHog's support team extends it: - **Important customers first.** Before the plan check, the first response automation reads the customer's account in [Customer Analytics](https://posthog.com/docs/customer-analytics.md). Accounts that sales or customer success marked as high priority or a churn risk get an alert. The [**Ticket routing: prioritize important customers**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-f15b-82c6d9a3e047) template does a simpler version: it sets high priority, assigns the ticket, and posts to Slack. Change its example `plan` condition, and pick the lead or role in **Assignee**. - **Fallbacks.** A ticket from a shared Slack or Microsoft Teams channel with no plan counts as Enterprise. When no deadline can be set, the automation posts to an alerts channel, instead of failing without a trace. Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[building-workflows](https://posthog.com/docs/workflows/skills.md) “Set up SLA deadlines for our support tickets from the Ticket SLA templates: first response, next response, follow-up, pause, and reopened. Ask me which person property holds the customer's plan, the deadline for each plan, and our working hours. Save each automation as a draft, and do not enable them.” Copy ## Warn before a breach, and escalate Once tickets have deadlines, tell your team before a deadline passes. | Template | What it does | | --- | --- | | [**Ticket SLA: warn before a breach**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-e3b7-5f9a28c4d1e6) | Posts to Slack 1 hour before the deadline if the ticket is still new or open. | | [**Ticket SLA: escalate overdue tickets**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-7c25-a91e4b6f8d30) | A day after the deadline, if the ticket is still new or open, reassigns it and posts to Slack. Pick the lead or team in **Assignee** first: the template leaves it empty. If the reassignment fails, Slack is told instead. | How the warning works: 1. It starts when a ticket is created, either side replies, or the status changes. These are the events that can change a deadline. 2. It waits 15 minutes, so the SLA automations set the deadline first. 3. **Get ticket** reads the deadline. If the ticket is new or open and the deadline is more than 1 hour away, it waits until 1 hour before the deadline. A deadline that is closer gets no warning. 4. It reads the ticket again. It only posts if the deadline is the same, the ticket is still new or open, and the ticket has no `sla_warned_` tag. 5. It posts to Slack, and adds the `sla_warned_` tag, so later runs skip this deadline. The second read in step 4 matters: a lot can change while an automation waits. Read the ticket again after each wait, before you act on it. PostHog's support team warns 2 hours and again 30 minutes before each deadline. Instead of a Slack step, the automation captures a custom event. A custom destination picks the team's Slack channel from the assignee's role, so one automation serves every team. ## Tell the account team Let the people who own a customer account know when their customer needs help. | Template | What it does | | --- | --- | | [**Ticket routing: notify the account owner**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-0d3a-6f84e1b7c259) | Looks up the ticket's organization in [Customer Analytics](https://posthog.com/docs/customer-analytics.md). If the account has a relationship named `CSM`, tags the ticket with `CSM_` and the first part of the CSM's email (before the `@`), and posts to Slack. | | [**Ticket routing: notify the assignee when the customer replies**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-6a92-c4e07b1f5d38) | Emails the person a ticket is assigned to when the customer replies, so a reply doesn't wait until someone checks the inbox. | With the tag, each CSM filters the inbox by their own tag and sees the tickets from the customers they own. PostHog's support team also adds an `AE_` tag for the account executive. ## Reassign while someone is out of office When a customer replies on a ticket whose assignee is away, reassign it, so the reply doesn't wait for them. Template: [**Ticket routing: reassign while an agent is out of office**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-b8e6-3c0f72d94a15) How it works: 1. A customer replies. 2. **Get ticket** reads the assignee. 3. A conditional branch checks whether the assignee is away. The template has one example condition, with an email and the dates away: ```sql variables.ticket.assignee.user.email = 'alex@example.com' and now() >= toDateTime('2026-12-22 00:00:00', 'UTC') and now() < toDateTime('2027-01-02 00:00:00', 'UTC') ``` 4. If the reply lands in that window, **Update ticket** reassigns the ticket, and **Send message** adds a private note. If the reassignment fails, the automation posts to Slack. What to change: - **Who gets the ticket.** Pick the person or role in **Assignee** of the **Update ticket** step. The template leaves it empty. - **The people and dates.** Add a condition for each person, and connect each new branch to the **Update ticket** step. Or join everyone's dates into the one condition with `or`. Because each condition has an end date, nobody has to switch it off when they're back. Each person adds their own dates before they leave. Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[building-workflows](https://posthog.com/docs/workflows/skills.md) “Add my time off to our out-of-office support automation: I'm away from \[first day\] to \[day I'm back\]. Reassign my tickets to our support role while I'm away, and save the change as a draft.” Copy ## Send CSAT surveys Ask customers how you did after you resolve their ticket, and bring the answers back to the ticket. | Template | What it does | | --- | --- | | [**Ticket CSAT: send survey after resolve**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-3d7e-c2b9f05a1e68) | A day after a ticket is resolved, except by an **Update ticket** step, checks that it's still resolved, then emails the customer. The email has a 1 to 5 rating, and each rating opens your survey with that score filled in. | | [**Ticket CSAT: post responses to Slack and the ticket**](https://app.posthog.com/workflows/new/workflow?templateId=01a1352a-0c41-0000-8e51-47f2d6b09c3a) | When a customer completes the survey, saves their answers as a private note on the ticket, and posts to Slack when they leave a comment or a low score. | To set them up: 1. Create a hosted survey in [Surveys](https://posthog.com/docs/surveys.md). Make the first question a rating from 1 to 5, and the second an open comment. 2. To skip the rating question for customers who already picked a score in the email, set it to **Automatically submit on selection**. See [pre-fill a hosted survey](https://posthog.com/docs/surveys/creating-surveys.md). 3. Launch the survey. Until it's launched, its link doesn't open for customers. 4. Paste the survey's link into the `csat_survey_url` variable of the send template, and pick a sender in its email step. 5. Enable the response template, then the send template. The response template runs for each completed survey with a `ticket_id` property. A customer who clicks a rating and then closes the survey doesn't reach the ticket. The send template only emails tickets that have a customer email. ## More ideas Some support engineers at PostHog built their own automations, too: - **Personal SLA warnings.** A Slack warning 15 minutes before the deadline of each unresolved ticket assigned to you. - **Incident tags.** When an incident is declared, an AI task finds open tickets about it and tags them, so the whole incident is in one place. - **Follow a ticket.** Whoever escalates a ticket to an engineering team follows it, and gets an email on each reply or private note. One more template adds context: [**Support tickets with session context**](https://app.posthog.com/workflows/new/workflow?templateId=f041bc74-fedd-4438-8455-ac97031b98a7) has [Replay Vision](https://posthog.com/docs/workflows/automations/ai-steps.md#replay-vision) summarize the customer's session and post it to Slack. It needs a session recording behind the ticket. ## Tips - **Let your agent build it.** Describe the automation to your agent through the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md), and have it save a draft that you review in the editor. Ask it to explain a complex automation step by step, too. Some trigger conditions, such as the status filters in the SLA pause template, don't show in the editor. - **Write the description first.** A plain description of what the automation does and why lets your agent or a teammate change it safely later. - **Tag each automation**, such as `support` and its area (`sla`, `triage`, or `csat`), so you find it later. - **Give every path a fallback.** Data isn't always there when an automation runs. When a step can't do its job, post to an alerts channel instead of failing without a trace. - **Watch for automations that depend on each other.** When one automation needs another one's tags or deadline, wait a few minutes before you read the ticket, as the breach warning does. Also check that two automations can't start each other in a loop. - **Test big changes in a shadow copy.** Run a copy next to the live automation with the steps that reach customers or change tickets turned off, compare the results, then switch over. See [test and debug](https://posthog.com/docs/workflows/automations/debug.md). - **Know the AI task limits.** Each automation can create 100 AI tasks in a rolling 24 hours, and each project 500. You can [raise these limits](https://posthog.com/docs/workflows/automations/ai-steps.md#limits). The cost of an AI task shows under the person who created the automation. ## References - [How we run support through PostHog Workflows](https://posthog.com/blog/support-workflows.md) - [Automate ticket handling](https://posthog.com/docs/support/workflows.md): ticket events, statuses, and the ticket steps - [AI steps](https://posthog.com/docs/workflows/automations/ai-steps.md) - [Templates and suggestions](https://posthog.com/docs/workflows/automations/templates.md) - [Test and debug](https://posthog.com/docs/workflows/automations/debug.md)