π How to Post and Refresh Salesforce Records in Microsoft Teams Using Centro
This guide walks you through how to use Salesforce Flow and Centro to automatically post Opportunity records to an Account’s Microsoft Teams chat—and dynamically refresh those records when changes occur in Salesforce.
π― Use Case
You want to:
Post a new Opportunity record block to a Teams chat linked to the associated Account.
Automatically update (refresh) the record block in Teams when Opportunity fields (like Amount or Stage) change.
π§© Prerequisites
Microsoft Teams and Salesforce connected via Centro.
Opportunity and Account objects with linked conversations enabled.
Centro component installed and configured in your Salesforce org.
π Step 1: Post New Opportunity Records to Teams
Flow Type: Record-Triggered Flow on Opportunity Create
Key Steps:
Run Asynchronously to prevent UI lag.
Get Linked Conversation:
Use a "Get Records" element to pull the linked conversation based on the
AccountId
of the Opportunity.Map the Centro channel ID to a variable (
channelId
- Text).
Decision Element:
Check if the
channelId
variable is NOT null.
Send Notification via Centro:
Use the
channelId
variable.Attach the Opportunity record using Centro’s "Post Record Details".
Optionally include a message.
β Outcome: When a new Opportunity is created, a record block is posted to the Account's chat in Teams.
π Step 2: Refresh the Record Block on Update
Flow Type: Record-Triggered Flow on Opportunity Update
Trigger Conditions:
When important fields like
Amount
orStage
are updated.
Key Steps:
Run Asynchronously.
Get Linked Conversation:
Link the Opportunity to its existing Centro conversation (created in the first flow).
Set both
channelId
andmessageTimestamp
variables.
Decision Element:
Ensure
channelId
exists before proceeding.
Send Notification via Centro:
Use
channelId
andmessageTimestamp
.Enable “Update Message” in the options.
Include updated Opportunity details and optional emoji/message changes to confirm updates visually.
β Outcome: The original record block in Teams is updated, keeping your team informed in real time.
π¬ Need Help?
Reach out to our support team or contact us for personalized assistance with your setup.