Creating new card using GraphQL

  • 22 February 2021
  • 2 replies

Userlevel 3

I'm trying to create a new card:mutation {
input: {
pipe_id: ""XXX""
fields_attributes: {field_id:""ZZZ"", field_value: ""AAA""}
parent_ids: [ ]
) { card { id title } }
}The field_id is related to a Database connection. The field_value is a record from that Database.The pipe has the connection configured. Manually we can enter that field with no problems, but, using the API I got the following error:{
""data"": {
""createCard"": null
""errors"": [
""code"": 30006,
""locations"": [
""column"": 10,
""line"": 1
""message"": ""Invalid inputs: Erro no campo \""ZZZ\"": Value You don't have permission to connect these cards/table records."",
""path"": [
""type"": ""MultipleInvalidInputErrors""


Best answer by genietim 23 February 2021, 16:39

View original

2 replies

Userlevel 7
Badge +8

I can imaging your problem to be the missing [] around your fieldValueInput.

Instead of

fields_attributes: {field_id:"ZZZ", field_value: "AAA"}

it needs to be

fields_attributes: [{field_id: "ZZZ", field_value: "AAA"}]


Userlevel 7
Badge +8

I do not know if this is just the formatting here in the Pipefy Community (if you can still edit, please use the “Code” format, to be found in:

Where to find the code format

), but you have some issues with the number of quotation marks (“). Could this be your problem? Also, feel free to use the network tab in your browsers dev tools to checkout the actual mutation that Pipefy itself uses when creating a card.