ZBrain Documentation
  • ZBrain Documentation
    • Components of ZBrain
    • Getting started with ZBrain
    • 📚Knowledge base
      • How to create a knowledge base?
      • Knowledge source
      • Information schema
      • File summary
      • Automated reasoning
      • Retrieval testing
      • Knowledge base settings
    • 📱APP
      • How to create a new app?
      • How to set up and customize your app?
      • How to access the app reporting dashboard?
    • 🤖ZBrain AI agents
      • Get started with agents on ZBrain
      • Deploying pre-built agents
      • Creating custom AI agents
        • Agent setup
        • Define input sources
        • Define Flow
          • Key elements of a Flow
          • Flow Components
            • Activepieces Platform
            • AITable
            • Airtable
            • Amazon S3
            • Amazon SNS
            • Amazon SQS
            • Amazon Textract
            • Apify
            • Apollo
            • Approval
            • Asana
            • Azure Communication Services
            • Azure Cosmos DB
            • Azure Document Intelligence
            • Azure OpenAI
            • Azure Translation
            • Bannerbear
            • Baserow
            • Beamer
            • Bedrock Claude
            • Bettermode
            • Binance
            • Bing Search
            • Blackbaud
            • Bonjoro
            • Box
            • Brevo
            • Brilliant Directories
            • Bubble
            • CSV
            • Calendly
            • Certopus
            • Clearout
            • Clockodo
            • Code
            • Confluence
            • Connections
            • Constant Contact
            • Contiguity
            • Contentful
            • Customer.io
            • Crypto
            • Databricks
            • Data Mapper
            • Date Helper
            • DeepL
            • Delay
            • Discord
            • Discourse
            • Drip
            • Dropbox
            • Dust
            • Facebook Pages
            • Figma
            • Files Helper
            • Flowise
            • Flowlu
            • Formbricks
            • Frame
            • Freshdesk
            • Freshsales
            • GCloud Pub/Sub
            • GenerateBanners
            • GhostCMS
            • GitHub
            • GitLab
            • Gmail
            • Google Calendar
            • Google Contacts
            • Google Docs
            • Google Drive
            • Google Forms
            • Google Gemini
            • Google My Business
            • Google Search
            • Google Search Console
            • Google Sheets
            • Google Tasks
            • Groq
            • Hacker News
            • Heartbeat
            • HubSpot
            • HTTP
            • Image Helper
            • Inputs
            • Instagram for Business
            • Intercom
            • Invoice Ninja
            • Jira Cloud
            • Jotform
            • Kimai
            • Kizeo Forms
            • LeadConnector
            • Line Bot
            • Linear
            • LinkedIn
            • LinkedIn Actions
            • LLMRails
            • Lusha
            • MailerLite
            • Mailchimp
            • Mautic
            • Microsoft Dynamics 365 Business Central
            • Microsoft Dynamics CRM
            • Microsoft Excel 365
            • Microsoft OneDrive
            • Microsoft Outlook Calendar
            • Microsoft Teams
            • Mixpanel
            • MongoDB
            • Notion
            • Odoo
            • OpenAI
            • OpenRouter
            • Pastebin
            • PDF
            • Postgres
            • PostHog
            • Pushover
            • Qdrant
            • Queue
            • Razorpay
            • Router
            • Salesforce
            • SendGrid
            • ServiceNow
            • SFTP
            • SharePoint
            • Slack
            • SMTP
            • Snowflake
            • SOAP
            • Spotify
            • Stability AI
            • Stable Diffusion Web UI
            • Storage
            • Stripe
            • SurrealDB
            • SurveyMonkey
            • Taskade
            • Telegram Bot
            • Text Helper
            • Trello
            • Twilio
            • Twitter
            • Utilities
            • WhatsApp Business
            • WordPress
            • XML
            • YouTube
            • ZBrain
            • Zendesk
            • ZeroBounce
            • Zoho Books
            • Zoho CRM
            • Zoho Invoice
            • Zoom
          • How to Define a Flow?
          • How to Test Each Step in the Flow?
        • Configure Additional Settings
        • Test and Deploy Agents
        • How to access, monitor, and manage agent performance and tasks?
    • Settings
    • đź“–API Tutorials
      • 📚Knowledge base
        • Automated Reasoning
      • 📱APP
      • 🤖Agents
Powered by GitBook
On this page
  • How to Integrate Utilities with ZBrain Flow?
  • How to Configure the “Tokenizer” Action in ZBrain Flow?
  • How to Configure the “PDF to Text” Action in ZBrain Flow?
  • How to Configure the “File to Base64” Action in ZBrain Flow?
  • How to Configure the “PDF to Images” Action in ZBrain Flow?
  • How to Configure the “Web Scrapper” Action in ZBrain Flow?
  • How to Configure the “App Output” Action in ZBrain Flow?
  • How to Configure the “Agent Output” Action in ZBrain Flow?
  • How to Configure the “JSON Processor” Action in ZBrain Flow?
  • How to Configure the “Convert HTML to PDF” Action in ZBrain Flow?
  1. ZBrain Documentation
  2. ZBrain AI agents
  3. Creating custom AI agents
  4. Define Flow
  5. Flow Components

Utilities

Utilities in ZBrain Flow are a set of tools and services that provide various essential functions for operating systems and applications. From tokenizing text and converting files to different formats to scraping web content and managing JSON data, Utilities helps streamline many common tasks and workflows within your automation.

How to Integrate Utilities with ZBrain Flow?

  1. Click the “+” Button in the Flow Open your ZBrain Flow and select the plus sign (+) to add a new step.

  2. Search for “Utilities” Type “Utilities” in the search bar to view the available tasks.

  3. Choose the Desired Task Select the specific Utility you want to include in your Flow.

  • Tasks you can perform with Utilities

    • Tokenizer: Breaks down text into tokens and calculates the token count.

    • PDF to Text: Extracts text content from a PDF file.

    • File to Base64:Converts a file (e.g., PDF, image) into a Base64-encoded string.

    • PDF to Images: Splits a PDF document into individual image files (one image per page).

    • Web Scrapper: Extracts content from websites by scraping the specified URL.

    • App Output: Returns the flow’s output to the App chatbot.

    • Agent Output: Configures Agent Dashboard output.

    • JSON Processor: Stringifies or parses JSON based on the selected option.

    • Convert HTML to DOCX: Transforms HTML content into a DOCX file.

    • Convert HTML to PDF: Converts HTML content into a PDF file.

Tokenizer

  • Breaks down text into tokens and calculates the token count.

  • Useful for analyzing text length or preparing text for AI language model inputs.

How to Configure the “Tokenizer” Action in ZBrain Flow?

Step 1. Add the “Tokenizer” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select Tokenizer from the available actions.

Step 2. Configure the “Tokenizer” Action

  1. Text

    • Provide the text you want to tokenize.

    • You can enter static text or map data from previous steps (e.g., user input, AI-generated content).

  2. Encoder

    • Select the encoder to use for tokenization (e.g., cl100k_base).

    • This determines how the text is split into tokens and how many tokens are counted.

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve entered the text and chosen an encoder, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “Tokenizer” action processes the text as expected.

  3. Check the Output

    • The output will typically include both the tokenized text (an array of tokens) and the total token count.

    • Use these tokens in subsequent steps if needed (e.g., limiting text length for an AI model).

PDF to Text

  • Extracts text content from a PDF file.

  • Ideal for quickly obtaining the text portion of PDFs for further processing or storage.

How to Configure the “PDF to Text” Action in ZBrain Flow?

Step 1. Add the “PDF to Text” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select PDF to Text from the available actions.

Step 2. Configure the “PDF to Text” Action

  1. URL

    • Provide the URL of the PDF file you want to convert.

    • This can be a direct link to a file stored online, or you can map a variable containing the PDF’s URL from a previous step (e.g., after uploading the PDF somewhere).

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve provided the PDF URL, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “PDF to Text” action processes the file successfully.

  3. Check the Output

    • The output typically includes the extracted text from the PDF. You can use this text in subsequent steps (e.g., analysis, storage, or search indexing).

File to Base64

  • Converts a file (e.g., PDF, image) into a Base64-encoded string.

  • Helpful for transmitting binary data in JSON or embedding images directly in HTML.

How to Configure the “File to Base64” Action in ZBrain Flow?

Step 1. Add the “File to Base64” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select File to Base64 from the available actions.

Step 2. Configure the “File to Base64” Action

  1. URL

    • Provide the URL of the file you want to convert.

    • This can be a direct link to a file stored online, or you can map a variable containing the file’s URL from a previous step (e.g., after an upload).

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve provided the file URL, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “File to Base64” action processes the file successfully.

  3. Check the Output

    • The output typically includes the Base64-encoded string of your file. You can use this string in subsequent steps (e.g., storing it in a database, sending via email, or embedding in JSON).

PDF to Images

  • Splits a PDF document into individual image files (one image per page).

  • Great for visually displaying PDF pages in web or mobile applications.

How to Configure the “PDF to Images” Action in ZBrain Flow?

Step 1. Add the “PDF to Images” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select PDF to Images from the available actions.

Step 2. Configure the “PDF to Images” Action

  1. File

    • Provide the URL or path to the PDF file you want to convert.

    • You can map a variable containing the PDF’s URL from a previous step (e.g., an uploaded file).

  2. Pages

    • Specify which pages of the PDF to convert.

    • Use “All” to convert the entire document.

    • Enter a range (e.g., 1-3) or comma-separated pages (e.g., 1,3,5) to convert only certain pages.

  3. Images Resolution

    • Choose the DPI (dots per inch) for the output images.

    • High (300 DPI) is often used for print-quality images, while Standard (72 DPI) might be sufficient for on-screen viewing.

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve entered the PDF file location, pages (if desired), and resolution, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “PDF to Images” action processes the file correctly.

  3. Check the Output

    • The output typically includes a list of generated image URLs—one for each converted page. You can use these images in subsequent steps (e.g., storing them, emailing them, or further processing).

Web Scrapper

  • Extracts content from websites by scraping the specified URL.

  • Perfect for gathering data or automating research from web pages.

How to Configure the “Web Scrapper” Action in ZBrain Flow?

Step 1. Add the “Web Scrapper” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select Web Scrapper from the available actions.

Step 2. Configure the “Web Scrapper” Action

  1. URL

    • Provide the URL of the website you want to scrape.

    • Ensure the page is publicly accessible; login-protected or dynamically generated content may require additional steps or may not be fully supported.

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve entered the website URL, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “Web Scrapper” action successfully retrieves the site content.

  3. Check the Output

    • The output typically includes the raw HTML or extracted text from the page. You can use this data in subsequent steps (e.g., parsing the HTML, searching for keywords, or storing it in a database).

App Output

  • Returns the flow’s output to the App chatbot.

  • Allows you to display or pass final results back to a user-facing interface.

How to Configure the “App Output” Action in ZBrain Flow?

Step 1. Add the “App Output” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select App Output from the available actions.

Step 2. Configure the “App Output” Action

  1. Result

    • Provide the final output or message you want displayed to the user in the chatbot.

    • This can be plain text, or you can map data from previous steps (e.g., AI-generated content, database results).

  2. Context (Optional)

    • Any contextual information that might appear in the query history logs.

    • This can help you or other team members understand how the response was generated.

  3. Instructions (Optional)

    • Provide any instructions used in LLM (Large Language Model) interactions.

    • If you’re returning AI-generated content, you can note the prompt or instructions here for reference.

  4. Model (Optional)

    • Specify the model used for generating the response (e.g., if you’re returning content generated by a particular AI model).

    • This is especially useful for logging or debugging multi-model workflows.

  5. Temperature (Optional)

    • Controls the “creativity” of the AI’s response if you’re incorporating an AI generation step.

    • A lower value (e.g., 0.1) makes the output more focused and deterministic, while a higher value (e.g., 0.8) allows for more varied and creative responses.

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve entered the Result and any optional fields, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “App Output” action correctly returns a message to the chatbot interface.

Agent Output

  • Configures Agent Dashboard output.

  • Enables you to present data in a format suitable for agent interfaces or support dashboards.

How to Configure the “Agent Output” Action in ZBrain Flow?

Step 1. Add the “Agent Output” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select Agent Output from the available actions.

Step 2. Configure the “Agent Output” Action

  1. Output

    • Provide the message or data you want to display on the Agent Dashboard.

    • You can enter static text or map data from previous steps (e.g., user inputs, API responses).

  2. Tenant ID

    • Specify the tenant identifier for the Agent Dashboard environment where this output will appear.

    • Often, this is retrieved from a previous step or set as a static value if you know your tenant ID.

  3. Worker ID

    • Enter the worker identifier corresponding to the agent or process you’re running.

    • This helps the Agent Dashboard know which worker instance the output is associated with.

  4. Worker Record ID

    • Provide the record ID that ties the output to a specific job or workflow instance in the Agent Dashboard.

    • Useful for correlating multiple outputs to the same process.

  5. API Key

    • Enter your API Key if required by your specific Agent Dashboard configuration.

    • This ensures secure authentication and proper routing of the output to the correct dashboard.

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve specified the Output and relevant IDs (Tenant, Worker, Worker Record) and provided any required API Key, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “Agent Output” action successfully sends data to the Agent Dashboard.

JSON Processor

  • Stringifies or parses JSON based on the selected option.

  • Handy for converting objects to JSON strings or interpreting JSON strings as structured data.

How to Configure the “JSON Processor” Action in ZBrain Flow?

Step 1. Add the “JSON Processor” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select JSON Processor from the available actions.

Step 2. Configure the “JSON Processor” Action

  1. JSON Input

    • Provide the JSON object or string you want to process.

    • You can map data from previous steps (e.g., an API response) or enter static JSON manually.

  2. Operation

    • Choose whether you want to Stringify or Parse the input.

    • Stringify: Converts a JavaScript object or array into a JSON string.

    • Parse: Converts a JSON string into a JavaScript object or array.

Step 3. Save and Test

  1. Save Your Configuration

    • Once you’ve specified the input and chosen the operation, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “JSON Processor” action processes your data as expected.

  3. Check the Output

    • If Stringify was selected, the output will be a JSON-formatted string.

    • If Parse was selected, the output will be a structured object or array you can use in subsequent steps.

Convert HTML to DOCX

  • Transforms HTML content into a DOCX file.

  • Useful for generating downloadable documents from HTML templates or user input.

How to Configure the “Convert HTML to DOCX” Action in ZBrain Flow?

Step 1. Add the “Convert HTML to DOCX” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select Convert HTML to DOCX from the available actions.

Step 2. Configure the “Convert HTML to DOCX” Action

  1. HTML Content

    • Provide the HTML code that you want to convert.

    • You can enter static HTML or map data from a previous step (e.g., an email template, AI-generated text, or user input).

Step 3. Save and Test

  1. Save Your Configuration

    • After specifying the HTML Content, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “Convert HTML to DOCX” action successfully processes your HTML.

  3. Check the Output

    • The output typically includes a DOCX file or a URL to the newly generated document.

    • You can use this file in subsequent steps (e.g., attaching it to an email or storing it in a database).

Convert HTML to PDF

  • Converts HTML content into a PDF file.

  • Perfect for creating invoices, reports, or printable versions of web pages.

How to Configure the “Convert HTML to PDF” Action in ZBrain Flow?

Step 1. Add the “Convert HTML to PDF” Step

  1. Insert a New Step

    • In your flow, click the + button to add a new step.

  2. Search for “Utilities”

    • Type “Utilities” in the search bar and select Convert HTML to PDF from the available actions.

Step 2. Configure the “Convert HTML to PDF” Action

  1. HTML Content

    • Provide the HTML code that you want to convert.

    • You can enter static HTML or map data from a previous step (e.g., an email template, AI-generated text, or user input).

Step 3. Save and Test

  1. Save Your Configuration

    • After specifying the HTML Content, click Save or Done.

  2. Run the Flow

    • Trigger your flow to confirm that the “Convert HTML to PDF” action successfully processes your HTML.

  3. Check the Output

    • The output typically includes a PDF file or a URL to the newly generated document.

    • You can use this file in subsequent steps (e.g., attaching it to an email, storing it in a database, or sending it to a printer).

PreviousTwitterNextWhatsApp Business

Last updated 1 month ago

🤖