We’ve had requests from Ted B. and a few others to expand Zingtree’s ability to send email. Specifically, they needed the ability to send to an email address collected by a data entry form, and customize the body copy. So, we created a Webhook that anyone can use!
Sending email messages can be done in two ways:
- By using a web page URL as a template for HTML formatted messages.
- Or by sending a plan text message, and supplying the body copy.
Sending Messages using an HTML Template
First of all, you need to enable a Webhook app on the node that sends email. Here’s how:
- Edit the node that you want to send email from. When this node is visited, an email will be sent.
- Click Show Advanced Options.
- In Send message to App, select Webhook: Zingtree Send Custom Email.
- For the Message, enter this:
- Click Save Changes
Here’s what each part of the message does:
to= : this is where the email is sent. Our demo uses a data entry field named to. You can add multiple addresses, separated by commas.
from= : this is the return address of the email. We’re sending from email@example.com. Put your own address here if you like.
subject= : This is the subject line of the email. The demo gathers this from a variable named subject.
body_url= : This is the web page that is used as the template for the email. It needs to be URL encoded. The template URL can have placeholders for the variables you collect, as you can see in the example template here.
The Email Webhook Demo tree from the Gallery illustrates how this is done. You can examine it and see for yourself how it’s built.
- We created a node that uses data entry fields to gather a “to” email address and a subject line. This is node #5 in the demo tree.
- Node #5 links to node #3, which sends a message to the webhook Zingtree: Send Custom Email:
Sending Plain Text Emails
A more basic way to send emails is via simple text messages. Instead of body_url as a Webhook parameter, include something like the following in the message:
The message needs to have + characters used instead of space characters.
The message part of the node looks like this:
An example from the Gallery tree is here at node #2.
We’re always here to help you with some of the more technical stuff, so if you need help setting up a custom email delivery node, just ask!