Open jpaulgale opened 2 months ago
Hey @jpaulgale! 👋 Super interesting use case and this seems possible using a custom function and the built-in open form function!
I'd recommend the following flow with a few more workflow-related features if that's alright. It'll still requires an extra step before opening a modal, but after an LLM response is received:
message_ts
and channel_id
from the event trigger
b. Gather message contents using conversations.history
with inclusive: true
, limit: 1
, latest: message_ts
, and channel: channel_id
c. Ask the LLM to perform the needed magic
d. As output, return the task_name
and due_date
interactivity
returned as an output.interactivity
from step 3!This is suggested with more automation features in mind as the Deno SDK supports this well, but the same can be accomplished with other means of gathering message text and opening modals if that's preferred. Please let me know if this works for you or if you have other questions!
Question
Upon message shortcut being triggered in a message, I am looking to
I can't seem to figure out how to A) access the message text in the workflow.ts B) send to the LLM prior to the OpenForm step
Thank you for your time!
Context
Documentation on slack.com is confusing to me inre: what is for Bolt vs what is for deno-slack-sdk.
I've created the app, gotten it to successfully send placeholder text (and text from OpenForm if I use that as the first step) to openai, but I cannot seem to access the message text or understand how to include a step prior to OpenForm, which is leading me to think views.open is the way, as per the below documentation:
https://api.slack.com/automation/forms https://api.slack.com/automation/interactive-messages https://api.slack.com/automation/interactive-modals#open-block-kit-action
Environment
cat import_map.json | grep deno-slack "deno-slack-sdk/": "https://deno.land/x/deno_slack_sdk@2.11.0/", "deno-slack-api/": "https://deno.land/x/deno_slack_api@2.4.0/",
deno --version deno 1.43.3 (release, aarch64-apple-darwin) v8 12.4.254.13 typescript 5.4.5
sw_vers && uname -v ProductName: macOS ProductVersion: 14.4.1 BuildVersion: 23E224 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030