# Pastebin

The Pastebin piece in ZBrain Flow enables users to create and retrieve text-based content seamlessly within their workflows. It acts as a temporary storage solution for sharing and managing text snippets, logs, or structured data across automation processes. With Pastebin, you can generate new pastes or retrieve existing content, ensuring smooth data handling and integration in your ZBrain workflows.

### **How to Use Pastebin in ZBrain Flow?** <a href="#how-to-use-pastebin-in-zbrain-flow" id="how-to-use-pastebin-in-zbrain-flow"></a>

**Step 1: Select Pastebin as Your Connection**

* Click on the ‘+’ button in the Flow and search for ‘Pastebin’ in the list of available pieces.
* Select ‘Pastebin’ to add it to your workflow.
* Once added, you can choose from the following actions:
  * **Create Paste** – Generates a new paste with your specified content.
  * **Get Paste Content** – Retrieves the text content of an existing paste.

#### **How to Create a Paste in Pastebin** <a href="#how-to-create-a-paste-in-pastebin" id="how-to-create-a-paste-in-pastebin"></a>

**Step 1: Create a Connection**

* Click on the ‘Connection’ dropdown.
* Select an existing connection or click on ‘Create connection.’
* If creating a new connection, a small window will appear. Fill in the following details:
  * **'Connection Name’** – A custom name for your connection to identify it within ZBrain Flow.
  * **‘Developer Key’** – A unique API key provided by Pastebin to authenticate and enable API access.
  * **‘Username’** – The Pastebin account username required for authentication.
  * **‘Password’** – The password for the Pastebin account, used for secure login.
* Click ‘Save’ to finalize the connection.

**Step 2: Configure Paste Details**

* Enter the text content in the ‘Content’ field.
* Select the desired format in the ‘Format’ field.
* Provide a name for the paste in the ‘Name’ field.
* Choose the privacy setting from the ‘Privacy’ dropdown. Options include public, unlisted, and private.
* From the 'Expiry' dropdown, choose how long the paste should remain available.
* In the 'Folder' field, specify a folder to save the paste in (optional).

#### **How to Retrieve Pastebin Content** <a href="#how-to-retrieve-pastebin-content" id="how-to-retrieve-pastebin-content"></a>

**Step 1: Connect to Pastebin**

* To connect to your Pastebin account, follow the first step in the "How to Create a Paste in Pastebin" section above.

**Step 2: Specify the Paste**

* In the 'Paste ID' field, enter the unique identifier of the paste you want to retrieve. This is typically the last part of a Pastebin URL.


---

# Agent Instructions: 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:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/pastebin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
