ZBrain Documentation
  • ZBrain Documentation
    • ZBrain XPLR
      • ZBrain XPLR modules
      • Get started with ZBrain XPLR
      • Simulation XPLR
      • Solution XPLR
      • Portfolio XPLR
      • Functional Design XPLR
    • ZBrain Builder
      • Components of ZBrain Builder
      • 📚Knowledge base
        • How to create a knowledge base?
        • Knowledge source
        • Information schema
        • File summary
        • Automated reasoning
        • Retrieval testing
        • Knowledge base settings
      • 📱App
        • How to leverage knowledge base for app creation
        • How to set up and customize your app?
        • How to access the app reporting dashboard?
      • 🤖ZBrain AI agents
        • Get started with agents on ZBrain Builder
        • 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
  1. ZBrain Documentation
  2. ZBrain Builder
  3. ZBrain AI agents
  4. Creating custom AI agents
  5. Define Flow
  6. Flow Components

MongoDB

The MongoDB piece in ZBrain Flow provides integration with MongoDB's document database, allowing you to interact with collections and documents directly from your workflows. This powerful connector enables you to create, read, update, and delete documents without manual intervention. With MongoDB integration, you can build automations that store structured data, retrieve information based on queries, maintain document collections, and synchronize information between your database and other business systems. This piece is ideal for organizations looking to incorporate NoSQL database operations into their automated processes, enabling flexible data storage and retrieval patterns for a wide range of applications.

How to Use MongoDB in ZBrain Flow

Select MongoDB as Your Connection

  • Click on the '+' button in the Flow and search for MongoDB.

  • Select MongoDB.

  • Decide on the action you need, then select it. ZBrain Flow provides several options:

    • Create Item – Add new documents to your MongoDB collections.

    • List All Items – Retrieve multiple documents from a collection.

    • Update Item – Modify existing documents by their ID.

    • Get Item by ID – Retrieve a specific document using its identifier.

    • Delete Item – Remove documents from your collections using their ID.

How to Connect to Your MongoDB Database

Before using any MongoDB actions in ZBrain Flow, you'll need to set up a connection to your MongoDB instance. This is a one-time setup that will allow you to access your database securely.

To create your MongoDB connection:

  • From any MongoDB action, click on the connection dropdown and select 'Create connection'.

  • In the popup window that appears, you'll need to:

    • Enter a descriptive 'Connection Name' to identify this MongoDB connection

    • In the 'MongoDB URI' field, enter your connection string

    • In the 'Database Name' field, enter the name of the specific database you want to access

    • In the 'Collection Name' field, enter the name of the collection within that database

    • Click 'Save' to store this connection

To obtain your MongoDB connection URI:

  1. Log in to your MongoDB Atlas account (or your self-hosted MongoDB admin interface)

  2. Navigate to your cluster's connection settings

  3. Select "Connect your application" and copy the connection string

  4. Replace <username>, <password>, and <cluster> with your actual credentials

How to Add New Documents to MongoDB

Configuration Steps:

  • Connect to your MongoDB instance following the steps in the "How to Connect to Your MongoDB Database" section.

  • In the 'Item' field, enter a JSON object representing the document you want to create. For example: Your document can include nested objects, arrays, and various data types.

How to List MongoDB Items

To list all MongoDB items, simply connect to your MongoDB instance following the steps in the "How to Connect to Your MongoDB Database" section.

How to Update Existing MongoDB Documents

Configuration Steps:

  • Connect to your MongoDB instance following the steps in the "How to Connect to Your MongoDB Database" section.

  • In the 'Item ID' field, enter the unique identifier (_id) of the document you want to update.

  • In the 'Item' field, enter a JSON object containing the fields and values you want to update.

How to Retrieve a MongoDB Document by ID

Configuration Steps:

  • Connect to your MongoDB instance following the steps in the "How to Connect to Your MongoDB Database" section.

  • In the 'Item ID' field, enter the unique identifier (_id) of the document you want to retrieve.

How to Remove Documents from MongoDB Collections

Configuration Steps:

  • Connect to your MongoDB instance following the steps in the "How to Connect to Your MongoDB Database" section.

  • In the 'Item ID' field, enter the unique identifier (_id) of the document you want to delete.

PreviousMixpanelNextNotion

Last updated 28 days ago

🤖