Welcome to collective.ifttt!

What is IFTTT?

ifttt.com - If This Then That, also known as IFTTT (pronounced /ɪft/) - is a free web-based service to create chains of simple conditional statements, called applets. These applets can perform a configured action in response to a trigger. Triggers and actions are web services provided by platforms such as Facebook, Pinterest, Youtube, Spotify - and now, Plone sites.

Below are a few examples of IFTTT applets for better understanding:

  • If a video is liked on Youtube, then save the video details in Evernote
  • If a profile picture gets changed on Facebook, then update the same profile picture on Twitter
  • If I’m tagged in a photo on Facebook, then save it to my phone gallery
  • If I receive an email about a new Twitter follower in my Gmail inbox, then tweet the new follower a welcome message
  • If NASA posts a new astronomy picture of the day, then add it to my screensaver gallery.
  • Email me about Top Apps that have become FREE in the Apple App Store.
  • Automatically unmute my Android phone when I get back home.
  • Add a Spotify song from a liked YouTube Video.

collective.ifttt is an addon which enables any Plone site to play in the IFTTT ecosystem by allowing you to create IFTTT applets.

Below are a few examples of using IFTTT with Plone sites.

  • If a news item is published, then tweet about it or post it on Facebook.
  • If an event is published, then add it to my calendar.
  • If new users sign up for an event, then add them to a Slack channel.
  • If content changes, then record who edited it in a Google spreadsheet.

Introduction to IFTTT Applets

What is an Applet?

An Applet connects two or more apps or devices together. It enables you to do something that those apps or devices couldn’t do on their own.

Applets are composed of triggers and actions. Triggers tell an Applet to start, and actions are the end result of an Applet run. To use an Applet, you’ll need a free IFTTT account. Then you need to connect your apps and devices to IFTTT.

Follow this link for easy creation of an IFTTT Applet.

Enabling RSS Feeds On Plone Sites

Introduction

Plone can generate RSS feeds from folderish content types like folders and collections. First you must enable syndication on your site so that RSS feeds will be generated. Then you can go to the collection or folder you want to use as a feed and adjust its syndication settings.

If you want to aggregate a particular set of content to an RSS feed, you can create a collection content item for that purpose. You can choose what content types to aggregate and filter by fields such as labels, dates, location or language. Collections are language aware so this works correctly on multilingual sites.

Once you have an RSS feed you can use it on IFTTT without doing anything special. (No secret key, no IFTTT trigger needed.)

Below are the steps to create an example RSS Feed on a Plone site. You can tweak the configuration to meet your requirements and make different kinds of RSS feeds given the flexibility of collections.

Enabling Syndication

Step 1

Go to Site Setup.

_images/Step1.png

Step 2

Select Syndication under General.

_images/Step2.png

Step 3

Select the following and save:

  1. Allowed
  2. Search RSS enabled (if you want to be able to use search results as feeds)
  3. Show settings button (this will enable the Syndication tab on the edit bar of folders and collections)
  4. Show feed link (this allows you to show an RSS link on the folder or collection)
  5. Save

You may optionally include author information and adjust the maximum number of feed items.

_images/Step3.png

Creating a Collection to Use as an RSS Feed

Step 1

Go to the site root. (This is a special type of object, so the Syndication tab will not show on the edit bar here, like it will on all other folders.)

_images/Step11.png

Step 2

Add a new collection.

_images/Step21.png

Step 3

Configure your collection. The configuration explained below will aggregate all available published content. This can be tweaked to suit your own requirements.

  1. Update Title to “Plone Site - RSS feed” or any other suitable name.
  2. For Select Criteria, choose Review State as Published. (Otherwise unpublished items will show in your feed and people will get an error when they click on that URL.)
  3. For Sort On choose Effective date and check Reversed Order.
_images/Step4.png

Step 4

On the Settings tab check Exclude from navigation if you want to make it disappear from the navigation tree.

Save your new collection.

_images/settings_tab.png

Step 5

If the collection’s content seems to be right, publish it using the State menu on the edit bar.

_images/publish_collection.png

Viewing Your RSS Feed

Step 1

Your RSS feed can be viewed by appending /RSS to your collection’s (or folder’s) URL - something like /path_to_collection/RSS. (Note that this is case sensitive, “/rss” will not work.) For our example the URL to the RSS feed is http://localhost:8080/Plone/plone-site-rss-feed/RSS

_images/Step8.png

Step 2

To show a link to the RSS feed on a collection or folder, enable it on the edit bar’s Syndication tab as shown below. This is an optional step - many sites choose not to show these feed links because it might confuse their users.

_images/Enable_feed_icon.png

Now your RSS feed is ready to be used in an IFTTT applet. You can test it by copy-pasting the RSS URL into an RSS Reader, like feeder.co or Mozilla Reader.

Using Plone RSS Feeds in IFTTT Applets

To learn how to create an IFTTT applet using an RSS feed, follow the demonstration below.

This applet will add a new row on Google Spreadsheet each time an RSS Feed get publishes. However, one may teak this configuration based on user requirement.


  • Signup at free IFTTT account.
  • Navigate to your Username in the upper right corner
  • Select New Applet from the dropdown menu
  • Click the blue ‘this’ text
  • Search rss in search box. And select RSS Feed
_images/search_rss.png
  • Choose New feed item
  • Fill RSS feed url in the given space. And click Create Trigger
_images/fill_rss_url.png
  • Click the blue ‘that’ text
  • Choose Google Sheets as Action Service
_images/choose_google_sheets.png
  • Choose Add row to spreadsheet
  • Configure the form based on required tweaks and hit Create Action
_images/configure_action1.png
  • Click Finish
_images/finish.png

Hurrah!! We successfully created our IFTTT Applet.

_images/successfull_creation.png

Now Every time an RSS get publishes, it will automatically be added as a new row to our Google Spreadsheet.

_images/google_spreadsheet.png

Configuring a Plone Site with an IFTTT Secret Key

IFTTT supports push notification, which can be leveraged to get instant notifications from a Plone site. To do that you need to configure the Plone site with your IFTTT secret key.

Follow the steps below to get your IFTTT secret key and save it in your Plone site.

Obtaining an IFTTT Secret Key

  1. Go to ifttt.com and sign up for an account.
  2. At the top click on ‘Search’ and find ‘Maker’. (Update: this is now named ‘Webhook’.)
_images/search_maker.png
  1. Click the ‘Connect’ button to create a Maker (Webhook) channel.
_images/settings_maker.png
  1. Click on the gear icon (Settings) on the top-right of the Maker (Webhook) channel to view your key.
_images/obtain_key.png

Saving an IFTTT Secret Key in Plone

  1. Go to Site Setup
_images/Step1.png
  1. Select IFTTT Settings under Add-on Configuration
_images/select_ifttt_settings.png
  1. Copy your key to the Secret Key field and click Save.
_images/store_key.png

Trigger IFTTT Action

Plone Content Rules are a powerful mechanism to automate dealing with content using conditions and actions. It will automatically perform an action when certain events (known as “triggers”) takes place under desired condition.

Collective.ifttt contains a new content rule action, IFTTT Trigger, that posts an event to the IFTTT web service when a content rule’s conditions are satisfied.

Content rules with the IFTTT Trigger is used to implement the IFTTT triggers, which is a powerful mechanism to automate dealing with 3rd party web services that collective.ifttt provides (Content Trigger, Event Trigger, etc.)

You can create your own custom IFTTT trigger event by combining the IFTTT Trigger content rule action with your own conditions

Creating and Defining Content Rules

Following the instructions given on the Plone documentation link. Create a content rule as follows and assign it to a folder on your site (or at the site root):

  • Triggering event: Object modified
  • Condition: Content type equals News Item
  • Action: Select “IFTTT Trigger” from the drop down menu and click on the “Add” button.
_images/select_action.png
  • From the “Add IFTTT Trigger” page, fill out the form:
  • For the “IFTTT applet name” enter: the IFTTT applet which you want to trigger.
  • Choose the 3rd payload from available options (values of which will be dynamically fetched from the content which trigger this action) :
    • description - Description/Summary of content
    • username - Username of Editor
    • start - Event Start Date/Time
  • Click the “Save” button.
_images/configure_action.png

Data sent to IFTTT applet

In the data sent to IFTTT, following payload (values) will be dynamically included (for which content on the site this content rule triggers):

  • Title
  • absolute_url
  • Chosen 3rd Payload

Working example of IFTTT Trigger

Now that following the Plone Content Rule we can see IFTTT Trigger in action.

For example, below we will create a new news item and further update it’s content to trigger IFTTT send_email applet.

Create news item

  • Select Add new - news item
_images/new_news_item.png
  • Fill in form for new news. And click save.
_images/fill_new_news_item.png

Update news item

  • Select Edit for news item.
_images/edit_new_news_item.png
  • Update news item. And click save.
_images/update_new_news_item.png

Triggered the IFTTT Applet

_images/IFTTT_trigger.png