from gcalendar import api import json import pprint api = api(r'api_info\client_secret.json','api_info') cals = api.get_calendars() cal = next(filter(lambda cal: cal['id'] == api.ids['school schedule'],cals)) with open('classes.json') as file: bodies = json.load(file) for body in bodies: # body['colorId'] = cal['colorId'] # pprint.pprint(body) # input() api.create_event('school schedule',body)