Files
Gainsight/Scripts/Zenjob/workato-webhook-gsheets.py

22 lines
535 B
Python

import requests
import json
with open('./sample_payload.json', 'r') as file:
input = json.load(file)
def main(input):
# input = input['input']
for items in input['payload']['data']['included']:
if items['type'] == 'quizzes':
try:
if items['name'] == 'Deutsch Einstufungstest':
print('quiz!')
except TypeError as h:
print(h)
elif items['type'] == 'people':
print('people')
if __name__ == "__main__":
main(input)