Help needed: duplicate Slack messages, including their blocks, from one channel to another

In short
I am attempting to duplicate Slack messages, including their blocks, from one channel to another. Unfortunately, I am encountering an error with the message Function 'getBlocksData' finished with error! JSON for blocks is invalid. I am currently investigating the cause of this issue.

Complete use-case
Our organization has established a Slack channel for the centralization of monitoring messages from various sources, including NodeJS and Python backend applications, SaaS monitoring tools, and automation tools. The messages are reviewed and analyzed by designated human observers.

In order to enhance client focus, we aim to duplicate relevant messages into individual client-specific channels. This will enable our Account Managers to effectively track and follow up on client-related issues on a per-client basis. Despite recognizing the limitations of Slack for this purpose, I have been assigned to implement this solution after considering and evaluating alternative tools such as DataDog and Kibana.

:footprints: ** Steps taken***
I have established a scenario that includes a Slack Public Channel Watcher and a Router, followed by a Slack Create Message action that only processes filtered input. This setup is functioning as intended.

However, the Slack messages consist of Slack Blocks, and I am encountering difficulties in duplicating these blocks, with the said error message. I have conducted research to locate a function similar to JSON.Stringify() to resolve this issue, but have been unsuccessful thus far.

Could someone assist me in resolving this issue?

:camera_flash: Relevant screenshots

This error occurred because empty data was being sent via the Slack “Create a message” module.

Please make sure that the mapped variables in the text field contain data.

Or there can be some rogue invisible character, causing the error.

I would recommend running our DEV tool right after the error run and see if you can spot something off in the code.

(unfortunately, this can be done only during the live run

Here is a link to the dev tool (F12 to press after the run)

1 Like

I would suggest using the slack make api call option.
It should pull all the nested collections, and you could use the map function combined with string functions. Then use the make API call to send to another channel.

1 Like

Thank you so much for taking the time to provide an answer to my previous question. I really appreciate it.

Regarding your suggestion of using the Slack Make API Call option, could you please provide me with more details on how this solution works and how it can be used to pull all the nested collections? Specifically, could you explain to me how the map function combined with string functions can be used in this context?

This is what I have now. Error message is different, but the output seem to be the same.

Thank you for your time and assistance.

Best regards,


1 Like

Hi everyone,

I wanted to let you know that I created a new thread in the forum asking for an issue ticket to be opened to investigate this issue (link).

While I was able to work around the problem by using the format defined in the Slack API Call module, this solution is far from ideal. I would prefer a generic solution that would accept any type of Blocks formatted message.

Unfortunately, I am still struggling to understand how to use the map and string functions properly. If anyone has any guidance or resources they could share with me, it would be greatly appreciated.

Thank you for your time and attention to this matter. I look forward to hearing any updates or solutions.

1 Like

Hey @SebastienFi! :wave:

Have you been able to find a solution that meets your needs and expectations? Feel free to let us know!

Thank you :pray:

Hi @Michaela
I haven’t found a reliable solution that solves this problem. I have a found a workaround, but this is far from ideal and does not fully meet our use-case. The messages have to be tigthly coupled which is a problem because we have many (hundreds) kind of messages.

Hey there, @SebastienFi! :wave:

Thank you so much for the update! I’m genuinely sorry to hear that you haven’t found a solution that meets your specific needs. However, don’t lose hope just yet!

Our community is filled with talented and creative folks, and it’s entirely possible that someone may step in with some brilliant ideas that could be a perfect fit for you. So, let’s keep our fingers crossed. :crossed_fingers: