Destination type
Gmail Destination
Use Gmail destinations when routed events should become email notifications, operational alerts, support handoffs, customer-facing messages, or manual review emails.
When to use this destination type
Choose GMAIL when the receiver target is Gmail send API. Destinations are outbound delivery targets: they do not decide whether a source request should be accepted, and they do not own connection filters or transformations. They own where the final delivery goes and how FastHook should authenticate, pace, disable, and inspect that delivery.
A destination can be reused by multiple connections when several source branches should feed the same receiver. Reuse keeps receiver capacity, credentials, and attempt evidence attached to one destination id.
FastHook dashboard fields
In the dashboard, create a destination, set Destination Type to GMAIL, then fill the fields below.
ToOne or more recipient templates, separated by line, comma, or semicolon.
Cc and BccOptional recipient templates for copied messages.
SubjectMessage subject with template tokens.
Text bodyPlain-text message body. Defaults to the event payload.
HTML bodyOptional HTML message body.
OAuth2 Gmail send accessGoogle OAuth connection with Gmail send permission.
API config fields
The REST API stores destination-specific behavior under config. Use PATCH for focused edits and PUT only when your request contains the full config you want to keep.
config.toRequired recipient template or list of recipient templates.
config.ccOptional cc recipient template or list.
config.bccOptional bcc recipient template or list.
config.reply_toOptional Reply-To address.
config.subjectSubject template. Defaults to FastHook event {{event_id}}.
config.text_templatePlain-text body template. Defaults to {{payload}}.
config.html_templateOptional HTML body template.
config.auth_typeGOOGLE_OAUTH_REFRESH_TOKEN.
config.authOAuth client credentials, refresh token, and gmail.send scope.
{
"name": "ops-email-alerts",
"type": "GMAIL",
"config": {
"to": [
"ops@example.com",
"{{payload.owner.email}}"
],
"cc": [
"support@example.com"
],
"subject": "FastHook event {{event_id}}",
"text_template": "A webhook event needs review.\n\n{{payload}}",
"html_template": "<pre>{{payload}}</pre>",
"reply_to": "support@example.com",
"auth_type": "GOOGLE_OAUTH_REFRESH_TOKEN",
"auth": {
"client_id": "google-client-id",
"client_secret": "google-client-secret",
"refresh_token": "google-refresh-token",
"scope": "https://www.googleapis.com/auth/gmail.send"
},
"rate_limit": 1,
"rate_limit_period": "second"
}
}curl -X POST "https://api.fasthook.io/v1/destinations" \
-H "Authorization: Bearer $FASTHOOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ops-email-alerts",
"type": "GMAIL",
"config": {
"to": [
"ops@example.com",
"{{payload.owner.email}}"
],
"cc": [
"support@example.com"
],
"subject": "FastHook event {{event_id}}",
"text_template": "A webhook event needs review.\n\n{{payload}}",
"html_template": "<pre>{{payload}}</pre>",
"reply_to": "support@example.com",
"auth_type": "GOOGLE_OAUTH_REFRESH_TOKEN",
"auth": {
"client_id": "google-client-id",
"client_secret": "google-client-secret",
"refresh_token": "google-refresh-token",
"scope": "https://www.googleapis.com/auth/gmail.send"
},
"rate_limit": 1,
"rate_limit_period": "second"
}
}'Authentication
Destination authentication is outbound. It helps the receiver trust or accept FastHook delivery, and it is separate from source authentication that verifies the original webhook producer.
- Google OAuth refresh token with gmail.send scope
HTTP methods and rate limit
This destination type uses the methods below for delivery attempts. Rate limits apply at the destination boundary, so every connection that targets the same destination shares that capacity.
Rate limit: Locked to 1 request per second.
Delivery behavior
- Recipient, subject, text, and HTML fields can use FastHook template tokens such as {{event_id}} and {{payload.customer.email}}.
- FastHook sends through Gmail with the configured OAuth refresh token and gmail.send scope.
- Gmail destinations are locked to 1 request per second to avoid Gmail API send bursts.
- Use Gmail for human notification workflows, not high-volume machine-to-machine delivery.
Setup checklist
- Create a destination and choose GMAIL as the destination type.
- Add at least one To recipient. Use static addresses or template values from the payload.
- Set the subject and text or HTML body templates.
- Connect Google with Gmail send access.
- Connect the destination through filters so only email-worthy events create messages.
Troubleshooting
Saving fails because recipients are missing.Add at least one To recipient and a non-empty subject.
Saving fails because OAuth is missing.Connect Google with Gmail send access so FastHook can store a refresh token.
Too many emails are sent.Put filters on the connection before the Gmail destination and keep the built-in 1 request per second pacing.