Add Your First Integration

Guess what? It's Slack.


Don't worry about user identities

In the majority of common use cases, Sym will be able to fetch and persist user identities for any integration using a requestor's Slack email as a search key. For more information on how Sym handles user identities, see our advanced guide on Managing User Identity.


Here, we'll be doing two important things:

  1. Declaring our first Integration as a Terraform resource
  2. Using that integration to declare a destination for error messages

Declaring the Slack Integration

Remember that Slack app we installed? To use it, we'll have to link it to the rest of our workflow using a sym_integration:

resource "sym_integration" "slack" {
  type = "slack"
  # The `name` must be a unique identifier, so we recommend including the environment
  # in the name, so multiple environments do not have conflicting integration names.
  name = "${var.environment_name}-slack"

  external_id = var.slack_workspace_id

Note that we're also using a few variables from terraform.tfvars to help us out. Be sure to set slack_workspace_id to the same workspace ID you used to install the Sym Slack app:

slack_workspace_id = "CHANGEME"
environment_name   = "main"

Declaring the Error Logger

Now that we have a Slack Integration set up, we can use it to declare a sym_error_logger. When used by a Flow, the sym_error_logger will output any warnings or errors that occur during execution to a specified channel in Slack:

# Send errors during Flow execution to a shared logging channel
resource "sym_error_logger" "slack" {
  integration_id =  # Use the integration we just created!
  destination    = var.error_channel_name

The destination above can be any Slack channel name in the workspace that the integration points to. Set it to whatever works best for your organization in terraform.tfvars:

error_channel_name = "#sym-errors"

One Extra Variable

If you're following along with the example, you may have noticed there's one Slack-related variable we haven't talked about yet. We'll talk about flow_variables soon, but for now just note that the request_channel is where your Sym requests will show up.

flow_variables = {
  request_channel = "#sym-requests"  # Slack Channel where requests should go

Next steps

Now that Slack is all set, we can finalize the core setup.

  1. Set up Sym's Terraform Provider
  2. Configure your Terraform to work with Sym ← you are here
  3. Implement your first Flow

What’s Next