Hey all!
I have a question that maybe you can help.
Im creating a code in python that basically uploads / updates some data in Monday.
In short, i have 2 separate folders with CSV files. My python code accesses those files and populates my board. one folder’s CSVs have what populates the values of one group and the other folder’s CSVs have what populates the sub items of one value
(e.g: Folder1 > toyota.csv, nissan.csv, bmw.csv.
Folder2> toyota-specs.csv, nissan-specs.csv, bmw-specs.csv).
my board groups names are : Toyota, Nissan, BMW.
in the toyota.csv column0 are several models of toyota cars.
everyday this toyota.csv is renewed automatically with same or less or new models.
i need my code to list all the items of the toyota group (or any other that is being checked), and compare column0 entries with the api json response of what the group already has as values. If theres something new i need to add it on monday and take the new id in order to use it for future updates. if something on monday is not there anymore on the csv i need to delete it. Whatever is the same i need to update it.
The way i tried to do it is to put the r.json() into a csv but i get multiple errors when i tried to use pandas.
columnsQuery = f"""query {{
boards (ids: {BOARD_ID}) {{
groups(ids: {groupIDToyota}){{
items {{
id
name
column_values {{
id
title
value
}}
}}
}}
}}
}}"""
data = {"query": columnsQuery}
r = requests.post(url=BASE_URL, json=data, headers=HEADERS)
columnsResults = r.json()
print("columns", columnsResults)
this is the query i use to get the results. i specify both the board and group id. however when i tried a json parser website it showed me that the response is completely wrong and couldnt get any result. and when i tried pandas it didnt work.
would appreciate any ideas. thanks
"Preformatted text