Zendesk AI Reply Draft and Tagging
When a Zendesk ticket is created or updated, the flow sends the conversation to Azure OpenAI to draft a suggested reply and suggested tags/category, posts the draft as an internal note for the agent to review, and applies tags. Speeds responses with AI-drafted answers kept under human control.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow speeds up Zendesk support responses with AI kept under human control. On a schedule it reads open Zendesk tickets, sends each ticket's context to Azure OpenAI to draft a suggested reply plus suggested tags and a category, posts that draft as a private internal note on the ticket for the agent to review, applies the AI-suggested tags via the Zendesk connector, and notifies the support team in Microsoft Teams.
Why it matters: Agents spend significant time drafting routine replies. AI suggestions cut handle time while the agent always stays the decision-maker — nothing is ever auto-sent to the customer.
Built: CF-716 · Solution FlowLibsZendeskAIReplyDraftTagging · Flow ships Off (demo).
Use Case
A support team wants AI-drafted replies and automatic tagging as agent aids. A draft appears as an internal (non-public) note on each open ticket; the agent reviews, edits and sends it. Tags are applied automatically to improve routing and reporting.
Flow Architecture
Recurrence
Recurrence (Schedule, 15 min)Poll for open tickets
Init varTicketTable … Init varDraftNotePrefix (12 vars)
Initialize VariableBind env vars + config (system prompt, note prefix)
Get Open Tickets
Zendesk GetItems (table=tickets)Read open tickets needing a draft
Apply to each Ticket
Foreach (sequential)Process each ticket
Compose Chat Messages
ComposeBuild system+user messages array
Draft Reply With AI
Azure OpenAI ChatCompletions_Create_2024Feb15PreviewDraft reply + tags + category (JSON)
Parse AI Response
Parse JSONExtract reply / tags / category
Add Internal Draft Note
HTTP PUT (Zendesk REST)Post draft as a PRIVATE note (comment.public=false)
Condition Auto Tag → Apply Tags To Ticket
If → Zendesk PatchItemApply AI tags when enabled
Post Draft Notice To Teams
Teams PostMessageToConversationNotify agents a draft is ready
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_ZendeskTicketFilter | String | status ne 'solved' and status ne 'closed' | OData $filter for open tickets |
| flowlibs_ZendeskSubdomain | String | (subdomain) | Zendesk subdomain for the REST URL |
| flowlibs_ZendeskBasicAuth | String | Basic REPLACE_WITH_BASE64_EMAIL_TOKEN | Authorization header for the private-note REST call: Basic base64(email/token:APITOKEN) |
| flowlibs_OpenAIDeployment | String | (deployment) | Azure OpenAI model deployment name |
| flowlibs_OpenAIApiVersion | String | 2024-02-15-preview | Azure OpenAI REST api-version |
| flowlibs_KbContextUrl | String | (help center URL) | KB URL the model is told to ground on |
| flowlibs_AutoTag | String | true | When true, apply AI tags via PatchItem |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams Team (group) ID for notifications |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel ID for notifications |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Zendesk | shared_zendesk | GetItems PatchItem |
| Azure OpenAI | shared_azureopenai | ChatCompletions_Create_2024Feb15Preview |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Grounding / RAG
- Point flowlibs_KbContextUrl at your Help Center, or extend the prompt to retrieve KB articles for stronger grounding.
- Tone & brand voice
- Edit varSystemPrompt (an Initialize Variable, no flow-logic change needed).
- Tagging
- Set flowlibs_AutoTag to false to suggest-only without writing tags. Tags are applied as a space-separated string via PatchItem; adjust to your Zendesk tag conventions on go-live.
- Cadence / scope
- Change the Recurrence interval and flowlibs_ZendeskTicketFilter (e.g. only status:new, or a specific group/brand).
- Event-driven
- Replace Recurrence + GetItems with the Zendesk GetOnUpdatedItemsV2 trigger for near-real-time drafting.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01AI output text
Extract the AI completion text from the Azure OpenAI response
EXPR.02Parsed reply / tags / category
Read the parsed reply, tags, or category from the JSON parse
EXPR.03Private note URL
Build the Zendesk REST URL for the private note PUT
EXPR.04Tag string for PatchItem
Join the AI-suggested tags into a space-separated string
EXPR.05Auto-tag gate
Gate the tag-apply step on the AutoTag flag
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.