I have probleme with create record in a table, I use the code bellow, but its not working the payload string…..
import requests
url = 'https://app.pipefy.com/graphiql'
payload = "{\"query\":\"{mutation {createTableRecord(input: {table_id: "n1kpekCb", title: "my record", due_date: "2017-12-31T00:00-03:00", fields_attributes: e{field_id: "nombre", field_value: "Tom"}, {field_id: "apellido_paterno", field_value: "tom@trindade.com"}, {field_id: "apellido_materno", field_value: "Trindade"}, {field_id: "n_documento", field_value: "Tom"}, {field_id: "correo_electronico", field_value: "tom@trindade.com"}, {field_id: "telefono_celular", field_value: "tom@trindade.com"}, {field_id: "estado", field_value: "Activo"}, {field_id: "vendedor", field_value: "Sí"}, {field_id: "comprador", field_value: "Sí"}, {field_id: "arrendador", field_value: "Sí"}, {field_id: "arrendatario", field_value: "Sí"}]}) { table_record { id title due_date record_fields { name value } } } }\"}"
headers = {
'authorization': 'Bearer Token',
'content-type': 'application/json'
}
print(payload)
response = requests.post(url, data=payload, headers=headers)
print(response)