0.0.8 • Published 1 year ago

wbb-send-email v0.0.8

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

WBB Send Email Integration

This project allows you to send emails to users based on templates provided by either SendGrid or MailerSend. These are cloud based platforms that provide rich editors for creating templates.

Setup

To get started you'll need to register with either SendGrid or MailerSend. Once registered you'll need to collect both an API Key and a Template ID from the platform that will allow this integration to authenticate, and to know which email template to send. These are described below :

SendGrid

The API Keys in SendGrid are found under the Settings menu from the left, and then selecting the API Keys menu option. You'll find the template ID for tht email you wish to send on the Dynamic Templates page. This can be found under the Email API menu. Note that different versions of a template have different ID so ensure you copy the right one. The template in the image below has a value of d-881819026c284a3c92c6ffd201225b32 for example.

MailerSend

To find your API key, click on Settings from the left hand menu, and then select the API Tokens tab. The templates for emails are under the Email menu in the left, under the Templates option. The template ID you need is refered to as ID, or pq3enl6ko0m42vwr in the case of the image below.

Blocks Provided

Provide a list of the blocks provided as part of this integration. This should be a list of block name, and its description.

Handler Names

The following handler names and their functions are available :

Handler NamePurpose
send-emailThis handler sends an email to the user, based on parameters sent, or form values

Configuration Options

Within the function there are a number of options that can be set to configure the behaviour of the integration. The tables below show the settings that are available for each handler.

handler-one

PropertyRequiredDescription
totrueThis can either be a static email address to send the email to, or the name of the value in the from where the email address can be found. For example, this could be set to andy@wbb.ai or email. In the case of the latter it'd find the email address from the email property in the form.
fromtrueThe email address this will be sent from. Please note, this will need to match with appropriate validated sender IDs in the respective platforms.
fromNametrueThe friendly name used to send the email. For example, Andy Feltham
subjecttrueThe subject of the email to send.
platformtrueThe name of the platform used to send the email. At present this should be either mailersend or sendgrid.
templateIdtrueAn ID representing the template to use for the email.
api_keytrueThe API key used to authenticate with the respective platform.