> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/workflow-builder/nodes/built-in-resources/diaflow-pages.md).

# Diaflow Pages

<figure><img src="/files/ElnLZ22rdmxayZJWXD0A" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ebDCggfNQXdS7DOJBcRj" alt=""><figcaption></figcaption></figure>

## Description

**What it does**:&#x20;

* Diaflow Page provides users with essential capabilities to manage and manipulate document-based content within their workflows. Users can automate the creation of new documents, seamlessly append content to existing pages, or extract information for further processing.
* This component serves as a dynamic bridge between your automation logic and your knowledge base, ensuring that reports, articles, and logs are generated and stored efficiently. The Diaflow Page component has the identifier of diaflow-page-X, where X represents the instance number of the Diaflow Page component.

**When to use it?**

* **Add to existing document**: Append new text or data to a document that is already created. Use this when you want to maintain a running log, update a status report, or add a chapter to a long-form text.
* **Add to new document**: Create a completely fresh document from scratch. Use this when your workflow generates a standalone report, a new blog post, or a unique summary that needs its own dedicated file.
* **Retrieve data from a document**: Read and extract the full content of a specific document. Use this when you need to feed existing page content into an AI model for summarization, translation, or analysis.

## Component settings

| Parameter Name | Description                                                                                                                                                                                                                                                                 |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Action         | <p>The action to be performed on the Pages</p><p> </p><p>There are 3 possibilities. </p><ul><li>Add to existing document</li><li>Add to new document</li><li>Retrieve data from a document</li></ul>                                                                        |
| Page           | <ul><li><em>Visible only when "Add to existing document" or "Retrieve data from a document" is selected</em> </li><li>The target document. Select the specific page from your Diaflow Pages library that you wish to interact with.</li></ul>                               |
| Title          | <ul><li><em>Visible only when "Add to new document" is selected</em></li><li>The name of the new document to be created. You can type a static title or use variables to generate dynamic titles (e.g., "Daily Report - {{date}}").</li></ul>                               |
| Content        | <ul><li><em>Visible only when "Add to existing document" or "Add to new document" is selected</em></li><li>The data or text content that will be written into the document. This is usually mapped from the output of previous nodes (such as AI generated text).</li></ul> |

## Use case

Here is a simple use case of the Diaflow Page component, where the component is used to save an AI-generated article into a brand-new document.

**Input**:

* Action = "Add to new document"
* Input = Refer to the output of the node before (OpenAI node)
* Document name = Refer to the output of the node before (Diaflow Pages)

<figure><img src="/files/JxpYj8dEHb38rvunC5aV" alt=""><figcaption></figcaption></figure>

**Output:**

* The data has been added to the page

<figure><img src="/files/P9JAeul4JKO2UVaxV4nD" alt=""><figcaption></figcaption></figure>

At the Diaflow Page, the user reloads the page, views the new document

<figure><img src="/files/lfhOO5UQZAM58sekfHCD" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.diaflow.io/workflow-builder/nodes/built-in-resources/diaflow-pages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
