Crate sendgrid_flows

source ·
Expand description

SendGrid integration for Flows.network

Quick Start

To get started, let’s write a very tiny flow function.

use openai_flows::{Email, send_email};
use slack_flows::{listen_to_channel};

#[no_mangle]
pub fn run() {
    listen_to_channel("myworkspace", "mychannel", |sm| {
        let email = Email {
            to: vec!["receiver@domain.com"],
            subject: "Hi",
            content: sm.text
        };
        send_email("sender@domain.com", email);
    });
}

When the Slack message is received, send email using send_email.

Structs

  • Struct for the email.

Functions

  • Send email with provided email parameter.