- Overview
- UiPath GenAI Activities
- Release notes
- About the UiPath GenAI Activities package
- Project compatibility
- Content Generation
- Update Context Grounding Index
- Context Grounding Search
- Summarize Text
- PII Filtering
- Translate
- Detect Language
- Rewrite
- Generate Email
- Categorize
- Named Entity Recognition
- Image Analysis
- Detect Object
- Signature Similarity
- Sentiment Analysis
- Reformat
- Semantic Similarity
- Image Comparison
- Image Classification
- Working with UiPath GenAI activities
- Supported models
- Frequently asked questions
- Act! 365
- ActiveCampaign
- Adobe Acrobat Sign
- Adobe PDF Services
- Amazon Bedrock
- Amazon Connect
- Amazon Polly
- Amazon SES
- Amazon Transcribe
- Anthropic Claude
- Asana
- AWeber
- Azure AI Document Intelligence
- Azure Maps
- BambooHR
- Box
- Release notes
- About the Box activity package
- Project compatibility
- Add Shared Link to File
- Add Shared Link to Folder
- Search for Content
- Cancel Sign Request
- List Sign Requests
- Create Sign Request
- Resend Sign Request
- Upload File Version
- Copy File
- Delete File
- Download File
- Get File Info
- Get Folder Items
- Upload File
- Copy Folder
- Create Folder
- Delete Folder
- Delete Record
- Get Record
- Insert Record
- Replace Record
- List All Records
- Brevo
- Calendly
- Campaign Monitor
- Cisco Webex Teams
- Citrix ShareFile
- Clearbit
- Confluence Cloud
- Constant Contact
- Coupa
- Customer.io
- Datadog
- Deputy
- Discord - Preview
- DocuSign
- Drip
- Dropbox
- Dropbox Business
- Egnyte
- Eventbrite
- Exchangerates
- Expensify
- Facebook
- Freshbooks
- Freshdesk
- Freshsales - Preview
- Freshservice
- GetResponse
- GitHub
- Google Maps
- Google Speech-to-Text
- Google Text-to-Speech
- Google Vertex
- Google Vision - Preview
- GoToWebinar
- Release Notes
- About the GoToWebinar activity package
- Project compatibility
- Delete Webinar
- Get Webinar
- Get Webinar Meeting Times
- Get Webinar Registrant
- Get Webinar Start URL
- List Account Webinars
- List All In Session Webinars
- List All Webinar Attendees
- List All Webinar Registrants
- List All Webinars
- Quick Create Webinar
- Quick Update Webinar
- Search Recording Assets
- Delete Record
- Get Record
- Insert Record
- List All Records
- List Records
- API References
- Greenhouse
- Hootsuite
- HTTP Webhook
- Hubspot CRM
- HubSpot Marketing
- iContact
- Insightly CRM
- Intercom
- Jira
- Release notes
- About the Jira activity package
- Project compatibility
- Create Issue
- Add Issue Attachment
- Download Issue Attachment
- Get Instance Details
- Add Comment
- Get Comments
- Get Issue
- Search Issues by JQL
- Update Issue
- Update Issue Assignee
- Find User by Email Address or Display Name
- Update Issue Status
- Delete Record
- Get Record
- Insert Record
- List All Records
- Replace Record
- Upsert Record
- Invoke Operation
- Delete Issue
- Event Trigger
- Keap
- Klaviyo
- LinkedIn
- Mailchimp
- Mailjet
- MailerLite
- Mailgun
- Marketo
- Microsoft Azure OpenAI
- Microsoft Dynamics CRM
- Microsoft Sentiment
- Microsoft Teams
- Release Notes
- About the Microsoft Teams activity package
- Project compatibility
- Create Channel
- Invite Member to Channel
- List All Channels
- Send Individual Chat Message
- Reply to Channel Message
- Create Online Teams Meeting
- Send Channel Message
- Send Group Chat Message
- Get Channel by Name
- Get Individual Chat
- Get Team by Name
- Invite User to Team
- List All Channel Messages
- List All Chat Messages
- List All Team Members
- Get Online Teams Meeting
- List All Recordings
- List All Transcripts
- Download Meeting Transcript/Recording
- List All Records
- Insert Record
- Update Record
- Get Record
- Delete Record
- Technical references
- Microsoft Translator
- Microsoft Vision
- Miro
- Okta
- OpenAI
- Oracle Eloqua
- Oracle NetSuite
- Release Notes
- About the Oracle NetSuite activity package
- Project compatibility
- Delete Record
- Get Record
- Insert Record
- List All Records
- Update Record
- Create Basic Company Customer
- Create Basic Company Vendor
- Create Basic Contact
- Create Basic Individual Customer
- Create Basic Individual Vendor
- Create Basic Support Case
- Update Basic Company Customer
- Update Basic Company Vendor
- Update Basic Contact
- Update Basic Individual Customer
- Update Basic Individual Vendor
- Update Basic Support Case
- Customer Created
- Customer Updated
- Record Created
- Record Updated
- Support Case Raised
- Support Case Updated
- Vendor Created
- Vendor Updated
- PagerDuty
- Paypal
- PDFMonkey
- Pinecone
- Pipedrive
- QuickBooks Online
- Quip
- Salesforce
- Release Notes
- About the Salesforce activity package
- Project compatibility
- Create Account
- Update Account
- Create Contact
- Update Contact
- Create Lead
- Update Lead
- Create Opportunity
- Upload File
- Download File
- Search Records
- Get Opportunity
- Get Lead
- Get Contact
- Get Account
- Add File to Record
- Create Bulk Upload Job
- Get Bulk Job Info
- Starts or Aborts Bulk Job
- Download SOQL Bulk Job Results
- Download Unprocessed Records of Bulk Upload
- Create Bulk Download Job Using SOQL
- Search Using String
- Get Object Fields
- Insert Record
- Get Record
- Delete Record
- Update Record
- List All Records
- Salesforce Marketing Cloud
- SAP BAPI - Preview
- SAP Cloud for Customer
- SAP Concur
- SAP OData - Preview
- SendGrid
- ServiceNow
- Release Notes
- About the ServiceNow activity package
- Project compatibility
- Troubleshooting
- Create New Incident
- Create Incident Task
- List All Incidents
- Update Incident
- Add Attachment
- Download Attachment
- Get Incident Task
- Get Attachment
- List All Attachments
- List All Incident Tasks
- Update Incident Task
- When an Event Happens
- Delete Attachment
- Delete Record
- Get Record
- Insert Record
- List All Records
- Update Record
- Incident Created
- Incident Updated
- Incident Task Created
- Incident Task Updated
- Record Created
- Record Updated
- Shopify
- Slack
- Release Notes
- About the Slack activity package
- Project compatibility
- Create Channel
- Invite Users to Channel
- Remove User from Channel
- Send File to Channel
- Send Message to Channel
- Send Message to User
- Send Reply
- Send Button Response
- Create User Group
- Get User
- List All User Groups
- List All Users
- Set Channel Topic
- Join Channel
- Archive Channel
- Create Group Direct Message
- Get Channel Info
- Button Clicked
- Trigger an automation using the HTTP Webhook connector when a message is posted to Slack
- Use Slack Buttons when an opportunity is won in the CRM system
- Troubleshooting
- SmartRecruiters
- Smartsheet
- Release notes
- About the Smartsheet activity package
- Project compatibility
- Attach URL to Sheet
- Add Column
- Update Column
- Add Row
- Update Row
- Get Sheet
- List All Sheets
- Attach File to Comment
- Search Everything
- Update Sheet
- Create Sheet from Template
- Send Sheet Via Email
- List All Folders
- Download Attachment
- Attach File to Row
- Attach URL to Row
- Attach File to Sheet
- List All Workspaces
- List All Attachments
- Delete Row
- Download Sheet
- Search Sheets
- Insert Record
- Get Record
- List All Records
- Delete Record
- Snowflake
- Stripe
- Sugar Enterprise
- Sugar Professional
- Sugar Sell
- Sugar Serve
- TangoCard
- Todoist
- Trello
- Twilio
- IBM WatsonX
- WhatsApp Business
- WooCommerce
- Workable
- Workday
- Workday REST
- X (formerly Twitter)
- Xero
- Release notes
- About the Xero activity package
- Project compatibility
- Create Contact
- List All Contacts
- Add Attachment to Contact
- Get Balance Sheet Report
- Get BAS Report
- Get GST Report
- Get Bank Summary Report
- Get Aged Receivables by Contact Report
- Get Attachments of a Contact
- Get Budget Summary Report
- Get Profit and Loss Report
- Get Trial Balance Report
- Get Executive Summary Report
- Get Aged Payables by Contact Report
- List Reports
- Delete Record
- List All Records
- Get Record
- Insert Record
- Replace Record
- Youtube
- Zendesk
- Zoho Campaigns
- Zoho Desk
- Zoho Mail
- Zoom
- ZoomInfo
Use Slack Buttons when an opportunity is won in the CRM system
Summary: Use Slack Buttons when an opportunity is won in the CRM
Applications: Slack, Salesforce
Description
Slack buttons allow you to create an inbuilt review/approval mechanism and trigger automations from Slack messages by just clicking a button. Anyone can effectively use human intervention at key decision or touch points and choose among 1-5 automations (with the help of 1-5 buttons) involving complex systems such as CRM, ERP, ITSM, HR, Finance, etc., by triggering them from Slack messages, without logging into that respective system.
Here are some key use cases taking advantage of Slack buttons:
- When an opportunity is closed and won in Salesforce, choose whether to initiate or create an invoice or a sales order in QuickBooks or NetSuite, or send a sales agreement via DocuSign, or email a supplier via Outlook, by triggering the respective automation with the help of a Slack button.
- When a time-off request is raised in an HR tool such as Bamboo HR, approve or deny the time-off request with the help of a Slack button.
- When an expense report or claim is created in SAP Concur, approve or reject the report with the help of a Slack button.
- When a customer support request is raised in the help channel of Slack, create a Jira/Zendesk ticket or notify the team or user group with the help of a Slack button.
- Every week, using a time-based trigger, create an email campaign in Mailchimp and send a test email for manager or peer review, who in turn can approve or reject the scheduling or sending of the email campaign to the target audience with the help of a Slack button.
- When a GitHub pull request (PR) is raised for peer review, approve or reject the PR with the help of a Slack button.
The first workflow uses Slack activities, such as Send Message to Channel, and the Salesforce: Opportunity Closed and Won trigger.
The second workflow uses Slack activities, such as Send Button Response, Send Reply, and Button Clicked, along with Salesforce activities, such as Get Account, Get Opportunity, and Search Records, an Oracle NetSuite Create Basic Company Customer activity, and Create Envelope Using Template from DocuSign.
-
Open Studio Web and create a new project.
-
Select the More options menu on the Manual trigger and select Change trigger.
-
From the trigger catalog, select Salesforce: Opportunity Closed and Won. In this trigger activity:
- Set up your Salesforce connection.
- Add any additional filters, if needed.
- You can also rename
the trigger activity to something more representative of your use
case.
- Add the Slack Send Message to Channel activity to your workflow. At this step, you want to
pass the output of the previous trigger activity as variables in the Slack
message. In the activity:
- In the Channel
field, select the respective channel from the drop-down list or
enter the exact channel name (without
#
). - In the Message field, type the main section text message. For example: "Congratulations team! We have won the below opportunity."
- In the Send as field, select either Bot, to send the message as a bot, or User, to send the message as the current authenticated user on Slack.
- In the Message
fields, enter the opportunity ID and name in
key:value
pairs, separated by a comma. Change the label of Opportunity ID and Opportunity Name to bold using Slack markdown formatting For example:*Opportunity ID*:<opportunity ID>;
*Opportunity Name*:<opportunity name>
- where
<opportunity ID> and <opportunity name> are
variables retrieved from Salesforce trigger.
- where
<opportunity ID> and <opportunity name> are
variables retrieved from Salesforce trigger.
- In the Buttons actions fields, enter two button actions for
Approve Invoice and Send Sales Agreement. Add the action ID
(required), action name (required), style (primary/danger),
confirmation title, confirmation text, confirm ok title, confirm
deny title, in a comma-separated format:
aks1,Approve Invoice,primary; aks2,Send Sales Agreement,danger,Confirm,Are u sure?,Yes,No
aks1,Approve Invoice,primary; aks2,Send Sales Agreement,danger,Confirm,Are u sure?,Yes,No
- In the Channel
field, select the respective channel from the drop-down list or
enter the exact channel name (without
- You are now ready to publish
or run the project. Select the Publish button at the top of the
workflow and enter the details such as Automation name, Description, and
Workspace. The Version is updated automatically.
-
Open Studio Web and create a new project.
-
Select the More options menu on the Manual trigger and select Change trigger.
- From the trigger catalog,
select Slack: Button Clicked. In this trigger activity:
- Set up your Slack connection.
- It is mandatory to select either a Channel or a User for this trigger, to restrict the button events to a particular channel or from a particular user.
- Add any additional filters, if needed.
- You can also rename
the trigger activity to something more representative of your use
case.
- Add the Salesforce Get Opportunity
activity to your workflow. In the first workflow, we entered the opportunity
ID and opportunity name as a Slack message field. The same information must
be retrieved from the Button Clicked output response. In
the activity:
- For the
Opportunity field, select See more icon to change input
type and select Use variable. Under the Button Clicked
output, search for the field > field2_text property. This
is the value of Opportunity ID.
Note: In the first workflow, message fields are passed in
key:value
pairs separated by a comma. Each message field in the Button Clicked response (irrespective of key or value) will be sequentially assigned, i.e. ifkey1:value1; key2:value2; key3:value3
were passed in Message fields,key1
is assigned tofield1
,value1
is assigned tofield2
,key2
is assigned tofield3
,value3
is assigned tofield4
,key3
is assigned tofield5
,value3
is assigned tofield6
and so on.
- For the
Opportunity field, select See more icon to change input
type and select Use variable. Under the Button Clicked
output, search for the field > field2_text property. This
is the value of Opportunity ID.
- Add a Salesforce Get Account
activity to your workflow. At this step, you want to pass the output of
previous activity as input for retrieving the primary account details. In
the activity:
- For the
Account field, select See more icon to change input
type and select Use variable. Under the Get
opportunity output, select the Id property.
- For the
Account field, select See more icon to change input
type and select Use variable. Under the Get
opportunity output, select the Id property.
- Add an If activity to your workflow. Now you want to
filter or add an if condition to check on the Slack button that was clicked.
In this activity:
- Select the Condition field, select See more icon to change input type and select Use variable. Under the Button clicked output, select Button actions1 > text property.
- Select the Equals operator.
- For the third column, type "Approve Invoice". Remember that in the first workflow we passed Approve Invoice as one of the button action names.
- Click
Save.
- For the Then branch,
add the Oracle NetSuite Create Basic Company Customer
activity to your workflow. At this step, you want to pass the output of the
previous Get Account activity as input for creating a customer record in
NetSuite. In the activity:
- For the Name field, select See more icon to change input type and select Use variable. Under the Get account response, select the name property.
- For the Subsidiary field, select any of the available options.
- For the Phone
field, select See more icon to change input
type and select Use variable. Under the Get account
response, select the phone property.
- Still under the Then
branch, add a Slack Send Button Response activity. At this
step, you want to use the Response URL output of the Button
Clicked trigger as input for replacing/deleting the original
Button message sent in the first workflow. This restricts the
button click to a one time only and not allow multiple button clicks. In the
activity:
- Select Button response URL, select See more icon to change input type and select Use variable. Under the Button Clicked response, select the Button > response URL property.
- For the Response type field, select In channel. This sends a message in the channel that can be seen by others. The Ephemeral option is used to send a message that can be seen only by the user who clicked the button and not others in the channel.
- Set the Replace original field to True, to replace the original button message (sent in the first workflow).
- For the
Message field, type a message by dynamically passing the
user name who clicked the button and the NetSuite customer created
in the previous step. For example:
"<username> has approved the creation of <customer name> in NetSuite for Sales Order or Invoice processing"
- where <username> is retrieved from the output of Button Clicked, and <customer name> is retrieved from the output of Create Basic Company Customer.
- Next, for the Else
branch of the If activity, add a Salesforce Search Records activity to your
workflow. At this step, you want to retrieve the primary contact name and
email of the customer retrieved in the Get Account. In the activity:
- For the Select object field, select Contact.
- Select Manage Properties, select Where and click Update fields.
- Select the
Where field, now displayed on the canvas, to open the
filter builder.
- In the first column, select Account ID.
- Select the Equals (=) operator.
- For the third column, use a variable. Select the Id property under the Get account response.
- Click
Save.
- Still under the Else
branch, add a DocuSign Create Envelope Using Template activity to your
workflow. Now you pass the primary contact name and email of the customer to
send a sales agreement for e-sign. In the activity:
- For the Template field, select the respective template for sales agreement.
- For the Status field, select Send to create and send the envelope for signature. The Draft option only creates the envelope in draft but doesn't send it.
- For the Email subject field, type the respective subject. For example: "Welcome to our family! Please sign the Sales Agreement!".
- For the Recipient legal name field, select See more icon to change input type and select Use variable. Under the Search Records response, select First Contact Record > Name property.
- For the Recipient
email field, select See more icon to change input
type and select Use variable. Under the Search Records
response, select First Contact Record > Email
property.
- In the same Else
branch, add the Slack Send Reply activity to your workflow. At this step, you want to
pass the user name, channel ID, message timestamp of the Button Clicked event
and account, opportunity information from the previous Salesforce
activities. In the activity:
- For the Channel field, select See more icon to change input type and select Use variable. Under the Button Clicked response, select Button > channel id property.
- For the Message timestamp field, select See more icon to change input type and select Use variable. Under the Button Clicked response, select Button > message ts property.
- For the
Message field, type a message by dynamically passing the
user name who clicked the button, the account name, and the
opportunity name and ID. For example:
"<username> has sent the sales agreement to the <account name> for the below opportunity: <opportunity ID> - <opportunity name>"
- where <username> is retrieved from the Button Clicked response, <account name> is retrieved from Get Account, and <opportunity ID> and <opportunity name> are retrieved from Get Opportunity response.
- You are now ready to publish
or run the project. Select the Publish button at the top of the
workflow and enter the details such as Automation name, Description, and
Workspace. The Version is updated automatically.