---
title: "canvas_update_content"
summary: "This function updates the content of a canvas. Either canvasid or channelid must be provided, but not both. Which one is needed is based on the canvasupdatetype. If the canvasupdatetype is set to standalone, then a canvasid should be provided. If canvasupdatetype is set to channelcanvas, then a channelid should be provided. The default value of canvasupdate_type is standalone."
url: "https://docs.slack.dev/tools/deno-slack-sdk/reference/slack-functions/canvas_update_content"
type: "guide"
---

Source: https://docs.slack.dev/tools/deno-slack-sdk/reference/slack-functions/canvas_update_content

# canvas_update_content

## Facts {#facts}

**Description**Updates a canvas

**Schema**`Schema.slack.functions.CanvasUpdateContent`

**Schema reference**`slack#/functions/canvas_update_content`

**Required scopes**

[`chat:write`](https://docs.slack.dev/reference/scopes/chat:write.md)[`im:write`](https://docs.slack.dev/reference/scopes/im:write.md)[`chat:write.public`](https://docs.slack.dev/reference/scopes/chat:write.public.md)[`groups:write`](https://docs.slack.dev/reference/scopes/groups:write.md)[`canvases:read`](https://docs.slack.dev/reference/scopes/canvases:read.md)[`canvases:write`](https://docs.slack.dev/reference/scopes/canvases:write.md)

## Input Parameters {#input-parameters}

### Required Input Parameters

**`action`**`Schema.types.string`Required

How do you want to update? Options are `append`, `prepend`, or `replace`. Default is `prepend`.

**`content`**`Schema.slack.types.expanded_rich_text`Required

Content to add to the canvas

### Optional Input Parameters

**`canvas_id`**`Schema.slack.types.canvas_id`Optional

Select a canvas in cases when `canvas_update_type` is set to `standalone`.

**`canvas_update_type`**`Schema.types.string`Optional

Type of update. Options are `standalone` or `channel_canvas`. Default is `standalone`.

**`channel_id`**`Schema.slack.types.channel_id`Optional

Select a channel in cases when `canvas_update_type` is set to `channel_canvas`.

**`section_id`**`Schema.types.string`Optional

Choose which section to update

## Output Parameters {#output-parameters}

### Required Output Parameters

**`canvas_id`**`Schema.slack.types.canvas_id`Required

Canvas link

## Usage info {#usage-info}

This function updates the content of a canvas. Either `canvas_id` or `channel_id` must be provided, but not both. Which one is needed is based on the `canvas_update_type`. If the `canvas_update_type` is set to standalone, then a `canvas_id` should be provided. If `canvas_update_type` is set to `channel_canvas`, then a `channel_id` should be provided. The default value of `canvas_update_type` is standalone.

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](https://docs.slack.dev/reference/types/expanded_rich_text-type.md).

### Example workflow step {#example-workflow-step}

```
const updateCanvasStep = ExampleWorkflow.addStep(  Schema.slack.functions.CanvasUpdateContent,  {    action: "append",    content: { inputs.content },    canvas_update_type: "standalone",    canvas_id: "CAN1234ABC"  },);
```
