This is an example of how to try to send an e-mail if there is an e-mailaddress available and if the e-mailaddress is correct (did not bounce). We are using the MegaMail platfrom to send the e-mail and using their Webhook. If there is no e-mailaddress available or the e-mail bounces the Printprovider receives a datafile included with a PDF to print.
The data-fields we need in this Flow are;
data.client.email and all the variables that are used in the HTML and PDF content.
Decision: Has E-mail?
This Decision checks if the field
not empty depending on the outcome of the Flow continues by a YES to the MegaMail App and by a NO directly to the Printprovider.
This App is available in the platform’s MarketPlace and is included with a Webhook. The settings of the App are already configured in Setup > App > MegaMail.
Within the settings of the App you can Select the HTML content you want to use. This is content witch is created in the platform (Build > Content).
The rest of the information can be filled in as a variable or a fixed value. In this case only the
data.client.email are used.
MegaMail Status (Webhook)
The MegaMail Webhooks receives realtime the status of an e-mail. In this Webhook you can restart the Flow on the following status: Was the e-mail sent? Was the e-mail opened? Was the e-mail signed? or D
id the e-mail bounce?
In this case we selected if the e-mail did bounce?
A Webhook needs to be set before or directly after a Scheduler
The Webhook will be set active to listen to the realtime status updates from the MegaMail platform untill the Scheduler expires. If you set the Webhook without the Scheduler, the record will run to the End of the Flow and will not be active anymore.
Once the Webhook receives the Status bounce, the Flow will restart directly (realtime) from the point of the Webhook in the direction of the YES.
As told above, it is important to set a Scheduler in combination with a Webhook. Now the Flow knows how long it has to keep the Webhook listener active.
In this case we set the Scheduler on a Period of time has passed since the start of the Flow. The period is set on 4 hours.
Within the Printprovider App you can select the PDF Content you want to use, the system will then create the PDF and send it to your selected Print Provider.
The Print Provider will receivce the PDF one-by-one, first from the selection if there is an e-mailaddress available and then from during the 4 hours waiting of the Scheduler.
At the end of the Flow everybody with a correct e-mailaddress without a bounce received an e-mail. Everybody without an e-mailaddress available in the data or once the e-mail bounces receives a Printed Letter.