Get Knowledge Base Plain Text

Retrieve a pipe-scoped knowledge base plain text 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: You must be admin of the pipe that owns the plain text.
  3. Pipe UUID: Identify the UUID of the pipe that owns the plain text.
  4. Plain Text ID: Identify the UUID of the plain text you want to retrieve. Use the List Knowledge Base Items query to find plain text IDs.

See our Get resource IDs page for how to find these values.

Get a Knowledge Base Plain Text

A knowledge base plain text is a free-form text entry used as an AI data source. The aiKnowledgeBasePlainText query retrieves a single plain text by its ID within a pipe, including the full stored content.

Inputs

  • id: UUID of the knowledge base plain text to retrieve (required).
  • pipeUuid: UUID of the pipe that owns the plain text (required).

Example: retrieve a knowledge base plain text

query {
  aiKnowledgeBasePlainText(id: "f27e4cac-1724-4879-a575-28ccdee4c022", pipeUuid: "pipe-uuid-123") {
    id
    name
    description
    content
    updatedAt
  }
}

Response:

{
  "data": {
    "aiKnowledgeBasePlainText": {
      "id": "f27e4cac-1724-4879-a575-28ccdee4c022",
      "name": "Company FAQ",
      "description": "Frequently asked questions about the company",
      "content": "Q: What is Pipefy? A: An enterprise process management platform.",
      "updatedAt": "2025-01-20T10:00:00Z"
    }
  }
}

Response explained

  • id: Unique identifier of the plain text. Use this in update or delete operations.
  • name: Display name of the plain text.
  • description: Short description of the plain text's purpose.
  • content: The full stored text content that the AI agent searches for relevant information.
  • updatedAt: When the plain text was last updated.

Error handling

If the query fails (e.g., plain text not found, permission denied, or pipe not found), you'll receive an error response:

{
  "data": {
    "aiKnowledgeBasePlainText": null
  },
  "errors": [
    {
      "message": "Pipe not found with id: pipe-uuid-123",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": ["aiKnowledgeBasePlainText"]
    }
  ]
}

Error response explained

  • data.aiKnowledgeBasePlainText: Returns null when the operation fails.
  • errors: Array containing error details when the operation fails.
  • errors[].message: Human-readable error description. Common messages:
    • "Permission denied" — the authenticated user is not an admin of the pipe.
    • "Pipe not found with id: <uuid>" — the pipeUuid does not match an existing pipe.
    • "Record not found" — the plain text id does not match any plain text in the pipe.

Tips