> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cassidyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Knowledge Base file

> Retrieve a specific file from your Knowledge Base to use in a Workflow.

Retrieve a specific file from your [Knowledge Base](/knowledge-base/overview) to use in a [Workflow](/workflows/overview). Use this when you need the full contents of a known document rather than searching for relevant snippets.

<Steps>
  <Step title="Add the action">
    In the Workflow builder, click **+** between blocks and select **Get Knowledge Base File** from the action library.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/get-knowledge-base-file-img-0.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=e5b42e8969e9e78ea15abaa96458fc6f" alt="Action library with Get Knowledge Base File selected" width="982" height="434" data-path="images/reference/get-knowledge-base-file-img-0.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/NfnWXcqF9xNMFxoX/images/reference/get-knowledge-base-file-img-1.png?fit=max&auto=format&n=NfnWXcqF9xNMFxoX&q=85&s=91fead6f001f448a1f1ebe5bb2c2e8b2" alt="Get Knowledge Base File action added to the Workflow" width="1008" height="1444" data-path="images/reference/get-knowledge-base-file-img-1.png" />
    </Frame>
  </Step>

  <Step title="Select the file">
    Choose how to reference the Knowledge Base file using one of three options:

    * **Static file** — Select a specific file directly from your Knowledge Base. Best when you always need the same document, such as a company policy or standard template.

    <Frame>
      <img src="https://mintcdn.com/cassidy/NfnWXcqF9xNMFxoX/images/reference/get-knowledge-base-file-img-3.png?fit=max&auto=format&n=NfnWXcqF9xNMFxoX&q=85&s=4c726679e964a0ec143306e0bc930ec5" alt="Static file selection from Knowledge Base" width="1008" height="682" data-path="images/reference/get-knowledge-base-file-img-3.png" />
    </Frame>

    * **Knowledge Base Item Reference** — Use a variable that references a Knowledge Base item. Useful when looping through a folder and processing each file individually.

    <Frame>
      <img src="https://mintcdn.com/cassidy/NfnWXcqF9xNMFxoX/images/reference/get-knowledge-base-file-img-4.png?fit=max&auto=format&n=NfnWXcqF9xNMFxoX&q=85&s=8498ee32cf5c73a4ed1e96bd2a400ecc" alt="Knowledge Base Item Reference variable selector" width="1014" height="188" data-path="images/reference/get-knowledge-base-file-img-4.png" />
    </Frame>

    * **Dynamic Path** — Specify a file path using variables or naming conventions. Select the **Knowledge Base Collection** where the document is located, then enter the **Document Path** separated by forward slashes. Useful for grabbing files based on dynamic inputs like client names or date-based reports.

    <Frame>
      <img src="https://mintcdn.com/cassidy/NfnWXcqF9xNMFxoX/images/reference/get-knowledge-base-file-img-5.png?fit=max&auto=format&n=NfnWXcqF9xNMFxoX&q=85&s=036ac440743835e5fc3e419a94ed7e99" alt="Dynamic Path with Collection and Document Path fields" width="1018" height="466" data-path="images/reference/get-knowledge-base-file-img-5.png" />
    </Frame>
  </Step>

  <Step title="Use the file data in subsequent steps">
    Once configured, the following variables are available in later Workflow steps:

    * **File Name** — The name of the retrieved file
    * **File Contents** — The full text content of the file
    * **Link to File** — A direct link to the file in the Knowledge Base
    * **Knowledge Base Item Type** — The type of item (e.g., "Document")
    * **Knowledge Base Item** — A comprehensive object including ID, Name, Item Type, and Item Contents

    <Frame>
      <img src="https://mintcdn.com/cassidy/NfnWXcqF9xNMFxoX/images/reference/get-knowledge-base-file-img-6.png?fit=max&auto=format&n=NfnWXcqF9xNMFxoX&q=85&s=69940328501fa19a236388bb67f92ebc" alt="Output variables available from Get Knowledge Base File" width="1484" height="898" data-path="images/reference/get-knowledge-base-file-img-6.png" />
    </Frame>
  </Step>
</Steps>

## Related

* [Get Knowledge Base Folder Contents](/reference/actions/get-knowledge-base-folder-contents)
* [Search Knowledge Base](/reference/actions/search-knowledge-base)
* [Knowledge Base overview](/knowledge-base/overview)
