Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.96 KB

built_in_functions.md

File metadata and controls

55 lines (36 loc) · 1.96 KB
title order slug lang layout permalink
Built-in functions
4
built-in-functions
en
tutorial
/future/built-in-functions

Built-in functions BETA

Slack provides built-in functions you can use alongside your [custom functions](/bolt-js/future/custom-functions) in a Workflow. Built-in functions are essentially Slack-native actions, like creating a channel or sending a message, that work hand-in-hand with your 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.


Using with Workflows {#workflows}

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.


Built-in functions list {#list}

You can view a full list of built-in functions here.


Next steps {#next-steps}

Now that you've taken a dive into built-in functions, you can explore custom functions and what they have to offer. ✨