Advice on a Pipefy workflow

This topic was automatically generated from Slack. You can find the original thread here.

Mathias Foster : Hello, I’m trying to build a basic workflow:

  1. Watch for new cards being created in Pipefy
  2. When one comes in, fetch the card information by ID
  3. Get one field, and search for additional information in another system
  4. Update the card with the additional information, by ID.
    I am stuck at step 2 – I don’t understand what Pipedream is asking me to put in the key and value fields?

Tod Sacerdoti : Mathias - I am not very familiar with Pipefy but have you tried creating a query per the docs

Tod Sacerdoti : - I believe you creating this action so may be able to help

Sergio Rodriguez : Looking into that

Sergio Rodriguez : I checked. So , Pipefy API is GraphQL based, and the same endpoint is used for all actions: https://api.pipefy.com/graphql, you’ll see this URL in all Pipefy actions atm in Pipedream. For using a different API method, the GraphQL query sent to the URL needs to be different.

As you can see in the workflow editor, the param Graphql query is of object type. So in this case, you’d need to turn structured mode off, and reference to a proper Graph QL object, with the structure as in the documentation, the original workflow comes with an example, so for instance if I constructed the sample query in the previous steps I’d input {{steps.previous_step_to_lookupcard.graphql_query}}

Sergio Rodriguez : I have a workflow example, which you can copy: Pipefy - Look up Card by ID - Pipedream

For your use case, I think you may use an extra step to construct the GraphQL query object based off the new Card Id you watched.

Sergio Rodriguez : In general, when you see an object parameter in Pipedream with structured mode on, it expects you type each object prop under the key field, and its value in the value field.

Mathias Foster : Thanks .

Mathias Foster : This is what I have now:

Mathias Foster :

Mathias Foster : It looks right, but on the next step I am getting the error message “No query string was present”, even though it’s being provided?

Mathias Foster :

Mathias Foster : I have confirmed that step 2 is working as expected, the ID from step 1 is being incorporated in the GraphQL query:

Sergio Rodriguez : Oh, yeah, by looking at the screenshots, seems that Pipefy expects the “query” prop as part of the query text, so instead of using {{steps.nodejs.graphql_query.query}}

Sergio Rodriguez : send the entire object {{steps.nodejs.graphql_query}}

Mathias Foster : Excellent, this has fixed it! Thank you :+1:

Sergio Rodriguez : Great, glad it worked!