519 total views,  1 views today

View this on GitHub

Using Mailchimp with Wordpress's RSS feed to email subscribers with new posts

Krupczak Logo

Scenario:

On my website matthew.krupczak.org AKA foobarbat.org:

  • I would like to make it so that readers can sign up to be notified of new posts via email on the Homepage or at the bottom of any post
  • An email should be sent out to the reader daily if new posts are created
  • The email should contain a list of the posts created since they were last notified, along with the HTML content of the latest post in the body of the email
  • The campaign should auto populate to Twitter as well

Wordpress setup

Use Existing Wordpress setup:

RSS campaign with Mailchimp

Make use of RSS newsfeed provided by Wordpress websites

  • Every Wordpress website provides an RSS newsfeed at example.com/feed in a standard format
  • This feed contains the titles, dates, and contents of the website's posts
  • By telling Mailchimp to monitor it, we can set up an automation to send out an email and post to Twitter whenever a new post is created

Creating a Mailchimp RSS Campaign:

Create a new campaign

Campaign

Search for "RSS" and create an "RSS" or "Blog" campaign

RSS Campaign

Input the feed URL provided by our Wordpress site to Mailchimp

Feed URL

Email to the whole list

Recipients

Personalize our campaign info, customized using the merge tag *|RSSFEED:DATE|* to inform and entice the reader

Campaign Info

Set up an auto Twitter post, customized using the RSS merge tag *|RSS:RECENTxxx|*. xxx is a number, in our case 10 indicating that the 10 newest posts since the last email was sent will be included. They will show up as hyperlinks where the text is the title of the posts.

Twitter

Select the full width campaign template for more space

Template

Now we customize our email template

Email template

Greeting for the user in text:

Hello, *|IF:EMAIL ! <<Email Address>>|**|EMAIL|**|ELSE:|*friend*|END:IF|*, You may be interested in new article(s) I've written on my website, matthew.krupczak.org:

In my signup form, I only ask for an email address (and not first name / last name) in order to reduce user friction.
If a user is reading the campaign in email, it would be nice to mention their email address specifically so they know it's not mass spam.
If a user is viewing the campaign page from Twitter, no email address will be available. We can greet them as 'friend' instead
This can be accomplished using conditional block tags:

*|IF:EMAIL ! <<Email Address>>|**|EMAIL|**|ELSE:|*friend*|END:IF|*

If the user's email address is not a placeholder from Mailchimp's software, print the user's email. Else, print "friend".

Let's look at our template again:

Email template

*|RSS:RECENTxxx|*. xxx is a number, in our case 10 indicating that the 10 newest posts since the last email was sent will be included. They will show up as hyperlinks where the text is the title of the posts.

RSS Merge Tags are included directly after this which will show the title, date of publication, and full HTML content of the latest post on my website

Dynamic Social Cards:

Social Card

To inform and entice the reader, I use a RSS Merge Tag to include the date and title of my most recent post

Social Card Preview:

Social Card Preview

.

.

.

Putting it all together:

The Final Product:

Matt's Tech Bytes new posts for 03 04 2020


Subscribe to be notified of new posts:


Krupczak logo

Home

Leave a comment

Your email address will not be published. Required fields are marked *