Intercom Help Article Suggestion
When an Intercom conversation is created, the flow retrieves the most relevant help-center articles from an Azure AI Search index of your knowledge base and posts them to the agent as an internal note (and optionally suggests a deflection reply). Speeds resolution by surfacing the right documentation without the agent searching.
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 first-response on Intercom by surfacing the right documentation automatically. When a new conversation is created, it queries an Azure AI Search knowledge-base index for the articles most relevant to the customer's question, posts them to the agent as an internal note, optionally drafts a grounded deflection reply with Azure OpenAI, alerts the support team in Microsoft Teams, and writes an audit record to Dataverse.
Why it matters: Agents lose time hunting the KB. Delivering the top matching articles straight into the conversation lets them answer faster and more consistently — and enables self-service deflection.
Built API-first as FlowLibs CF-534. Ships Off (demo). Going live requires only authorizing the connections and setting the environment-variable values. Flow Checker: 0 errors / 0 warnings.
Use Case
A support team with a searchable knowledge base (indexed in Azure AI Search with an integrated vectorizer) wants every new Intercom conversation to arrive with the top matching help-center articles attached for the agent — plus an optional AI-drafted reply they can review and send.
Flow Architecture
When a new conversation is created
Intercom — TrigNewConversation (batch poll, 3 min, splitOn body)Fires once per newly created Intercom conversation.
Initialize Ids & Search Text
Initialize Variable / ComposeMint a guid() correlation id; capture conversation id and contact id; compose the inbox deep link; initialize the raw question (opening message HTML, fallback to subject) and a clean HTML-stripped search query; init top-articles count (default 3) and HTML/text accumulators.
Get Contact Details
Intercom — GetLeadContact name + email for personalization.
Search Knowledge Base
Azure AI Search — IntegratedVectorSearchTop matching KB articles (bare array).
Build Article Lists
Compose / Foreach (concurrency 1)Compose article count and build the HTML + plain-text article lists.
Post Internal Note
Condition + Compose + HTTP — POST /conversations/{id}/replyWhen at least one article matches, post the article suggestions as an internal note and mark it posted.
Draft Reply If Enabled
Condition + Azure OpenAI — ChatCompletions + HTTP noteOptional grounded deflection draft posted as a second internal note.
Notify Support Team
Microsoft Teams — PostMessageToConversationChannel alert with the deep link + article count.
Log Suggestion
Compose / Microsoft Dataverse — CreateRecordAssemble the audit row (whole-object bind) and write the audit record.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_IntercomApiBase | String | https://api.intercom.io | Intercom REST base (for the note HTTP calls). |
| flowlibs_IntercomApiToken | String | <configure> | Intercom access token (Bearer). |
| flowlibs_IntercomVersion | String | 2.11 | Intercom-Version header value. |
| flowlibs_IntercomAdminId | String | <configure> | Author id for the internal note. |
| flowlibs_IntercomWorkspaceId | String | <configure> | Builds the inbox deep link. |
| flowlibs_AzureSearchIndexName | String | kb-index | Azure AI Search KB index name. |
| flowlibs_AzureSearchVectorField | String | text_vector | Vector field used for integrated vector search. |
| flowlibs_AOAIDeployment | String | gpt-4o | Azure OpenAI deployment (draft reply). |
| flowlibs_AOAIApiVersion | String | 2024-02-15-preview | Azure OpenAI API version. |
| flowlibs_TeamsGroupId |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Intercom | shared_intercom | TrigNewConversation GetLead |
| Azure AI Search | shared_azureaisearch | IntegratedVectorSearch |
| Azure OpenAI | shared_azureopenai | ChatCompletions_Create_2024Feb15Preview |
| Microsoft Teams | shared_teams | PostMessageToConversation |
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.
- Index fields
- The search returns title, url, content. Adjust the selectFields array in Search Knowledge Base and the list-builder expressions if your index uses different field names.
- Keyword vs. vector
- IntegratedVectorSearch does hybrid keyword + vector retrieval and needs an integrated vectorizer on the index. For pure semantic ranking, swap to SemanticHybridSearch (same connector, adds a semanticConfiguration param).
- Auto-deflect
- For high-confidence matches, send the top article link to the customer directly (change the note's message_type from note to comment).
- RAG reply
- The optional Azure OpenAI step drafts a reply grounded only in the retrieved articles; tune the system prompt, temperature, and max_tokens, or disable it with flowlibs_EnableDraftReply = false.
- Feedback loop
- Extend the Dataverse table to capture which suggestions agents actually used, to improve ranking over time.
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 query (cleaned)
Opening message with common HTML stripped.
EXPR.02First article url
IntegratedVectorSearch returns a top-level array, not a value-wrapped object.
EXPR.03Article count
Count of returned articles, coalesced to an empty array.
EXPR.04AI draft reply
Extract the chat completion content.
EXPR.05Conversation deep link
Build the Intercom inbox conversation URL.
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.