Create Organization Report

Create a new organization report with specified configuration

Before You Begin

🔗 Use the GraphQL Playground to execute the mutations 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 the necessary permissions to create reports in the organization.
  3. Organization ID: Identify the Organization where you want to create the report.
  4. Pipe IDs: Identify the Pipes you want to include the cards from in the report.

Step 1: Find The Required IDs

  1. Organization ID:

    1. Open the Organization in your browser.
    2. The URL will include the Organization ID: https://app.pipefy.com/organizations/987654321.
    3. Organization ID = 987654321 (the number after /organizations/).
  2. Pipe IDs:

    1. Open each Pipe in your browser.
    2. The URL will include the Pipe ID: https://app.pipefy.com/pipes/123456789.
    3. Pipe ID = 123456789 (the number after /pipes/).

Step 2: Create Organization Report

Execute the createOrganizationReport mutation:

mutation {
  createOrganizationReport(
    input: {
      name: "Sales Pipeline Overview"
      organizationId: 123456789
      pipeIds: [987654321, 987654322, 987654323]
      fields: ["title", "status", "assignee", "due_date", "priority"]
      filter: {
        operator: and
        queries: [
          { field: "status", operator: contains, value: ["in_progress", "review"] }
          { field: "priority", operator: contains, value: ["high", "medium"] }
        ]
      }
    }
  ) {
    organizationReport {
      id
      name
      cardCount
      color
      createdAt
      fields
      filter
      repos {
        id
        name
      }
    }
  }
}

Response Example

{
  "data": {
    "createOrganizationReport": {
      "organizationReport": {
        "id": "456789123",
        "name": "Sales Pipeline Overview",
        "cardCount": 1250,
        "color": "#FF6B6B",
        "createdAt": "2024-03-13T15:30:00Z",
        "fields": ["title", "status", "assignee", "due_date", "priority"],
        "filter": {
          "operator": "AND",
          "queries": [
            {
              "field": "status",
              "operator": "IN",
              "value": ["in_progress", "review"]
            },
            {
              "field": "priority",
              "operator": "IN",
              "value": ["high", "medium"]
            }
          ]
        },
        "repos": [
          {
            "id": "987654321",
            "name": "Sales Pipeline"
          },
          {
            "id": "987654322",
            "name": "Lead Management"
          },
          {
            "id": "987654323",
            "name": "Customer Success"
          }
        ]
      }
    }
  }
}

Arguments Explained

Required Arguments

  • name: The display name for the report
  • organizationId: The organization where the report will be created
  • pipeIds: Array of pipe IDs to include in the report

Optional Arguments

  • fields: Array of field names to display as columns in the report
  • filter: Complex filter object to limit which cards appear in the report

Filter Structure

The filter argument supports complex filtering with the following structure:

filter: {
  operator: and | or
  queries: [
    {
      field: String      # Field name to filter on
      operator: String   # Filter operator (eq, not_eq, contains, etc.)
      value: Any         # Filter value(s)
    }
  ]
  groups: [              # Nested filter groups
    {
      operator: and | or
      queries: [...]
    }
  ]
}