Hello everyone.
I’m currently working on an automation that, if a work item has gone 3 days or more without comments and is in certain statuses, sends a Slack DM to the assignee requesting updates.
The problem arises in the “Send direct message on Slack” action. When the automation runs, it throws the error: “We couldn't send the Slack direct message because some users couldn't be found or aren't valid in Slack.” I checked the users assigned to the work items that meet the conditions, and they are all active on both platforms, and Jira and Slack are properly synchronized.
When I test it with my own user, everything works fine, so I assume the issue happens when multiple users are involved. Any idea how to fix this?
This is my automation:
Is your rule in a Jira Service Management (JSM) space / project and operating on an Incident work item type? I believe that action only works for that case:
And, what do you mean by "multiple users" when you stated this?
When I test it with my own user, everything works fine, so I assume the issue happens when multiple users are involved. Any idea how to fix this?
Kind regards,
Bill
Hi Bill, thank you for the answer.
In the automation actions there are two options to send direct messages via Slack: one when an incident occurs (which is the one you mention), and this other one, whose behavior—at least from what I’ve tested—is quite similar but intended for more general use. This is the one I’m using.
Now, regarding multiple users: I’ve tested the automation with a manual trigger on a work item assigned to me, and I receive the message correctly. However, the current setup starts with a scheduled trigger that includes a JQL, and the goal is to send reminders to the users assigned to the work items returned by this JQL whose last comment was more than 3 days ago. This is where multiple users are involved and the error occurs, whereas doing it individually works fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm...interesting. Let's try a quick experiment with the Scheduled Trigger:
This might fault isolate if the problem is the users or the manner of looping from the scheduled trigger.
FYI -- Before that newer action was added to send direct Slack messages, the changes to the old Slack REST API prevented sending direct messages unless one stored the Slack user ID values somewhere in Jira (e.g., a user entity property). I believe only JSM has the correct mapping of users to Slack, which is why testing the above cases may help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scenarios 1 and 2 worked, but scenario 3 gave me the error again. Since all of them are Jira Software projects, I think the issue is due to the logic you mentioned at the end. Do you have any suggestions on how I should handle this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for testing those cases: I am not on a Premium license level as you appear to be.
With that level, have you confirmed the configuration to connect your Slack instance to your JSM?
For customers who do not have a Premium or Enterprise level for Jira / JSM, they must download all the Slack IDs and associate them to each user in Jira, such as described in this old article:
When only a few users need to be added for Slack access, this can be done instead with an automation rule to add the entity properties, such as I describe in this question:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! This has been very helpful in better understanding what is happening. I can see that the connection with Slack is correct, at least on the Jira side, but since I don’t have permissions in Slack, I’ll reach out to IT to validate everything. Thanks again for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.