Custom Email Subscriptions
Overview
Email subscriptions, similarly to webhooks, are a method of communicating a selected event occurred in Fynapse.
Such subscriptions for email notifications can be configured for:
- Approval Workflow events
- Ingestion events
- Extraction events
Email notifications for approval workflows are exclusively managed on the Email Notifications screen.
You can create custom email subscriptions for different Event Types using REST API endpoints.
Custom email notifications for ingestion and extraction events appear on the Email Notifications screen, where they can be enabled or disabled. However, they are created and can also be managed via REST API endpoints covered in this article.
Email subscriptions are released under a feature flag. Please note that when you enable the feature flag, it covers both the default and custom email subscriptions.
Email subscriptions are not available for balance.extracted event.
Email Subscriptions REST API Endpoints
Security Permissions
Working with email subscriptions REST API endpoints requires a user with relevant permissions granted:
- GET calls require email_subscription_read permission
- POST, PATCH and DELETE calls require email_subscription_edit permission
Template for a Custom Email Subscription
To create a custom email subscription you need to include the following subscription fields in the payload for the email-subscriptions endpoint:
Different groups of Event Types have different data fields. All Event Types of one subscription have to belong to one group, e.g. you cannot create a subscription with ingestion and extraction events.
Sample Payload
Sample 1
Recipient Token Grammar
Each entry in recipients[] is one of:
- Literal — e.g.
ops@example.com. Sent as-is. - User —
{{u::<payload-field>}}, e.g.{{u::requestor}}. The field’s value (user id/username from the payload) is resolved to an email address via the identity service at send time. - Group —
{{g::<payload-field>}}, e.g.{{g::approverGroup}}. The field’s value (group name) is resolved and expanded to every member’s address at send time.
Delivery Behaviour
- A placeholder with a present but null field renders as empty text.
- A placeholder or recipient token with a field missing from the event stops the whole email. The delivery ends as dead letter .
- An unknown user or group also stops the email.
- A recipient token with a null field adds no recipient. Users and group members without an email address are skipped.
- When no recipient is left, nothing is sent and the delivery ends as cancelled.
Rendering
- The contents of the payload are wrapped in a graphic design provided by Fynapse.
- Every email is auto-converted to a plain-text alternative for clients that don’t render HTML.
- Transport: SMTP via SendGrid.
- The default
Fromaddress isno-reply@fynapse.aptitudecloud.com(env-dependent).
Sample Email
Example 1
