Smartsheet New Comment to Teams Thread
When a comment (discussion) is added to a Smartsheet row, the flow posts it to a mapped Teams channel thread with the row context and a link, and mirrors Teams replies back as row comments where possible. Keeps Smartsheet row discussions visible to the team in Teams.
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 solution keeps Smartsheet row discussions visible to the team in Microsoft Teams, and brings the conversation back. It is a bidirectional, event-driven pipeline built as two cloud flows + one Dataverse mapping table in a single solution: - Forward — when a comment is added to a Smartsheet discussion, it is posted into a mapped Teams channel with the row/discussion context and a link to the sheet. - Reverse — when someone replies to that message in Teams, the reply is mirrored back onto the originating Smartsheet discussion as a comment (where the discussion can be resolved). A Dataverse table records the Teams-message to Smartsheet-discussion mapping so a reply can be routed back to the right discussion. A correlation id threads both hops together for tracing.
Why it matters: Comments buried in Smartsheet rows go unseen by people who live in Teams. Surfacing them — and round-tripping replies — keeps the discussion where the team already works without anyone leaving Teams.
Use Case
Operations and project managers track work in a Smartsheet sheet and collaborate in Teams. They want every new row comment to appear in a Teams channel automatically, and want their Teams replies to land back on the Smartsheet row so the audit trail stays complete on both sides.
Flow Architecture
When a new comment is added to the Smartsheet (Flow A)
Smartsheet — OnNewCommentBatch poll, splitOn body/data — fires once per new discussion comment on the sheet.
Initialize Correlation Id + Teams/Sheet/Email/Prefix vars
Initialize VariableMints a guid() trace id and loads env-var values and the echo-loop marker.
Initialize Match Window Minutes
Initialize Variable (Integer = 5)Configurable recency window for resolving the discussion.
Get Sheet Discussions
Smartsheet — GetDiscussionsForSheetLists discussions so the just-commented one can be resolved (the comment trigger does not return a discussion id).
Filter Just Commented Discussion
Query (Filter array)Keeps discussions commented within the match window.
Compose Target Discussion Id / Title / Teams Message
ComposeBest-effort discussion id + row/discussion title; builds the Teams card (author, comment text, link).
Condition Not A Mirrored Comment
Condition (If)Skips comments created by the reverse flow — prevents an echo loop.
Post Comment To Teams
Microsoft Teams — PostMessageToConversationPosts the card; returns the Teams message id.
Create Map Record
Microsoft Dataverse — CreateRecordStores comment to Teams-message mapping keyed on the message id.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SmartsheetSheetId | String | <configure> | The watched sheet — trigger + discussion ops. |
| flowlibs_SmartsheetSheetPermalink | String | https://app.smartsheet.com/sheets/REPLACE... | Sheet link shown in the Teams card. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Target Teams team (group) id. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Target Teams channel id. |
| flowlibs_NotificationEmail | String | alerts@yourcompany.com | Optional audit-email recipient. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Smartsheet | shared_smartsheet | OnNewComment GetDiscussionsForSheet AddCommentToDiscussion |
| Microsoft Teams | shared_teams | OnNewChannelMessage PostMessageToConversation |
| Microsoft Dataverse | shared_commondataserviceforapps | CreateRecord ListRecords |
| Office 365 Outlook |
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.
- Tighten discussion resolution
- Lower Match Window Minutes on a busy sheet, or extend Flow A to call GetDiscussion and match by comment id for an exact (non-heuristic) discussion link.
- @mention the row owner
- Enrich the Teams card to @mention the discussion owner returned by GetDiscussionsForSheet.
- Keyword filter
- Add a condition so only comments containing certain keywords are posted to Teams.
- Strip HTML on reply
- Teams reply content is HTML; add a Compose to strip tags before writing the Smartsheet comment if plain text is preferred.
- Scope replies
- Restrict Flow B to specific channels or authors, or skip replies from the flow bot, by extending Condition Is A Reply.
- Swap the audit email
- Replace the Outlook notifications with a Teams adaptive card or a Dataverse-only audit by removing the SendEmail actions.
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.01Resolve just-commented discussion (Filter where)
Matches the most recently commented discussion within the window.
EXPR.02Teams message id captured for mapping
Captures the Teams message id for the map record.
EXPR.03Reply lookup filter (Dataverse)
Looks up the originating discussion by parent message id.
EXPR.04Reverse comment text (loop-safe, prefixed)
Builds the prefixed reply text.
EXPR.05Echo-loop guard (Flow A)
Prevents re-posting mirrored comments.
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.