Pipefy - Look up Card by ID
@sergio
code:
data:privatelast updated:3 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 1,000,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
nodejs
auth
to use OAuth tokens and API keys in code via theauths object
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps) => {
1
2
3
4
5
6
7
8
}
9
this.graphql_query = {
    query: `{
      card(id: 397325159) {
      title url comments{text} fields{name value}
    }
  }`
}
steps.
pipefy_look_up_card_by_id
Looks up a card by its ID.
auth
(auths.pipefy)
params
Graphql query

A graphql query as per Card specification.

 
key
 
value
object ·params.graphql_query
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
}
25
/* See the API docs: https://api-docs.pipefy.com/reference/queries/#card

Example query:

{
  card(id: 301498507) {
    title url comments{text}
  }
}
*/

if (!params.graphql_query) {
  throw new Error("Must provide graphql_query parameter.");
}

return await require("@pipedreamhq/platform").axios(this, {
  method: "post",
  url: `https://api.pipefy.com/graphql`,
  headers: {
    Authorization: `Bearer ${auths.pipefy.token}`,
  },
  data: params.graphql_query
});