You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use blocks in a slack message <client.PostMessage()>. But I am unable to figure out how it is supposed to be done. Every time i get a "invalid arguments" error.
I'm not certain, but I think Attachment might be producing two levels of blocks fields in the JSON data. One created by this field and another by the BlockSet field within that.
Brief intro
I am trying to use blocks in a slack message <client.PostMessage()>. But I am unable to figure out how it is supposed to be done. Every time i get a "invalid arguments" error.
Sources/articles referred
I am referencing these sources
[git-repo blocks example](https://github.com/slack-go/slack/blob/master/examples/blocks/blocks.go
an article about how to use blocks
another article about using blocks
Sample code - how i am approaching this
Here is the sample code i used for adding blocks
`// func to build msg body & post it on slack
`
`// func where i build the blocks
`
P.S.
I also tried using json data, and unmarshalling it. But i am unable to get "blocks" which i can pass to <SendCustomMshToChannel()> function.
What's the mistake in this approach. How should it be done correctly. Any suggestions would be greatly welcomed :)
The text was updated successfully, but these errors were encountered: