LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send Jason Message for Slack

Hi

My goal is to post something on Slack from my Labview Code.

I found that Slack supports JSON requests in order to post something.

 

curl -X POST -H 'Content-type: application/json' --data '{"text":"Hello, World!"}' https://hooks.slack.com/services/T0000000000/XXXXXXXXXXX/xxxxxxxxxxxxxxxxxxxx

You can see the instruction I received from Slack in the attachment. I'm really struggling how to put that into useable form.
I found this: https://forums.ni.com/t5/LabVIEW/Send-a-json-string-to-an-HTTP-in-labview/td-p/3102347?profile.langu...

But If I just enter this code in the text field it doesn't work. Can someone push me in the right direction?

 

Thanks,

Slaxx

0 Kudos
Message 1 of 2
(1,381 Views)

I think you are looking for something like this.

 

 

snippet.png

 

 

Also, The POST vi returns header and body of the returned message from the server. This may give a hint why it's not working.

Message 2 of 2
(1,362 Views)