slackapi / deno-slack-sdk

SDK for building Run on Slack apps using Deno

Home Page:https://api.slack.com/automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUERY] What should Update Canvas built-in's `section_id` be? Also: a 'lookup' or 'get' canvas API would help.

mcsescott opened this issue · comments

The latest version of the SDK has functions available to update a canvas.

Specifically regarding updating a canvas with the canvas_update_content function, the documentation doesn't state what to use for a section ID.

  • Are the sections just in numerical order?
  • Is there a name for the sections?
  • Are they in array order (starting with 0) ?

Do we just use the text of the section header as the section_id ?

Better yet, being able to query a canvas with canvas_info function / API would be awsome!

Thanks in advance...

@mcsescott I am following up with the Canvas team to get information about your question, and I agree a 'lookup canvas' API method would be helpful and allow folks to at least discover the format/shape of canvas objects! I will file that as a feature request / feedback.

Hi @mcsescott the section_id is the id of the section in the canvas, currently you can get it going to the canvas itself and right-click on the header section on Copy link to section which will copy the link to the section, then the id of the section will be the part that goes after focus_section_id which should look something like temp:C:XIF49dce0e217054fcba25952634

Screenshot 2024-03-15 at 8 02 01 AM

Thanks @rafaelamsili

I tried that today, and it also solves the bug with Canvas workflows (from Workflow builder). Thanks for the tip!