slackapi / deno-slack-sdk

SDK for building Run on Slack apps using Deno
https://api.slack.com/automation
151 stars 27 forks source link

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

Open mcsescott opened 4 months ago

mcsescott commented 4 months ago

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.

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

filmaj commented 4 months ago

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

rafaelamsili commented 4 months ago

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

mcsescott commented 3 months ago

Thanks @rafaelamsili

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