Retrieve Automation Logs by Repo

Before You Begin

🔗 Use the GraphQL Playground to execute the queries in this guide.

Prerequisites

  1. Authentication: Use a Service Account token.
  2. Permissions: Ensure your token has permissions to view automations.
  3. Repo ID: Identify the repo to retrieve logs from.

Step 1: 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

Step 2: Query Automation Logs by Repo

Use the automationLogsByRepo query to retrieve logs for all automations in a specific repo.

{
  automationLogsByRepo(repoId: "123", status: finished, searchTerm: "error") {
    edges {
      node {
        uuid
        status
        automationId
        automationName
        cardId
        cardTitle
        datetime
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
  • repoId: (Required) The repo to retrieve logs for.
  • status: (Optional) Filter logs by status. The available status are: processing, failed and success.
  • searchTerm: (Optional) Filter logs by a search term (minimum 3 characters).

Key Fields Explained

Same as in the Retrieve Automation Logs documentation.

Step 3: Execute and Interpret the Response

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

{
  "data": {
    "automationLogsByRepo": {
      "edges": [
        {
          "node": {
            "uuid": "log-uuid",
            "status": "finished",
            "automationId": "123",
            "automationName": "My Automation",
            "cardId": "456",
            "cardTitle": "Card Title",
            "datetime": "2024-06-01T12:00:00Z",
            "details": {
              "errorType": "ValidationError",
              "message": "Required field is missing."
            }
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "endCursor": "WyJsb2ctdXVpZCIsMV0"
      }
    }
  }
}