Your experience while developing next generation Slack apps is largely governed by the SDKs and the CLI. These tools change as the platform changes, and we release new versions regularly. Subscribe to be notified of updates, and let us know how we're doing.
function distribute
command.Starting today, the Slack API's minimum required CLI version for Enterprise Grid is changing from v1.18.0
to v2.9.0
. If you attempt to log in with an older version, you'll receive a cli_update_required
error from the Slack API.
Run slack upgrade
to get the latest version. Refer to install & authorize for more details about installing the Slack CLI.
We now support Slack's new look & feel! For the best experience, we recommend upgrading to CLI version 2.9.0+.
deploy
and install
your app by using the --org-workspace-grant
flag.--info
flag for a more streamlined experience.--app
and an active token via --token
flags.app list
no longer requires authentication, and will instead display an unknown
app status in cases where no authentication is found.run
, deploy
, and delete
commands will now resolve organization-level authentication in cases where workspace-level authentication is missing.slack trigger list --type=<string>
flag to only list triggers of a specific type:
slack trigger list --type=shortcut
--type=<string>
are all
, shortcut
, event
, webhook
, scheduled
, and external
.--help
to any command.
slack external-auth add-secret --provider github --secret my-secret-value
slack app list
to improve displaying apps that you are not authenticated to access:
(local)
labelStatus: Unknown
workflow
, function
, datastore
, customType
, event
or provider
. This helps prevent unexpected behavior at runtime..github
directory will no longer be included in new projects created from one of our sample apps.feedback@slack.com
- email us for assistance if your app returns an internal error code.slack app list
command now returns Status: Installed
instead of Status: Unknown
for an installed app.slack run
or slack deploy
in a non-interactive environment, regardless of how many triggers might exist.slack run
session.type
field of functions
and datastores
were made in the Deno SDK.slack app delete
command.--hide-triggers
flag to slack run
and slack deploy
to prevent retrieving and displaying application triggers.trigger list --limit <n>
command.named_entities
. The include-app-collaborators
flag will allow you to skip this prompt.slack activity
command to support datastore event and error logs. For more information, refer to logging.--token
flag is set, background checks for updates will now be automatically disabled.curl
install of deno
if deno upgrade
should fail.slack logout
command now accepts the --workspace
flag.--show-triggers
flag from the slack run
command, as the command now displays all of your app's triggers and their types.Breaking change
Beginning June 28, version v1.17.0 and below of the CLI is deprecated. We recommend reinstalling the CLI to get the latest version. Learn more.
-v
.-d
flag to bypass Deno installation in the Linux/macOS installation script.workspace
command with a new app
command.config-dir
global flag.auth
flag in favor of token
.app list
command to display installation status.external-auth remove
command now allows you to select a token for deletion.external-auth select-auth
command allows you to select a unique auth for each of the workflows in an app. This command is mandatory when using new in-code workflows that have a step containing credentialSource DEVELOPER
; that is, every time an in-code workflow is created, this command must be called after the external-auth add
command.slack auth token
and slack auth revoke
commands allow you to manage (create and delete) service tokens.
slack auth token
command allows you to get the slackauthticket
and to copy and paste it into your workspace to exchange for the service token.credentials.json
file; instead, it is presented in the prompt for you to copy and paste to your CI/CD pipelines.slack login --auth <your-service-token>
to authorize your Slack CLI.--token <token>
flag allows you to pass the service token used by requests requiring authentication. For example:
slack install --token <your-service-token>
slack trigger create --token <your-service-token> --app deployed --trigger-def triggers/trigger_def_file.ts
slack deploy --token <your-service-token>
--experiment [name,name,...]
flag.trigger info
now also shows who can run the trigger.--no-color
flag, which removes all ANSI sequences for color as well
as emojis, giving you plain text output from the CLI that's perfect for piping
to a text file.datastore query
command now supports a cursor
argument to help you
paginate your results the way you want.Today we're announcing that the next generation Slack platform–which provides a faster, more flexible way to build automations on top of Slack–is generally available to developers. The platform's overhauled architecture gives developers more ways to build, code, and ship custom apps and workflows more quickly and easily in an environment that's both secure and compliant. Read the announcement or follow the Quickstart to get started today!
CLI enhancements
login
flow instructions to be clearer for new developers.trigger_execution
log for greater readability.slack doctor
command to display the local git
version.slack help
command, but not to worry! Those hidden commands are still visible while using slack help -v
.Bug fixes
slack help deno
without any other arguments.--verbose
flag.create
experience for developers from installation to deployment.trigger create
or trigger list
for developers to invite their app to a channel to receive events, and formatted outputs when displaying trigger information.message_limit_exceeded
. The error code is included in the following endpoints when a free team has reached their message limit: callbacks.chat/postMessage, chat/postEphemeral, chat/postMessage, chat/scheduleMessage, chat/shareMessage, files/share, and drafts/create. For more information, refer to Usage limits for free workspaces.slack cloud
command to the slack platform
command. For more information, refer to commands.(dev)
with (local)
for local apps in the workspace list.slack workspace uninstall
command to slack workspace delete
.slack login --auth <string>
to log in.-a
for the --app
flag.slack auth info
command, as the pertinent information is found by using the slack auth list
command.slack samples
command, which will list the available sample app templates you can use to create a new app.CLI updates
open-form-response export
command, which generates a CSV of OpenForm responses.--app <id|env>
flag, which replaces the --local-run
flag.Other enhancements
function_runtime
to be undefined
instead of slack
.local
(from dev
).New functionality
datastore update
command. Where the put
datastore command replaces the entire record (matching what you might expect from an HTTP PUT call), the new update
command allows for field-level changes, leaving unspecified properties unchanged (matching what you might expect from an HTTP PATCH call).slack.json
with the config.trigger-paths
property.trigger create
or trigger update
now provides a file selection prompt when no file is specified.deploy
, run
, or env
commands, you can now use the --workspace
(-w
) flag to specify a target workspace. If omitted, the CLI will prompt you to select from your currently authorized workspaces. Ensure your app is authorized into your target workspace with slack auth list
; if you don't see your target workspace, create a new authorization with slack login
.Enhancements
activity
command now formats workflow_bot_invited
event types.external-auth remove
command.invalid_challenge
error.deploy
and run
commands. The upcoming breaking changes are outlined at the end of this changelog.create
command to better focus on next steps.Upcoming maintenance window
On March 13th, 2023, between 1pm and 5pm PST, we'll be making some security improvements behind-the-scenes on our end; no action is required from you. During this time, you may experience some lag or downtime with your functions deployed to Slack's managed infrastructure.
Upcoming breaking changes
The following breaking changes will ship April 6, 2023. Before April 6th, please update your app in accordance with the changes outlined below to ensure that it continues to work as expected.
Third-party authentication
credential_source
property to specify which user’s token should be selected or requested during workflow execution. For example:// OLD
const sampleFunctionStep = SampleWorkflow.addStep(SampleFunctionDefinition, {
user: SampleWorkflow.inputs.user,
googleAccessTokenId: {},
});
// NEW
const sampleFunctionStep = SampleWorkflow.addStep(SampleFunctionDefinition, {
user: SampleWorkflow.inputs.user,
googleAccessTokenId: {
credential_source: "DEVELOPER" // Add this by April 6th, 2023
},
});
Datastores
datastore:read
and datastore:write
scopes will no longer be auto added to your app manifest botScopes.apps.datastore.put
method will now overwrite the entire datastore item instead of only overwriting the individual fields included in the call. Use apps.datastore.update
to overwrite individual fields.primary_key
is the only required attribute, all other attributes will be treated as optional. Unhandled optional attributes may cause TypeScript errors in your code. If you'd like to migrate to optional attributes ahead of time, you can cast a DatastoreItem
:import { DatastoreItem } from "deno-slack-api/types.ts";
const response = await client.apps.datastore.get<typeof SampleObjectDatastore.definition>({
datastore: "SampleObjects",
id: sampleObject,
},
);
const item = resp.item as DatastoreItem<
typeof SampleObjectDatastore.definition
>;
resp.item.original_msg // is still required, but
item.original_msg // is now optional
Interactivity payloads
response_url
property will no longer be included in Block Kit interactivity action
& view_submission
payloads that are routed to function handlers. The Slack API client
provided to these handlers can call Slack’s messaging APIs directly.Slack functions
ReplyInThread
function provides a new way to reply to messages in thread. Instead of passing the message you want to reply to as the thread_ts
input parameter of SendDM
or SendMessage
, now you can pass that message into the message_context
input parameter of the ReplyInThread
function.InviteUserToChannel
has two new optional input parameters: user_ids
, an array of user IDs, and channel_ids
, an array of (you guessed it) channel IDs. The single value versions, user_id
and channel_id
, will be removed on April 6th, 2023.AddUserToUsergroup
and RemoveUserFromUserGroup
have one new optional input parameter: user_ids
, an array of user IDs. The user_id
input will be removed.Slack CLI
slack
that you may have in your system.slack logout
now revokes auth and refresh tokens.slack run
, slack deploy
, or slack collaborator list
prompt only for your workspace choice and then select the environment automatically depending on the command.Trigger updates
slack deploy
, a prompt to generate a trigger from a trigger definition file will appear if no triggers exist in this environment.slack triggers list
, each trigger's creation and last updated times are now included.workflow_not_found
.Other changes
DefineProperty
object wrapper to bring accurate typing to nested object properties and parameters.message_ts
and message_context
types were added to the Deno Slack SDK for stronger typing when handling messages.email
and url
now exist on the Slack.types.string
type, helping validate the inputs of function, forms, and workflows.client.apps.external.auth.get
method was added to the Deno Slack API for fetching external auth tokens with typeahead support.Important changes
outgoingDomains
property of your app's manifest.slack login
and paste the /slackauthticket
command into your workspace, instead of directly sending you back to the CLI, Slack will issue a verification code in the Slack client which you need to input into your CLI before you can complete the login. This does not break login for older versions. Additionally, existing logins in your credentials.json
file are not affected.Other changes
slack run
command, you will be prompted to generate a trigger. This prompt will not occur when running slack deploy
.schema_compatibility_error
on datastores_deleted
.datastore
command help text to be consistent with website documentation.channel_id
to grant or revoke access to triggers.datastore
command examples to not require the app_id
parameter, as the App Selector Prompt automatically adds the app_id
to the query.slack env add
and slack env remove
, instead of receiving a pesky error. When slack env add
prompts for the secret value, it uses a password-like input to hide the input value from the terminal screen to remove possible leakages of these values from the terminal history.slack create
to create from a template if Git is not installed.channel_not_found error
.