Files
2026-09-01 22:46:57 +00:00
..
2026-09-01 22:46:57 +00:00
2026-09-01 22:46:57 +00:00
2026-09-01 22:46:57 +00:00

Technique 4: Slack CLI Command

A service token is used to install and run Slack CLI commands directly from a GitHub Actions workflow with this technique.

Setup

For details on how to setup this technique in GitHub Actions, read the setup section of the docs.

Example workflows

  1. Deploy an app: Deploy to Slack on push to the main branch.
  2. Validate the app manifest: Check the app manifest on pull requests.
  3. Manage a collaborator: Add or remove an app collaborator using CLI and API techniques together.

Deploy an app

Deploy a Slack app when changes are pushed to the main branch. This example uses a service token to authenticate the deploy command.

Related files:

Validate the app manifest

Run manifest validation on pull requests to catch configuration issues early. This example checks the app manifest file in the repository.

Related files:

Manage a collaborator

Add or remove an app collaborator using a manually triggered workflow with workflow_dispatch. This example combines the Slack API technique (users.lookupByEmail, chat.postMessage) with the CLI technique (collaborators add/remove) to look up a user by email, update collaborators, and post a confirmation message.

Related files: