title | order | slug | lang | layout | permalink |
---|---|---|---|---|---|
Built-in functions |
4 |
built-in-functions |
en |
tutorial |
/future/built-in-functions |
Please note that some built-in functions may be restricted due to Workspace permission settings. Reach out to a Workspace owner if these aren't available to you.
Built-in functions need to be imported from the standard library built into the SDK — all built-in functions are children of the Schema.slack.functions
object. Just like custom Functions, built-ins are then added to steps in a Workflow using the addStep
method. That's it!
Built-in functions define their own inputs and outputs, as detailed for each built-in below.
Here's an example of a Workflow that creates a new Slack channel using the CreateChannel
built-in function:
const { DefineWorkflow, Schema } = require('@slack/bolt');
...
const createChannelStep = myWorkflow.addStep(
Schema.slack.functions.CreateChannel,
{
channel_name: myWorkflow.inputs.channel_name,
is_private: false,
},
);
Read the full documentation for Workflows to learn how to build out Workflows.
You can view a full list of built-in functions here.
Now that you've taken a dive into built-in functions, you can explore custom functions and what they have to offer. ✨