This is reference content about building functions and workflows. Learn more if you're not yet familiar with this new Slack platform paradigm.

share_canvas

Share a canvas

Facts

Schema ID

Schema.slack.functions.ShareCanvas

Schema reference

slack#/functions/share_canvas

Input parameters

Required parameters
Select a canvas
Select access level. Options are view or edit.
Optional parameters
Select channels. Maximum is 10.
Select people. Maximum is 10.
Add a message

Output parameters

Optional parameters
Canvas link

Usage guide

This function allows you to share a canvas to users and channels.

The app using this function will need the following App Home features set in the app manifest file:

features: {
  appHome: {
    messagesTabEnabled: true,
    messagesTabReadOnlyEnabled: false,
  },
},

For information about the expanded_rich_text type that you can use to update your canvases, refer to expanded_rich_text.

Example workflow step:

const shareCanvasStep = ExampleWorkflow.addStep(
  Schema.slack.functions.ShareCanvas,
  {
    canvas_id: "CAN123456",
    channel_ids: ["C111AAA111","C222BBB222"],
    user_ids: ["U333DDD333","U444EEE444"],
    access_level: "edit",
    message: [
      {
        "type": "rich_text",
        "elements": [
          {
            "type": "rich_text_section",
            "elements": [{
              "type": "text",
              "text": "Sharing the create canvas",
            }],
          },
        ],
      },
    ],
  },
);