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.
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 Run on Slack functions.
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
.Enhancements
install
and deploy
commands to use the selected workspace token.get
and delete
datastore methods to use id
instead of the name of the primary_key
Enhancements
slack uninstall
command, you will now receive a warning message confirming that all of the data related to this app will also be deleted (i.e. the app's related workflows, functions, and datastores). See update here.slack manifest validate --verbose
, you are now prompted to choose an AppID. This change fixes a bug where an app manifest may have previously been validated against an incorrect AppID. Since each app may have a slightly different manifest depending on what stage of development it's in (for example, a local development app vs. a deployed app), you can now specify the app to validate your local project's manifest against.<email
and user_id>
flag that adds or removes a user directly, e.g. slack collaborator add U123456789
or slack collaborator add iuseslack@mycompany.com
.slack create
and choose our Scaffolded app to familiarize yourself more closely with datastores on the new Slack platform.Breaking change
Beginning January 26th, 2023, you must specify all domains you'll use for remote HTTP requests in the outgoingDomains
property of your app's manifest. outgoingDomains
will be enforced on all workspaces for Slack-hosted apps. Previously, outgoingDomains
was only enforced on workspaces with Admin-Approved Apps enabled.
When does this happen?
outgoingDomains
will be enforced on all workspaces for Slack-hosted apps.hooks.slack.com
was being implicitly added as an approved outgoing domain on AAA-enabled workspaces. After January 19th, 2023, it will be removed from that list and will need to be added explicitly as an outgoing domain if your functions make network requests to hooks.slack.com
.How should I get ready?
deno-slack-hooks
dependency to v0.7.0
, the slack run
command will enforce your app's outgoingDomains
setting locally.slack run
. If you recieve a "Requires net access to <domain_name>" error message, add the listed domain to your outgoingDomains
setting and try again. Once you're done, redeploy it using the command slack deploy
.Other changes
AO12345678
instead of text, e.g. Status: Installed
.slack manifest validate
no longer throws requires_request_url
or requires_socket_mode_enabled
errors when validating the Hello World starter template manifest.Enhancements
slack workspace default
command.enterprise_id
as a parameter to application functions (and their interactivity handlers) in the deno-slack-sdk. See all available function context parameters here.placeholder
text for the following Block Kit elements: channels_select, conversations_select, multi_channels_select, multi_users_select, and users_select.Enhancement
Enhancements
slack activity
command to now support selecting local app development application.--secret
flag to slack external-auth add-secret
command warning message text.slack-debug-[date].log
file will log the response and request. No other activity will be logged.slack-debug-[date].log
file.Bug fix
slack run
or slack activity --tail
, the command will exit once a timeout is reached.Enhancements
slack trigger info
command to CLI to display trigger ID, type, name, and URL e.g. slack trigger info --trigger-id "Ft123ABC456"
.slack feedback
command to CLI. We would love to know about your experience (good or not so good) using the Slack CLI. Use this command to submit feedback or submit it directly here.slack-debug-20220915.log
. This log file will be accessible in the .slack/logs
folder on your computer. Note: The CLI will auto-cleanup log files older than one week from the .slack/logs
folder.Bug fixes
slack trigger
and slack workspace
command will return an 'Error: unknown command' if an invalid command is executed e.g. slack trigger <invalid_command>
or slack workspace <invalid_command>
.slack auth
and slack collaborators
default to slack auth list
and slack collaborators list
command if no additional arguments are passed in the command.Breaking changes
Please update your app in accordance with the changes outlined below to ensure that it continues to work as expected.
FunctionHandler
is no longer exported. Use the SlackFunctionHandler
type when building custom functions instead. Alternatively, use the new SlackFunction
helper included in this release.DefineType()
no longer accepts callback_id
as a property. The callback_id
has been deprecated in favor of name
.options.client_secret_env_key
property has been removed from DefineOAuth2Provider()
in favor of using the add-secret
CLI command. If you are using client_secret_env_key
, you can remove it and then use add-secret
instead to provide the value.SendDm
SendMessage
SendEphemeralMessage
Both text
and rich_text
are still supported.block_actions/view_submission/view_closed
interactivity event payload:
body.user.username
body.trigger_id
body.token
body.is_enterprise_install
body.app_unfurl
body.workflow_step
body.trigger_info
body.trigger_id
, use body.interactivity.interactivity_pointer
instead.uri
has been renamed to url
for the string
type. If you're using format: "uri"
as either an OpenForm
input field or top-level string parameter in a custom function, please update to format: "url"
.Other changes
reverse-string
app template has been removed.slack run
. On workspaces that don't require admin approval to install apps, slack run
will start a local development server without first having to have an admin accept the Terms of Service.interactive_blocks
has been added to the following Slack functions:
SendDm
SendMessage
SendEphemeralMessage
slack run
watches for filesystem changes.