> ## 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.

# Look up canvas sections

> Find section IDs within a Slack Canvas.

`slack.lookupCanvasSections` finds sections by contained text, section type, or both. Use the returned IDs with `slack.editCanvas`.

## Example

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

export default automation("Find canvas owners", () => {
  onDashboardRun({ title: "Find canvas owners" })

  slack.lookupCanvasSections({
    canvasId: "F01234567",
    containsText: "Owners",
    sectionTypes: ["h1", "h2"],
  })
})
```

## Inputs

| Input                          | Type                                             | Required | Description                                      |
| ------------------------------ | ------------------------------------------------ | -------- | ------------------------------------------------ |
| `canvasId`                     | `string`                                         | Yes      | Stable Slack Canvas ID.                          |
| `containsText`                 | `string`                                         | No       | Text that matching sections must contain.        |
| `sectionTypes`                 | `SlackCanvasSectionType[]`                       | No       | One or more documented Slack section categories. |
| Second argument: `{ account }` | `string \| IntegrationAccountReference<"slack">` | No       | Slack binding.                                   |

## Output

Returns `{ sectionIds }` with every matching Slack section ID.
