This script processes train tickets bought on intercity.pl that are sent to your Gmail inbox as PDF attachments. Script saves the tickets in Google Drive and creates a Google Calendar event for your trip with a link to the ticket for easy access.
- Log in to your Google account, go to https://script.google.com/, click + Create new
- Copy and paste the script into the editor, and save it
- Go to Resources > Advanced Google services... and enable Drive and Calendar APIs:
- Click Run > exportTicketsToCalendar to verify that the script works
- Go to Edit > Current project's triggers and configure the script to run periodically: