Unable to send Slack block messages

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to send Slack block messages

L0 Member

I've been trying to send a block message from the SlackBlockBuilder automation. However, when I try to test it out via the debugger panel, it would result in an error.

Spoiler
Reason
Error from Scripts is : Script failed to run: Timeout Error: Docker code script failed due to timeout, consider changing timeout value for this automation, Error: write |1: file already closed (2604) (2603)
Similar error happens with SlackV3's send-notification command when you use its blocks parameter:
Spoiler
Reason
Error from SlackV3 is : Script failed to run: Timeout Error: Docker code script failed due to timeout, consider changing timeout value for this automation, Error: Failed to decode (loop) data from docker code script: unexpected EOF This may happen when you don't return an explicit entry (or entries) from a script. for entry structure please review the 'Script Helper' (2605) (2604) (2603)

The command works fine without the block parameter, though:
Spoiler
Message sent to Slack successfully. Thread ID is: [redacted]
 
For what it's worth, I tried debugging this on my VM and inspected the instance's log there. It said something along the lines of "cached context has expired." Screenshot of the log is attached.
 

Could anyone assist me with this issue? Thanks!
Cortex XSOAR 
1 accepted solution

Accepted Solutions

L4 Transporter

If you want to send a Slack block, you need to create an incident rather than test on a debugger, just due to how the entitlements are handled in the playbook debugger.  This is a known limitation.

View solution in original post

3 REPLIES 3

L4 Transporter

If you want to send a Slack block, you need to create an incident rather than test on a debugger, just due to how the entitlements are handled in the playbook debugger.  This is a known limitation.

L1 Bithead

Hi @gyldz ,

So, how do I create an incident so that Slack Block gets sent to the Slack channel?

 

Yeah, I discovered shortly after creating this thread that you must test this on an existing incident rather than using the debugger panel. They didn't really make this clear in the documentation. Ended up wasting hours trying to find the cause. 😕

@KHassan, you can test it on any kind of incident. Just create a playbook with the SlackBlockBuilder task in it, then open an incident and change the playbook in the Work Plan tab.

  • 1 accepted solution
  • 1878 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!