WayScript makes it easy to sync Google Calendar events with several platforms including Trello. With a few clicks and a little bit of Python you too can achieve this in just a few minutes
It is important that your Google Calendar event names are the same as the Trello Card name you wish to sync
Additionally, we will be making use of Time Trigger, Google Calendar, and Trello packages so be sure to import them first via WayScript Libraries tab
The only modules we will be using in this post are a Python module and a Loop module. To learn more about the modules and packages we will be using please take a look at the following resources:
- Working with Time Trigger
- Working with Python
- Working with Loops
- Working with Google Calendar
- Working with Trello
Simply, click the ‘+ New Script’ button found in the top right corner to start creating your new workflow.
Now, let’s add and enable a simple Time Trigger
With the Google Calendar package we are able to ‘Import Upcoming Events’ for this example we will simply focus on today’s events
We need to create a variable to store our Trello card description data using the Create Variable module
We add a Loop to iterate through multiple calendar events and update matching Trello cards accordingly
Within our Loop we will want to add a Trello step to search for a card name matching a Google Calendar event
Our python code will be used to build the proper description update for our matching Trello card
def buildCard(): desc =  desc.append( variables[ 'Events_Item' ][ 'description' ] ) desc.append( "Location: " + variables[ 'Events_Item' ][ 'location' ] ) desc.append( "Attendess: " + ", ".join( variables[ 'Events_Item' ][ 'attendees' ] ) ) desc.append( "Due: " + variables[ 'Events_Item' ][ 'start' ] ) return "\n".join( desc ) try: if variables[ 'Card_IDs' ]: variables[ 'cards' ] = buildCard() except: print( "No Trello cards exist with name: " + variables[ 'Events_Item' ][ 'summary' ] )
Finally, we will add a second Trello step to actually handle the card update itself.
To verify everything is working as expected you can head to Trello and check the card details to make sure it updated
As always, if you have any questions, comments, feedback, or suggestions, please let us know on WayScript or through our discord. If you would like to view this WayScript simply follow the link Update Trello Card with Google Calendar Event.