Python Code to save Zaps - Automation into Notion

Recently I have started to use Zapier. After a trial I have paid for the Starter plan. I chose Zapier because I wanted to use a lot of automation to put things into Notion as this is my central hub for everything. I am a pro IFTTT user but currently you can only create a new page with IFTTT, not insert a row into a specific table.

The starter plan give you 750 tasks a month which will be plenty, however this only gives you 20 Zaps. I have a lot of scheduled meetings a week, and I had setup Zaps to remind me to create the agenda's for all the individual meetings.

Once I had all of these I had used half of my allotted Zaps, and to be honest they were all doing the same thing, just creating a task into my Master Task Database at a certain time and date for the given meeting.

I had a thought that with a small piece of code, I could depending on the day create the entry for the given meeting. All I would need would be one Zap for this.

Now to set this up you need to be on a starter plan as the Webhook is a premium feature. Once you start the Zap, the first step is the Webhook, this gives you a url to send the data to. Now I have a bunch of if statements, so depending on the day it will pass the meeting names to the webhook, this will then be the second part of the Zap, this is the actual creating of the task into Notion.

I have a copy of the code below, feel free to copy this and edit this. I am happy to share the Zap setup with you, if you would like to see this please email me and I will send you the details on how to set this up. I am happy to also assist in setting this up for you.

import requests
import json
from datetime import datetime
import sys

def add_tasks():
    for x in range(len(lst)):
        data = {"agenda": lst[x]}
        r = requests.post("https://hooks.zapier.com/hooks/catch/your_webhook_code", json=data)

dayday = datetime.today().strftime('%A')
if dayday == 'Saturday':
    sys.exit()
elif dayday == 'Sunday':
    sys.exit()
elif dayday == 'Monday':
    lst = ['Meeting1','Meeting2','Meeting 3']
    add_tasks()
elif dayday == 'Tuesday':
    lst = ['Bob','Jeff']
    add_tasks()
elif dayday == 'Wednesday':
    lst = ['Declan']
    add_tasks()
elif dayday == 'Thursday':
    lst = ['David Moyes','Soucek']
    add_tasks()
elif dayday == 'Friday':
    lst = ['Cresswell','Coufal']
    add_tasks()

Manual data point for Beeminder when IFTTT integration stopped

Apple watch always on since update

Apple watch always on since update