> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Edit canvas

> Apply one content or title change to a Slack Canvas.

`slack.editCanvas` applies one edit operation per Slack API call. Workspace plan restrictions and the caller's Canvas permissions still apply.

## Example

```ts automations/edit-slack-canvas.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { slack } from "automate.ax/slack"

export default automation("Append canvas section", () => {
  onDashboardRun({ title: "Append canvas section" })

  slack.editCanvas({
    canvasId: "F01234567",
    change: {
      documentContent: { markdown: "## Next steps", type: "markdown" },
      operation: "insert_at_end",
    },
  })
})
```

## Inputs

| Input                          | Type                                             | Required | Description                                                                                                                                                  |
| ------------------------------ | ------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `canvasId`                     | `string`                                         | Yes      | Stable Slack Canvas ID.                                                                                                                                      |
| `change`                       | Canvas edit operation                            | Yes      | One `insert_after`, `insert_before`, `insert_at_start`, `insert_at_end`, `replace`, `delete`, or `rename` operation with its required content or section ID. |
| Second argument: `{ account }` | `string \| IntegrationAccountReference<"slack">` | No       | Slack binding.                                                                                                                                               |

## Output

Returns no value after Slack accepts the edit.
