You'd like to send a welcome mail to your users as they log in for the first time on your app? To do so, we will take advantage of the "webhooks" (take a look at this post to know what the webhooks are).
Send emails with Zapier
We will use the Zapier platform, which allows us to easily interconnect your MySocialApp application with a mail server of your choice (Amazon SES, Mailchimp, GMAIL, your own SMTP server, ...). In this example we will use the mail test server from Zapier.
Note: in production-mode, prefer a mail server as Amazon SES or your own SMTP server, which will allow you not to be limited about the number of mails you can send.
1/ Firstly, you have to signup on Zapier. The free plan is sufficient for this use case.
2/ Choose the "Webhooks + Email" template from Zapier
3/ Continue to the first step, which is the retrieval of the webhook URL. Zapier will generate an unique URL, which will be used by the webhook system of MySocialApp to inform Zapier that a new user just signed up on your app.
4/ Once you copied this URL, you have to save it on your app through your webhook management console, by clicking on the "+ new web hook" button.
Then a window opens, to ask you to fill in 3 fields:
- Event type: event type to send to the "webhook", you have to select "new user registration"
- Target URL: That's where you have to add the URL provided by Zapier above, which will start with "https://hooks.zapier.com/hooks/catch/..."
- Description: To add a message, in order to find out more easily if your use several "webhooks" for your application.
You can validate
5/ The created webhook will show up in the "Web Hooks" list. Click thus on the 3 little dots of this "webhook" to send a test message to Zapier, by clicking on "Send test".
This action is needed to be able to keep on setting up Zapier.
6/ Receive the test notification on Zapier by clicking on the "Ok, I did this" button
If the message has been well received, then you will see a green confirmation banner, inviting you to go on. Else, it still will be waiting the notification from MySocialApp ; if this problem persists, contact us to make us able to help you.
7/ This is where the magic happens ! You can now specify the recipient (To) and create your mail content.
The green circles are data pushed by MySocialApp to Zapier. Here the way to select fields provided by MySocialApp
Once you created your mail template, you just have to continue, test sending an email and validate what you want.
Your app is now ready to send welcome e-mails to new users 👍