Intercom Conversation Summarizer and Tagger
When an Intercom conversation is closed, the flow sends the transcript to Azure OpenAI to produce a concise summary, topic category, and resolution type, writes the summary back to the conversation as a note, and stores the structured result in Dataverse for reporting. Turns raw chat transcripts into searchable, categorized knowledge.
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 turns raw Intercom support conversations into searchable, categorized knowledge using Azure OpenAI. On a schedule it finds recently closed conversations, sends each transcript to a chat-completions deployment that returns a concise summary, topic category, resolution type, and sentiment as JSON, writes that summary back onto the conversation as an internal note, and stores the structured result in a Dataverse table for reporting.
Why it matters: Transcripts are long and unstructured. An AI summary plus consistent tagging makes conversations skimmable, reportable, and minable for trends - without agents writing wrap-ups by hand. Ships Off; going live requires only connection authorization and filling the env var values.
Use Case
A support team wants every closed Intercom conversation auto-summarized and categorized, with the summary visible on the conversation and structured data stored for analytics (volumes by category, resolution mix, sentiment trends).
Flow Architecture
Every Hour Check For Closed Conversations
Recurrence (1 hour)Polls Intercom on a schedule - the connector has no conversation-closed trigger.
Initialize variables (correlation id, lookback, state, prompt, caps)
Initialize VariableConfig incl. JSON-contract system prompt and transcript char cap.
Compose Search Since Unix
ComposeLower-bound Unix timestamp = now - lookback window.
Search Closed Conversations
HTTP POST /conversations/searchFinds conversations in closed state updated within the window.
For Each Conversation
Foreach (sequential)Processes each returned conversation.
Check Already Processed
Dataverse ListRecordsIdempotency guard by conversation id.
Get Conversation Detail
HTTP GET /conversations/{id}Retrieves opening message + all parts (the transcript).
Generate Summary With Azure OpenAI
Azure OpenAI ChatCompletions (JSON mode)Produces summary, category, resolution_type, sentiment.
Parse AI Result
Parse JSONDecodes the structured output into typed fields.
Post Summary Note To Intercom
HTTP POST /conversations/{id}/replyWrites the summary back as an internal admin note.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_IntercomApiBase | String | https://api.intercom.io | Intercom REST base URL. |
| flowlibs_IntercomApiToken | String | REPLACE_WITH_INTERCOM_TOKEN | Intercom access token (Bearer). |
| flowlibs_IntercomApiVersion | String | 2.11 | Intercom-Version header value. |
| flowlibs_IntercomAdminId | String | (configure) | Admin id used as the author of the summary note. |
| flowlibs_AOAIDeploymentName | String | (deployment) | Azure OpenAI model deployment name. |
| flowlibs_AOAIApiVersion | String | 2024-02-15-preview | Azure OpenAI REST api-version. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Intercom | shared_intercom | POST /conversations/search GET /conversations/{id} POST /conversations/{id}/reply |
| Azure OpenAI | shared_azureopenai | ChatCompletions_Create_2024Feb15Preview |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord |
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.
- Cadence / window
- Match Initialize_Lookback_Hours to the Recurrence interval (both default ~hourly/24h) to avoid gaps or rework.
- Event-driven option
- If you only need new conversations, the connector's TrigNewConversation trigger can replace the Recurrence poll; the close-state poll is required for on-close semantics.
- Auto-tag
- Extend the note step (or add a tag call) to push the category back to Intercom as a native tag for filtering.
- Category set
- Tighten the allowed categories inside the system prompt variable.
- Trend reporting
- Point Power BI at the summary table for category/resolution/sentiment dashboards.
- PII
- Add a redaction step before the model call if policy requires.
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.01Search lower bound (Unix seconds)
Compute the search window start.
EXPR.02Closed-conversations loop
Iterate returned conversations safely.
EXPR.03AI output
Extract the model JSON for Parse JSON.
EXPR.04Closed-at (Unix to ISO)
Convert Intercom updated_at to ISO.
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.