Send out your light and your truth; let them lead me; let them bring me to your holy hill and to your dwelling!
A while back I wrote my original script to tweet event reminders from Google Calendar and it’s been through a couple of iterations since and been broken for a while. Well finally I got round to update it to use OAuth to connect to twitter using the twitteroauth library and switched to using Postmark Inbound for handling the incoming e-mail.
What you will need
- Web hosting with php
- A Google calendar attached to a Gmail account
- A Postmark account
- A Twitter account
- My script
Getting set up
Register a new twitter app from the Twitter Developer Site (making sure you sign in with the account you want the tweets to come from) – fill out all the necessary fields and click create. On the next page you should get the OAuth details (Consumer key and Consumer secret) and a section to generate your access token and access token secret, these all need putting into the section at the top of the script.
Install the script on your web hosting, along with the twitteroauth directory from twitteroauth at GitHub. If you got to the script URL in a web browser you should see it post a , to your twitter account without any errors. (I need to add some testing code really!)
Set up a server in your Postmark account then go into the Settings page for that server and update the Inbound Hook to point to the full URL of the script on your server to point to your script for inbound emails. Make a note of the inbound e-mail address from the server tab of your settings as you will need this to forward the calendar reminders to.
Add your Inbound Email address as a forwarding address to your Gmail account. It will send a confirmation code to the address, which you can collect from the Inbound section of the Postmark interface
Create a filter in your gmail account to forward your calendar reminders to the Inbound Email address from your postmark account (Mine forwards anything from email@example.com).
Now everything should be in place to start sending reminders. For each event in your calendar set up e-mail reminders for the number of days/hours before you want the reminder tweeted. These should then appear something like this at twitter:
<Description> this afternoon at <time>, <Location>
<Description> next Saturday at <time>, <Location>
Turn my eyes from looking at worthless things; and give me life in your ways.
Yes I know it’s now the 2nd December so this is a day late, but here’s a list of the online advent calendars I’ve seen so far (and I’ll probably keep adding to it!)
24 Ways – Web development tutorial every day till Christmas
DTS Advent Devotionals – A devotional each day on the names of Jesus
Adfont Calendar – A free webfont every day in advent
Prezzo – A competition to win vouchers each day
Inky Advent - An inky picture each day by Johanna Basford
Advent verses – My own one with the advent verses I’ve put in the girls advent calendar
Christmas is Coming – A christmas themed illustration every day
Yo Illo Illustrator’s Advent Calendar – An illustration each day from the group of London Illustrators (found via @VeerUpdate)