Approval-Driven Salesforce Status Update
When an approval completes (e.g., discount approval, contract terms change), automatically updates the corresponding Salesforce record's status/stage field and posts a confirmation to the deal's Teams channel.
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 implements an approval-gated Salesforce record update pattern. When triggered manually with a Salesforce record ID and approval details, it routes an approval request to a configured approver. Based on the approval outcome, it updates the Salesforce record's status/stage field to either the approved or rejected value, then posts a confirmation message to a Teams channel.
Use Case
Discount approvals, contract terms changes, opportunity stage gates, or any scenario where a Salesforce field update requires human sign-off before proceeding.
The flow is ideal for teams that:
- Sales teams that need manager sign-off on discounts before updating opportunity stages
- Operations teams gating contract terms changes behind a formal approval
- Any team that wants an auditable, Teams-notified approval step before mutating a Salesforce record
Flow Architecture
Manual trigger
Manually trigger a flow (Button)Started on demand with three text inputs: Salesforce_Record_ID (required), Approval_Title (required), and Approval_Details (optional justification/context).
Initialize variables (parallel)
5x InitializeVariableLoads env var values into flow variables in parallel: Salesforce object type, status field name, approved value, rejected value, approver email, Teams group ID, and Teams channel ID.
Start Approval
Approvals - StartAndWaitForAnApprovalSends a Basic approval to the configured assignee (flowlibs_ApprovalAssignedToEmail) with the record ID and details, then waits for the response.
Check Approval Outcome
If conditionBranches on body/outcome equals 'Approve'.
- Update SF Record Approved — Salesforce PatchItem_V3 sets the configured status field to the approved value (e.g., StageName = Closed Won).
- Post Approved To Teams — Posts a green checkmark confirmation message to the configured Teams channel.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SalesforceObjectType | String | Account | Salesforce object API name to update (e.g., Account, Opportunity, Case). |
| flowlibs_SalesforceStatusField | String | StageName | API name of the field to update on approval outcome (StageName for Opportunity, Status for Case, etc.). |
| flowlibs_SalesforceApprovedStatus | String | Closed Won | Value written to the status field when the approval is approved. |
| flowlibs_SalesforceRejectedStatus | String | Closed Lost | Value written to the status field when the approval is rejected. |
| flowlibs_ApprovalAssignedToEmail | String | approver@yourcompany.com | Email address of the user who receives the approval request. |
| flowlibs_TeamsGroupId | String | <configure> | Object ID of the Microsoft Teams team that will receive outcome notifications. |
| flowlibs_TeamsChannelId | String | <configure> | ID of the Microsoft Teams channel that will receive outcome notifications. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Approvals | shared_approvals | StartAndWaitForAnApproval (Sends a Basic approval and blocks until the assignee responds.) |
| Salesforce | shared_salesforce | PatchItem_V3 (Updates the configured status field on the target Salesforce record.) |
| Microsoft Teams | shared_teams | PostMessageToConversation (Posts approved/rejected notification to the configured Teams channel.) |
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.
- Swap the Salesforce object and status field
- Change flowlibs_SalesforceObjectType (e.g., from Account to Opportunity or Case) and flowlibs_SalesforceStatusField together (e.g., StageName, Status, custom__c) so the same flow can drive approvals across any SObject without editing the actions.
- Tune approved/rejected values per environment
- Set flowlibs_SalesforceApprovedStatus and flowlibs_SalesforceRejectedStatus to your team's actual stage/status picklist values (e.g., 'Approved - Closed Won' / 'Lost - Discount Denied'). No flow edit required.
- Route approvals to a group or shared mailbox
- Update flowlibs_ApprovalAssignedToEmail to a distribution list, group email, or shared mailbox to fan the approval out to multiple potential approvers.
- Point notifications at the right deal room
- Set flowlibs_TeamsGroupId and flowlibs_TeamsChannelId to the team/channel that should see the outcome (e.g., a per-deal channel or a central Sales Ops channel).
- Enrich the approval body
- Edit the Start Approval action to include extra context (current SF stage, amount, account name) by adding a Get record action before Start Approval and concatenating fields into the details parameter.
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.