Twitter Automation with Drupal Views and IFTTT

Drupal Views is one of the most powerful modules available, paired with the automation service IFTTT you can post to Twitter in some fancy ways.

On a basic level on the Love Shrewsbury site we use IFTTT to post the title and link of the RSS feed to Twitter. Drupal views allows you to take this further with greater control of the RSS feed. Therefore we created a second RSS feed that only shows articles once they have been live for 8 hours, this is then posted to Twitter through IFTTT saying ‘Did you miss? <title> <url>’.

This was done in the following way:

1. Create a new View and add the feed display.

2. Set the url to be something like rss8hours.xml and set the sort criteria to be Post Date (desc)

3. Add a filter for the content type you want then add a filter for Post Date

4. Set the operator to ‘is less than’ and an offset of the current time to ‘- 8 hours’.

5. Save the View and you will have an RSS feed of content once it is 8 hours old.

6. Login (or signup) to IFTTT and click on Create.

7. Set the trigger to be feed and select new feed item.

8. Enter the feed URL and select create trigger.

9. Click ‘that’ and select Twitter.

10. Select an action of ‘Post a Tweet’

11. Customise the text (for instance I use the phrase ‘Did you miss?’ before the <title> and <url>).

12. Click Create Action

IFTTT will check your RSS feed every 15minutes and aumatically post any new items in the RSS feed to Twitter (if something has already been posted it won’t repost).

We found this method to almost double our traffic from Twitter as we were attracting people checking Twitter at different times. A lot of our articles go live late morning so an 8 hour delay was Tweeting early evening.