1

I'm trying to simply get a message from one channel and forward it to another.

all I do is listen to messages on the channel, get the blocks, i.e.:

[{"type":"rich_text","block_id":"AHdW3","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"z"}]}]}]

and send them to another channel

client.chat.postMessage({
    blocks: blocks,
    channel: context.targetChannel,
  });

I'm getting an invalid_blocks error, even tho this must be valid blocks since they are generated by slack themselves.

any ideas here?

I also tried to remove the block_id but got the same result.

I'm using bolt framework btw, but that shouldn't matter.

1 Answer 1

1

Turns out the blocks from 1st client slack apps are rich_text, which isn't supported in the api.

so the way to go is grab the text from the message and post that as is.

See here for context

https://github.com/slackapi/bolt-js/issues/1324

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.