Select Page

The new update to version 1.4 brings some great new features to our WordPress plugin Post Status Notifier. Especially the support for custom taxonimies and the new dynamic placeholders give us a new, incredible flexibility. To give you an idea of what you can do with PSN besides simple notification e-mails to contributors or admins, we will cover some use cases of our customers on this blog. First we will start with Buffer (https://bufferapp.com/). Buffer is a great service which automatically shares our content to several social platforms like Twitter, Facebook or LinkedIn. Buffer has a schedule feature with which you can decide when your posts will be shared.

use_case_buffer

Example workflow: When a WordPress post gets published, PSN submits it to Buffer

 

But how can Post Status Notifier help us with Buffer? Buffer has a very cool feature which is called “Email to Buffer“. Every Buffer account has its own secret e-mail address. This e-mail can be used to send your content to Buffer.

the Buffer secret email feature

The Buffer secret email feature

 

PSN has a new feature with version 1.4: custom recipient e-mail address. We can use our secret Buffer e-mail as custom recipient. The subject of the e-mail should be the text you want to tweet/post to your social profile. If you want to include a link, it should be in the e-mail body.

With this in mind we can setup PSN notification rules (see the docs on how to create new rules) which will trigger when we publish a WordPress post. For a first example I will setup a notification rule for sharing posts with Twitter with special hash tags in the text.

Example PSN rule for sharing posts with Twitter via Buffer

Example PSN rule for sharing posts with Twitter via Buffer

 

This rule will trigger on publishing a post of type “Posts” which has not been published yet. For testing I included a Cc email to see what was sent. The rule will submit the subject text to Buffer which includes the static text “New Post:” with the automatically filled in post title an the attached categories names. To get a hash tag list of the categories we can use another new feature of PSN 1.4: Placeholder filters. With this piece of Twig filter code (see documentation) in PSN’s options, we transform the comma separated categories list into a hash tag list:

{% for key in [post_categories]|split(',') %}#{{ key|trim }} {% endfor %}

buffer-psn-placeholder-filters

In the notification text we add the placeholder [post_permalink] to include the post URL which will be shortened by Buffer by default. Additionally we include the Buffer advanced command @service twitter which will prompt Buffer to only share this text with our Twitter profile. If we do not want Buffer to schedule our tweets, we can add the command @now to directly share the text.

Additionally you could use PSN’s category filter to trigger this only if the post has certain categories attached.

I have set up this example on my blog www.ichdigital.de and it works great. Publishing post results in a new Buffer entry:

buffer-psn-result-twitter

As we can see on the screenshot, buffer shows how it received the text: via Email.

This is just an easy example. If you are using Buffer with several social profiles, it’s easy to create custom rules for each profile to get the perfect text. Or you just create one rule for all profiles with a text that fits all. It’s up to you. In the end you will not have to care about how to share your WordPress posts with your social platforms accounts anymore. Everything will be done by Post Status Notifier and Buffer.

If you have any questions, write a comment or contact me.

Post Status Notifier product page