Sandata Workato Scripts.
This commit is contained in:
@ -5,7 +5,7 @@ import Apikeys
|
||||
import json
|
||||
|
||||
|
||||
APIKEY = Apikeys.ANTHOLOGY
|
||||
APIKEY = Apikeys.SANDATA
|
||||
groups_dict = {}
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
|
||||
@ -27,16 +27,17 @@ def get_groups(APIKEY):
|
||||
# if created_at.startswith("2023"):
|
||||
group_id = response["id"]
|
||||
group_name = response["attributes"]["name"]
|
||||
# print(group_name)
|
||||
groups_dict = {group_name: group_id}
|
||||
groups.append(groups_dict)
|
||||
if "caregiver" in group_name:
|
||||
# print(group_name)
|
||||
groups_dict = {group_name: group_id}
|
||||
groups.append(groups_dict)
|
||||
|
||||
if "next" not in nextlink:
|
||||
break
|
||||
print(groups)
|
||||
|
||||
with open(
|
||||
"/Users/normrasmussen/Downloads/Anthology-Groups.csv", "a+", newline="\n"
|
||||
"/Users/normrasmussen/Downloads/Sandata-Groups.csv", "a+", newline="\n"
|
||||
) as csvfile:
|
||||
for group in groups:
|
||||
for key, value in group.items():
|
||||
|
||||
Reference in New Issue
Block a user