This is a library for integrating Slack in your flow function for test.flows.network.
```rust use slackflows::{channelmsgreceived, sendmessagetochannel};
pub fn run() { if let Some(sm) = channelmsgreceived("myworkspace", "mychannel") { sendmessageto_channel("myworkspace", "mychannel", format!("Hello, {}", sm.text)); } } ```
In run()
the channel_msg_received
will create a listener for new message from channel mychannel
in workspace myworkspace
.
When a new message is sent to mychannel
, the run()
will be called again. We get the SlackMessage
then send_message_to_channel
.
The whole document is here.