> 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/studio/nodes/action-nodes/diaflow-pages.md).

# Diaflow Pages

Diaflow Page provides users with essential capabilities to manage and manipulate document-based content within their workflows.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FC1QKo5oZg5mtrL5nFiwr%2Fimage.png?alt=media&amp;token=284295b4-bd46-4d23-9ba9-3ca365e03928" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FtmNH6c1np3FI7LsH0kq0%2Fimage.png?alt=media&amp;token=c0a7fae7-20d8-4824-82d8-19fd51e94084" 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="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FgM9h71p08j2rmgBt78bT%2Fimage.png?alt=media&amp;token=30d66cb2-16a5-4a55-870a-08ad63101b60" alt=""><figcaption></figcaption></figure>

**Output:**

* The data has been added to the page

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FMm3M6tAoMP8CP6DbqhlP%2Fimage.png?alt=media&amp;token=06b9e4f9-d500-4f4e-ade2-740970e2503c" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FcpHMFyJkDhWbhJYxKJRf%2Fimage.png?alt=media&amp;token=125a217f-52b1-465d-91c9-1cb0c10a9508" alt=""><figcaption></figcaption></figure>
