-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Hey there!
I've been trying to implement a seemingly straightforward Slack application but have faced so many blocks from the Slack side so I decided it would be a good idea to step back and ask you if I'm doing something completely wrong here.
I'm building an app to process internal support requests - quite simple functionality
- User submits a request using a form (incl. richtext field) - I coded the form using the SDK. This is being sent as a message to the channel from where the flow was triggered
- Someone from the team presses a dedicated Claim button
- The issue is discussed in a thread
- Once resolution is reached - a Resolve button is clicked and the supported request is considered solved.
- The app dynamically beautifies the message on every step (e.g. on step 2 it would update the original message with the name of the person who claimed)
- In the app I collect all the info and store it for future analytics
Originally I built it as a Slash command thinking that it is the fastest way to test it all out. However since this bot is designed for not only tech users I decided that the easiest way to run it would be to have a dedicated Workflow that I can then feature in the given channel - so that a big green button will appear in the chat.
And that's where the hurdles really started:
- I cannot trigger a Slash command from workflow - due to architecture constraints I presume
- So I tried sending an Ephemeral message upon receiving
app.functioncall with a button to open my custom developed form with the help ofapp.blockAction
app.blockAction("support", (req, ctx) -> {
try {
final var channelId = req.getPayload().getContainer().getChannelId();
final var triggerId = req.getPayload().getTriggerId();
only to find out that req.getPayload().getTriggerId() is null if a msg was posted by workflow - another architecture constraints? okay
3. Next, I decided to abandon my carefully crafted form and re-create it in Slack directly - only to find out that I cannot pass Richtext from a Form to Workflow input parameters due to, err, I assume one more architecture constraint?
So, now I'm experimenting with some super complicated workflow which involves a Form that is then sent somewhere, so that I can get the richtext description and have it sent to my app. Still trying it out, so unsure if it works out or not in the end.
what worked in the end is the following:
- have a private channel where the app is installed
- collect a form richtext data and use "Send a message to" that private channel step
- provide a link to that message to the app as input param
- app parses the link to get
channelIdandtsof the message - app finds the message and get rich text out of it
so that the rest of the flow can happen. Quite cumbersome, I must admit
My question is - am I doing something totally wrong here or missing something very obvious?
I'm more than happy to share some code snippets if required
edit 2
I later discovered an option called AttachingFunctionTokenEnabled which I set to false, which allowed me to implement option 2 from my list. So my latest workflow is like this:
- user triggers workflow
- my app sends an Ephemeral message with a button to open the form
- user presses on the button and that opens a form generated by my app
2 step process is a bit less user-friendly, but at least not super "hacky"
still, would love to hear a feedback if there is yet another config I might not know of to allow workflows to open the forms
Reproducible in:
mvn dependency:tree | grep com.slack.api
gradle dependencies | grep com.slack.api
java -version
sw_vers && uname -v # or `ver`The Slack SDK version
com.slack.api:bolt:1.46.0
Java Runtime version
openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Corretto-25.0.0.36.2 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Corretto-25.0.0.36.2 (build 25+36-LTS, mixed mode, sharing)
OS info
#85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.