Skip to main content
欢迎参加 3 月 5 日至 6 日在旧金山举行的 TDX AI 代理时代开发者大会,或通过 Salesforce+ 参与。立即注册

Set Up Workflow Triggers

Learning Objectives

After completing this unit, you’ll be able to:

  • List the types of workflow triggers.
  • Identify use cases for workflow triggers.

Workflow Triggers

There are two required components of a workflow: triggers and steps. In this unit, learn how to set up a trigger for a variety of business processes.

Workflows can be initiated by an event, a user-initiated action, or on a schedule. A workflow trigger initiates your workflow. The trigger you pick for your workflow determines how it starts. Depending on the business process you’re automating, you can configure your workflow to begin from an event within Slack or from a third-party service.

To start the workflow, click to choose an event. You won't be able to add steps until after you’ve chosen the trigger event.

Once a workflow has been triggered, it starts a sequence of actions called steps. Learn more about steps in the next unit.

Types of Triggers

There are two types of triggers you can use to start a workflow: Slack events and Connector events. The trigger you choose depends on the business process you’re automating in Slack.

Trigger type

Description

Examples

Slack event

An event that happens within Slack.* The event can be user-invoked, like clicking a button or reacting with an emoji. Or it can start automatically at scheduled dates and times.

  • Clicking a link
  • Using an emoji reaction
  • Updating a list item
  • Joining a channel
  • Starting at a specific time

Connector event

An event that happens outside of Slack through a connected third-party service. The events available for workflow triggers are specific to each service.

  • Salesforce
  • Jira Cloud
  • Google Sheets
  • Google Calendar
  • Asana
  • GitHub
  • PagerDuty

*You can also trigger a workflow using a webhook that syncs an external event to your Slack workflow.

Slack Events That Trigger Workflows

Let’s dive deeper into the types of Slack events you can use to trigger a workflow.

Connector Events That Trigger Workflows

Connectors for Workflow Builder allow you to start a workflow in Slack based on events or actions that happen in a third-party service. Each connector offers triggers unique to that service, like when a record is updated in Salesforce or an issue is created in GitHub.

By connecting Slack workflows to your third-party services, you can streamline routine tasks to happen in one place with faster efficiency and less context switching. For example, this PagerDuty connector event starts a workflow when a new incident is created. It triggers the creation of a new incident channel in Slack, adds channel members, and sends a message to the channel with the PagerDuty incident variables.

A PagerDuty connector event starts a workflow when a new incident is created. It triggers the creation of a new incident channel in Slack, adds channel members, and sends a message to the channel with the PagerDuty incident variables.

There are different connector events available in Workflow Builder for many popular services. Below are just a few examples of connector events that can trigger a workflow in Slack. Open Workflow Builder in Slack to see all of your options.

Connector

Event

Workflow

Salesforce

  • When a record changes
  • On a schedule

Sends a direct message to the record owner when a record is updated in Salesforce.

Asana

  • When a project is created
  • When a task is created, assigned, updated, or completed

Sends a direct message to the assignee with a link to the assigned task.

GitHub

  • When a pull request is opened or merged
  • When an issue is created or closed

Archives the issue channel when an issue is closed.

PagerDuty

  • When an incident is created or resolved

Creates a new incident channel when a P1 issue is created and adds channel members.

If you’re a developer and you don’t see your third-party service in the list of connector events in Workflow Builder, you can create a workflow triggered by an event in an external service using a webhook.

Workflow triggers are required to initiate a workflow either using a Slack event (inside Slack) or a connector event (outside of Slack). Your trigger will initiate a series of steps that make up the workflow based on the business process you’re automating. In the next unit, you learn how to add one or multiple steps to your workflow.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈