slackapi / slackapi/java-slack-sdk

Workflows, Slack Apps and forms

Open
#1,528 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triage-skip question untriaged
Dominant language
Java
Stars
602
Forks
232
Avg merge
4d 9h
Merged PRs (30d)
7

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

  1. 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
  2. Someone from the team presses a dedicated Claim button
  3. The issue is discussed in a thread
  4. Once resolution is reached - a Resolve button is clicked and the supported request is considered solved.
  5. 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)
  6. 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:

  1. I cannot trigger a Slash command from workflow - due to architecture constraints I presume
  2. So I tried sending an Ephemeral message upon receiving app.function call with a button to open my custom developed form with the help of app.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:

  1. have a private channel where the app is installed
  2. collect a form richtext data and use "Send a message to" that private channel step
  3. provide a link to that message to the app as input param
  4. app parses the link to get channelId and ts of the message
  5. 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:

  1. user triggers workflow
  2. my app sends an Ephemeral message with a button to open the form
  3. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests; start by reproducing the workflow with com.slack.api:bolt:1.46.0 and tracing app.function and app.blockAction payloads. Check the reported triggerId, richtext, and AttachingFunctionTokenEnabled behavior. The issue does not define a clear code change or acceptance test, so completion would need maintainer clarification.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.