A step-by-step guide to creating a Salesforce Flow that uses an Agentforce Context Protocol (ACP) backed Invocable Action to send a Slack notification for new Leads.
ACPSlackActions
channelId
(Text): The ID of the Slack channel to post to.messageText
(Text): The content of the message.success
(Boolean): Indicates if the message was sent successfully.errorMessage
(Text): Contains an error message if success
is false.Lead
A record is created
None
(or you can add conditions like Status
equals Open - Not Contacted
if needed).Actions and Related Records
(This is generally suitable for this type of Flow).
e. Click Done.channelId
:
C0123456789
). For a real-world scenario, you might store this in a Custom Setting or Custom Metadata Type and retrieve it in the Flow.messageText
:
Text Template
leadNotificationMessage
$Record > Lead
.messageText
input will now be populated with your template.success
and errorMessage
:
Variable
slackPostSuccess
Boolean
Available for output
(or input, as needed)success
output to this slackPostSuccess
variable.errorMessage
(Data Type: Text), creating a variable like slackPostErrorMessage
.slackPostSuccess
is false.success
output. If false, you could:
errorMessage
to a custom object.channelId
, retrieve it from a Custom Setting, Custom Metadata Type, or even a field on a related record.