This is a library for integrating SendGrid in your flow function for flows.network.
```rust use sendgridflows::{Email, sendemail}; use slackflows::{listento_channel};
pub fn run() { listentochannel("myworkspace", "mychannel", |sm| { let email = Email { to: vec![String::from("receiver@domain.com")], subject: String::from("Hi"), content: sm.text }; send_email("sender@domain.com", &email); }); } ```
When a new message is received from mychannel
, we will send an email using send_email
.
The whole document is here.