GraphQL API to manipulate Pipes (& fields)


I would like to be able to change the fields on a pipe using an API. Use cases:

  • automatically synchronize product list with some accounding program (e.g. arcitle-lists from Sage) → change in Sage would lead to new selection options in select-input and/or lead to new input fields, e.g. for articles added in Sage which are accounted per hour
  • import/export pipes, e.g. between organizations or even from another service

Hello, @genietim  I hope everything is fine with you and your family.
I did a quick demonstration of how to edit a field using our api.
Check here 🔗
If you have any questions just let me know.

Step by step:

Mutations:


1. use mutation to get the field id.

{
pipe(id:yourpipeid) {
id
start_form_fields {
id
internal_id
index_name
label
}
phases {
id
name
fields {
internal_id
id
label
}
}
}
}

return:

{
"data": {
"pipe": {
"id": "your pipe id",
"start_form_fields": [
{
"id": "your field id",
"internal_id": "your internal field id",
"index_name": "your field index name",
"label": "your field label"
},
{


2. use mutation to change the field

mutation{
updateFieldsValues(input:{
nodeId: "your card ID"
values: [
{fieldId: "field id that you would like to update",
value: "value that you would like to insert"}]
}) {
clientMutationId
success
}
}

 

:) 


Hi @mozart-morales 

Thanks for your answer. Unfortunately, this is not what I am looking for: I do know I can change the value, but what I want to do is to change the field itself (e.g. the select options for a checkbox/radio/select field) (resp. add a new field) using the GraphQL API.

I did find the relevant mutations though when I just checked again (I do not know why I did not find them the last few times):

, so, you can delete this idea or mark it as “implemented”.


got it ! @genietim 

Yes perfect 🙂 You can use the: https://api-docs.pipefy.com/reference/mutations/updatePhaseField/?_ga=2.223388754.872255537.1609155391-1804306626.1586443343 

short example:

updatePhaseField
mutation {
updatePhaseField(
input: {
id: "field ID"
label: "field label"
options: ["option1", "option2" // if is option field :) ]
required: false
editable: true
}
) {
phase_field {
id
label
}
}

Thanks for your answer 🙂 ! Have a great day!


Updated idea status NewSubmitted

@Juliana Spinardi : that’s the wrong label; “Implemented” would be better suited.


Updated idea status SubmittedReleased

@genietim you’re right! Updated! 
Thanks!!