Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: Ensure your token has permissions to view automations.
- Organization ID: Identify the Organization to retrieve the automations from.
- Repo ID: Identify the repo to retrieve the automations from. If omitted, the query will return automations from all repos that the user has access to in the given Organization.
Step 1: Find Your Organization ID
1. Via Pipefy UI
- Open the Organization in your browser.
- The URL will include the Organization ID:
https://app.pipefy.com/organizations/123456789
. - Organization ID =
123456789
(the number after/organizations/
).
2. Via GraphQL Query
- Refer to our Get resource IDs page for alternative methods.
Step 2: Find Your Repo ID
1. Via Pipefy UI
- Open the pipe in your browser.
- The URL will include the Repo ID:
https://app.pipefy.com/pipes/9876543210
. - Repo ID =
9876543210
(the number after/pipes/
).
2. Via GraphQL Query
- Refer to our Get resource IDs page for alternative methods.
Step 3: Query Automations
Use the automations
query to retrieve automations of an organization or repo. Below is an example:
{
automations(repoId: "123", organizationId: "321") {
edges {
node {
id
name
action_id
event_id
}
}
totalCount
pageInfo {
hasNextPage
endCursor
}
}
}
Available filters and sorting
The automations
query also accept other filters that can be used individually or combined:
active
: possible values: true/false. Filters the automations by status of active (true) or inactive (false).action_id
: Filters the automations by action_id. I.e.:create_card
.search
: Filters the automations by a portion of the name. It's case insensitive.
{
automations(
repoId: "123"
organizationId: "321"
search: "name"
active: true
action_id: "create_card"
) {
edges {
node {
id
name
action_id
event_id
}
}
totalCount
pageInfo {
hasNextPage
endCursor
}
}
}
The automations list can also be sorted, using the sort
property, that accepts the properties by
and order
:
by
: Indicates the field used in the sorting. Available fields are:created_at
andname
. If omitted,created_at
will be used.order
: Indicates the direction of the sorting. It can beasc
for ascending order, ordesc
for descending order. If omitted,asc
will be used.
{
automations(repoId: "123", organizationId: "321", sort: { by: name, order: desc }) {
edges {
node {
id
name
action_id
event_id
}
}
totalCount
pageInfo {
hasNextPage
endCursor
}
}
}
Key Fields Explained:
The automations
query uses pagination. Refer to our Pagination basics page to understand more about how it works.
id
: Automation unique identifier.active
: Indicates if automation is active (true) or inactive (false).name
: Name of the automation.action_id
: Identifier of the action that the automation performs.action_params
: A json with the action configuration.action_repo_v2
: Information about the repo in which the action is performed.condition
: Information about the conditions that the automation has to follow to be executed (if any).created_at
: When the automation was created.event_id
: Identifier of the event that needs to happen so the automation is triggered.event_params
: A json with the event configuration.event_repo
: Information about the repo in which the event happens to trigger the automation.related_cards
: Lookup related cards by their ID. For recurrent activity automations.searchFor
: Lookup related cards by filters. For recurrent activity automations.schedulerCron
: Configuration of the cron scheduler. For recurrent activity automations.scheduler_frequency
: The frequency of the scheduler event. For recurrent activity automations.response_schema
: The configured schema for the automation's response, for automations of type HTTP request.url
: Automation's URL.
Step 4: Execute and Interpret the Response
After running the query, you'll receive a structured JSON response. Here’s an example:
{
"data": {
"automations": {
"edges": [
{
"node": {
"id": "1",
"name": "First automation",
"action_id": "create_card",
"event_id": "card_moved"
}
}
],
"totalCount": 1,
"pageInfo": {
"hasNextPage": false,
"endCursor": "WyJDYW5jZWxlZCBPcmRlciIsMV0"
}
}
}
}
This query provides a quick and effective way to retrieve information about the automations of an organization or repo.