azureazure-logic-appsslackslack-apislack-block-kit

Anyone managed to post a Slack Block message using the inbuilt Logic App slack steps


Starting out with Azure logic apps and i have started off with Slack messaging. Logic Apps seems to have a few pre-built steps in relation to Slack , one of them is to post a message to a slack channel and this seems to work fine. I have been trying to get it to post a block message ( its the fancier Slack messages that can have buttons etc in them) but i have had no luck - it seems to just be posting the actual json text.

This is how the slack block message is currently displayed in Slack

enter image description here

Has anyone made it work ? Wondering if i should abandon the in-built step and just create my own and see if i can get that to work.


Solution

  • According to the chat.postMessage API, attachments, blocks, and text are different arguments:

    Arguments

    Only message text seems to be accepted by the Post message (V2) action in Logic Apps:

    Message text

    Therefore, if you need to use attachments or blocks, you seem to need to use the Web API and not the connector.