CDP for personalised customer journeys and effective campaigns across all channels.
Optimise search results on the website to provide a better shopping experience.
Webcare, messaging, social media publishing and monitoring in one clear and concise tool.
Although our products are easy to use, we offer a wide range of services to help you succeed even more in using our software.
Now that everyone knows what ChatGPT is, the blogs and LinkedIn posts are flying around you. The possibilities are endless, with loads of pre-made prompts that turn your idea into an AI-executed reality. But entering a prompt in ChatGPT remains limited to that functionality as well. As a marketer who prefers to automate everything, we set to work to enrich our emails with ChatGPT. The result? A personalized poem in an AI-powered email that is completely tailored to its recipient. Below, you can read what that process looks like, and we’ll show you how you can apply this to your emails as well.
In this simple example we trigger an email in SendPro from a Mail+ form, via a webhook. That email is built up based on data from the form and enriched with an AI-generated poem. We wanted to keep what we ask for in this form as simple as possible, but we wanted to request enough data to be able to personalize it. For example, we only asked for email address, name, language, company, and the industry in which the company is active.
When you collect form data in Mail+, you naturally want to be able to use it in the rest of the process. To forward that data from one system to another, we used a webhook. You can find this in the ‘Processing’ section of Mail+ forms. Here you set an address (see step 2) where the data should go – a POST request. It is also important to map the data from the forms, which ensures that another system can process your data again.
Data mapping really means ensuring that database fields match. Does system 1 handle first names as ‘firstname’ and system 2 as ‘fName’? Then during the mapping, you ensure that system 1 sends the first name as ‘fName’ to system 2, with the value being the data that system 1 knows as ‘firstname’. That looks something like this:
Now that the form is ready, the next step is to make it available on your website. In our case a simple landing page, but you can also easily integrate Mail+ forms with your website.
Now that the form can receive and forward the data, it’s time to let that second system do its job. If you are an advanced API specialist, you can skip the following, but for ease of use we have chosen to hang Zapier between the systems.
Zapier is a tool that allows you to link different systems together and add actions to them, from a user-friendly interface.
Setting a trigger in Zapier based on a webhook (‘Webhooks by Zapier’) generates an address that you can use in step 1. The webhook URL consists of a series of unique numbers and letters, as in the (modified) example below:
In Zapier, supported by the form data, you can have a message sent by Spotler SendPro. SendPro then allows you to transform that data into a beautiful, personalized email. To do that, we first had to make sure that all that e-mail traffic is secure.
To be able to trigger your emails from Zapier in SendPro, you must first establish a connection with your account. For this you need your account ID and you need to create a Source. In Zapier we have set up this process in two steps:
Unique authentication keys (OAuth) are created for every email that needs to be generated – to prevent someone from getting their hands on them and emailing you using your account. The response of the POST request to SendPro contains the following:
As you can see in the image above, each key expires after 60 seconds. We then use the key itself (access_token) in a call to SendPro to send a message.
In the next step, you use the access_token to be able to offer an e-mail in the correct account with the correct authentication. In that POST request, you process all the data you want to send to SendPro:
Based on the data or the source of the message (in this case Zapier), SendPro knows exactly which steps it needs to take to format and deliver your message.
Now you have prepared data from your Mail+ form to be used in other tools. In an earlier step we created a Source in SendPro, which we will now use.
In this case we call the Source ‘Event API’ – because it was made specifically for, you guessed it, events. The moment data arrives via this source, you can indicate in SendPro what should be done with it via Flows: the way to set up your e-mail journeys.
When creating such a Flow, you can select on which source or other condition this Flow should be triggered. For example, you can also trigger a different Flow on specific data within a message. For now, we’ll keep it a bit simpler and all messages from the ‘Event API’ source will go through this Flow:
We then indicate in the Flow what should be done with your message, step by step. We have only provided some form data, so we want to connect to ChatGPT (the ‘External Data’ step) and add a template where we can display that data. You can do that easily by dragging the appropriate ‘Flowsteps’ onto the timeline:
Within Flows you work with Flowsteps; the steps a message must undergo before it is delivered. In our case, we put an External Data step on the timeline that allows external data to be retrieved, posted somewhere, or updated during the sending process. For example, we can ask ChatGPT to write us a nice poem:
With a simple prompt, you can instruct ChatGPT to write a personalized text with a simple prompt. Please note we have explicitly requested permission to have personal data processed by ChatGPT. If you do not want to work with personal data, you can always use other data, such as ‘language’, ‘company’ or ‘industry’.
The attentive viewer will see in the request body that we are using model ‘text-davinci-003’ and not the latest version of GPT. At the time of making this example, gpt-4 was not yet available – but Davinci is fine for this use case.
The prompt is simple:
“Write a short poem in ${language} about the adventures of ${firstname} ${lastname}, working at ${company} in the ${industry} industry. Can you replace the /n with <br>?”
This prompt gives you a short poem and ends each line with an HTML break, making it easier to use in your email. For example, I got:
“Tom Blijleven,
Tech adventures,
Spotler, his home,
He works hard and smart.
He learns a lot,
And never stands still,
He is a tech hero,
With a big will.”
Although I do not expect that we have found our new Shakespeare with ChatGPT, these types of AI-generated texts do of course offer opportunities to hyper-personalize your content. But first make sure that this content can also be processed in your e-mail.
The finishing touch for any email is its design. That bucket of data is nice, but without a nice wrapper around it, no one will remember your emails. In SendPro you handle this super efficiently with the smart template composer. This allows you to make one template in multiple languages, without making different variations.
For this example, we created one leading template that is filled with texts from SendPro’s Language Packs. Based on the language indicated in the form, the template is filled in with the correct text. For example, we created these three variations in Dutch, German and English with just one template:
With the right tools, you can create a personalized email from just a little bit of data. In this example we have chosen a limited use case, but one that offers sufficient tools to reconsider which data you request and what you do with it in your emails. Do you want to try this for yourself? Please contact tom.blijleven@spotler.nl or be inspired by one of our product demos.