

Step 5: Add a Text Template to Construct Message Body


Under Outcome Details, enter the Label the API Name will auto-populate.On Flow Designer, click on the +icon and select the Decision element.Now we will use the Decision element to check the Record Variable from step 3 to check, if it returns the Message Destination record for account owner or not. Step 4: Using Decision Element to Check If the Slack Message Destination was Found or Not Choose the option to Automatically store all fields.Select the Slackv2_Message_Destination_c object from the dropdown list.Enter a name in the Label field the API Name will auto-populate.On Flow Designer, below the Yesnode, click on the +icon and select the Get Element element.Step 3: Adding a Get Record Element to Find Slack Id for the New Account Owner to Send a Direct Message When to Execute Outcome: If the condition requirements are met.Condition Requirements to Execute Outcome: All Conditions Are Met (AND).Under Outcome Details, enter the Label the API Name will auto-populate.Enter a name in the Label field the API Name will auto-populate.On Flow Designer, click on the + icon and select the Decision element.Optimize the Flow For Action and Related Records.Trigger the Flow When: A record is created or updated.Select the Record-Triggered Flow option, click on Create.

Select Flows, then click on the New Flow.Add Slack: Post Message action – to send a direct message to a Slack user.Add a Text Template to construct the message body.Add a decision element to check if the Slack message destination was found or not (from step 3).Add a get record element to find the Slack Id of the account owner to send a direct message.Add a decision element to check if the account owner has changed.Define flow properties for record-triggered flow.There are 6 steps to solve Martin’s business requirement using Record-triggered Flow. Let’s begin building this automation process. Please spend a few minutes to go through the following Flow diagram and understand it. The destination information will be passed into the Send to Slack invocable method, which will then send Salesforce data to the specified conversation in Slack.īefore discussing the solution, let me show you a diagram of a Process Flow at a high level. It consists of a specified Slack Workspace and Slack Channel. Object NameĪ Message Destination represents a conversation in Slack where Salesforce data will be shared. There are a few possible solutions for the above business scenario, but I’ll use After-save Record-Triggered Flow to solve the business requirement.īefore proceeding ahead, you have to understand the following objects. You can select the icons below the message field to add attachments, formatting, and more as you’re typing your message. DMs work well for one-off conversations that don’t require an entire channel of people to weigh in, like if you wanted to ask a teammate to reschedule a meeting. Especially for account owner Nathan Gilmore for current business sceanrio.ĭirect messages (DMs) are smaller conversations in Slack that happen outside of channels. The next step is to set up message destinations.The first step is to complete Salesforce for Slack integration.Message – Congratulations a new account 💰 has been assigned to you.GoC wants to send a direct message to the account owner on Slack when an account is assigned to them. Martin Jones is working as a System Administrator at Gurukul on Cloud (GoC). Use the decision element to validate the get records outcome.Send a direct message to a Slack user using the record-triggered flow.Use get records to avoid hard coding of Id.Post a Message to a Slack Channel using FlowĪfter reading this blog, you’ll be able to:.
