Get Statistics

sendgrid.get_stats
ActionEmailconnection required

Calls the SendGrid API with the connection's credentials.

Fetch global email statistics for a date range, aggregated by day, week or month, together with the summed metrics across the range.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
SendGrid
Secret shape
{"api_key": "…"}, or the API key on its own
Config it needs
from_email, from_name
Resolved by
config.connection_id, else node.connection_id

Configuration

5 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
start_date
First day to report on, as YYYY-MM-DD.
stringYes—matches ^\d{4}-\d{2}-\d{2}$2026-09-01
end_date
Last day to report on, as YYYY-MM-DD. Defaults to today.
stringNo—matches ^\d{4}-\d{2}-\d{2}$—
aggregated_by
How to bucket the statistics over the range.
stringNodayone of "day", "week", "month"—
limit
How many buckets to return.
numberNo—≥ 1—
offset
How many buckets to skip before returning.
numberNo—≥ 0—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "aggregated_by": "day",
  "start_date": "2026-09-01"
}

Output

One shape.

result

FieldTypeExample
items[].date
The day, week or month the bucket covers.
string—
items[].stats
The per-bucket metric objects SendGrid returns.
array—
count
How many buckets this response carries.
number—
totals
Every integer metric summed across the buckets, keyed by metric name.
object—
{
  "count": 0,
  "items": [
    {
      "date": "",
      "stats": []
    }
  ],
  "totals": {}
}

See Get Statistics run in a workflow.

In a technical demo we add the SendGrid connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.