Graphrt

SendGrid

Send email from simple fields or dynamic templates (global or EU host), templates, global stats, suppression lists and unsubscribe groups, agent sends need an opt-in and an optional recipient allowlist, raw sends are node only

Beta v0.1.0 Node.js 12 actions ToS risk low
Use in Graphrt Desktop

About

A Graphrt plugin for the Twilio SendGrid v3 Web API. It sends email from simple fields or a dynamic template and reads templates, delivery stats, suppression lists and unsubscribe groups. Built with the declarative REST layer.

What it can do

  • send_mail: from/to/cc/bcc/reply_to, subject, text and/or html, or a template_id (d-...) with dynamic_template_data, categories, send_at (up to 72 h ahead), unsubscribe group (asm_group_id) and sandbox_mode (validate without delivering). The plugin builds SendGrid's personalizations body.
  • send_mail_raw (node only): any full mail/send body (many personalizations, attachments, tracking settings).
  • Templates: list_templates (dynamic by default, paginated), get_template (all versions).
  • Stats: get_global_stats per day, week or month.
  • Suppressions: list_bounces, list_blocks, list_spam_reports, list_invalid_emails, list_global_unsubscribes (time range and address-prefix filters, offset pagination), list_unsubscribe_groups.
  • api_request: any other v3 endpoint (GET only for agents, and only under an allowlist of read paths).

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Send email sendgrid.send_mail
  • Send email (raw body) sendgrid.send_mail_raw
  • List templates sendgrid.list_templates
  • Get template sendgrid.get_template
  • Email stats sendgrid.get_global_stats
  • List bounces sendgrid.list_bounces
  • List blocks sendgrid.list_blocks
  • List spam reports sendgrid.list_spam_reports
  • List invalid emails sendgrid.list_invalid_emails
  • List global unsubscribes sendgrid.list_global_unsubscribes
Show all 12 actions
  • List unsubscribe groups sendgrid.list_unsubscribe_groups
  • SendGrid v3 API request sendgrid.api_request

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • SENDGRID_API_KEY Required
    API key (SG....)
  • SENDGRID_REGION Optional
    global (default, api.sendgrid.com) or eu (api.eu.sendgrid.com, for EU regional subusers)
  • SENDGRID_TOOL_ALLOW_SEND Optional
    1 lets agent tools call send_mail
  • SENDGRID_TOOL_RECIPIENT_ALLOWLIST Optional
    Comma-separated addresses or @domains agent tools may send to (to, cc and bcc)

How to use it

In Graphrt Desktop

  1. Open Plugins and search for SendGrid.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install sendgrid
workflow.yaml
- id: welcome
  type: sendgrid.send_mail
  from: hello@example.com
  from_name: Example
  to: ["{{#start.email#}}"]
  template_id: d-0123456789abcdef0123456789abcdef
  dynamic_template_data: { first_name: "{{#start.name#}}" }
- id: plain
  type: sendgrid.send_mail
  from: ops@example.com
  to: ["oncall@example.com"]
  subject: Nightly report
  text: All jobs passed.
Plugins in the docs