Skip to main content
The API object for the custom-email-provider Actions trigger includes:

api.cache

Make changes to the cache.

api.cache.delete(key)

Delete a record describing a cached value at the supplied key if it exists.
key
string
The key of the cache record to delete.

api.cache.get(key)

Retrieve a record describing a cached value at the supplied key, if it exists. If a record is found, the cached value can be found at the value property of the returned object.
key
string
The key of the record stored in the cache.

api.cache.set(key, value, options)

Store or update a string value in the cache at the specified key. Values stored in this cache are scoped to the Trigger in which they are set. They are subject to the Actions Cache Limits. Values stored in this way will have lifetimes of up to the specified ttl or expires_at values. If no lifetime is specified, a default of lifetime of 24 hours will be used. Lifetimes may not exceed the maximum duration listed at Actions Cache Limits. Important: This cache is designed for short-lived, ephemeral data. Items may not be available in later transactions even if they are within their supplied their lifetime.
key
string
The key of the record to be stored.
value
string
The value of the record to be stored.
options
cachesetoptions
optional
Options for adjusting cache behavior.

api.notification

Informs if we should consider the notification event as to be retried or to be dropped. See each of these methods for further details on the actual behaviour. If several calls are made, only the last one is considered.

api.notification.drop(reason)

When called, the notification event is considered failed without recovery: We will log an error for this event, but won’t be sending it again to the action in the future. If you need this notification event to be retried, consider calling retry instead.
reason
string
optional
this reason will be part of the log entry, this will help you analyze the error further. Please note that this field is limited to 1024 characters and will be truncated if larger.

api.notification.retry(reason)

When called, the notification event is considered failed, but recoverable: We will log an error for this event, but we will retry it up to 5 times in the next minutes. If you consider that this notification event should not be retried, consider calling drop instead.
reason
string
optional
this reason will be part of the log entry, this will help you analyze the error further. Please note that this field is limited to 1024 characters and will be truncated if larger.