Get an Automation by ID

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

  1. Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
  2. Permissions: Ensure your token has permissions to view automations.
  3. Automation ID: Identify the Automation to retrieve details from.

Step 1: Find Your Automation ID

1. Via Pipefy UI

  • Open the Automation in your browser.
  • The URL will include the Automation ID: https://app.pipefy.com/pipes/1234/settings/automations/5678.
  • Automation ID = 5678 (the number after /automations/).

2. Via GraphQL Query

Step 2: Query Automation

Use the automation query to retrieve an automation by its ID. Below is an example:

{
  automation(id: "123") {
    id
    name
    action_id
    event_id
  }
}

Key Fields Explained:

  • 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 3: Execute and Interpret the Response

After running the query, you'll receive a structured JSON response. Here’s an example:

{
  "data": {
    "automation": {
      "id": "1",
      "name": "First automation",
      "action_id": "create_card",
      "event_id": "card_moved"
    }
  }
}

This query provides a quick and effective way to retrieve information about an automation.