Diaflow's Documentation
HomePricingIntegrations
Documentation
Documentation
  • 😎WELCOME TO DIAFLOW
    • Introduction to Generative AI
    • What can you build with Diaflow?
  • 💻USER ACCOUNT
    • Create your user account
    • Delete your user account
    • Log out and log in
    • Change "Personal" & "Workspace" settings
    • Reset user account password
  • 🚀Getting Started
    • Let's start with the basics
      • How a component works?
      • How a flow works?
      • Creating your first flow
    • Dashboard
      • Services
      • Create a flow from scratch
      • Create a flow from templates
      • View your flows
    • Terminology
  • 🌊Flows
    • Overview
    • Create a flow
    • Delete a flow
    • Manage a flow
    • Publish a flow
    • Unpublish a flow
    • Deployment
    • Component Reference
      • Trigger
        • When inputs are submitted (Apps)
        • Cronjob (Automation)
        • Webhook (Automation)
        • Microsoft Outlook (Automation)
      • Outputs (Apps)
        • Text Output
        • Chart Output
        • Video Output
        • Audio Output
        • Image Output
      • Built in tools
        • Branch
        • Merge (Multiple data source to JSON)
        • Split Data (JSON Formatter)
        • Video to audio
        • Get current date and time
        • Web scraper
        • Document to plain text
        • Retrieve data from spreadsheet (Spreadsheet analyzer)
        • Spreadsheet creator
        • Convert JSON to chart data
        • PDF to image
        • Get weather information
        • HTTP Request
        • Get GEO Location
        • SMTP
        • Loop
      • Built in resources
        • Diaflow Vision
        • Diaflow Vectors
        • Diaflow Drive
        • Diaflow Table
      • Apps
        • Hunter.io
        • Outlook Email
        • Telegram
        • Slack
        • Python
        • YouTube
        • SerpAPI
        • Google Sheet
          • Document-level Operations
          • Sheet-level Operations
          • Data-level Operations
      • Database
        • MySQL
        • Microsoft SQL
        • PostgreSQL
        • Snowflake
      • Private AI/LLM Models
        • OpenAI
          • GPT Variants
          • GPT Vision
          • DALL-E Variants
          • TTS Variants
          • Whisper
        • Anthropic
        • Llama
        • Google Gemini
        • Cohere
        • MistralAI
      • Public AI/LLM Models
        • OpenAI Cloud
        • Perplexity Cloud
        • Deepseek Cloud
        • Anthropic Cloud
        • Replicate
        • Straico
        • OpenRouter
        • Cohere Cloud
        • Google Gemini Cloud
        • MistralAI Cloud
        • ElevenLabs Cloud
      • AI Tools
  • ✒️PRODUCTIVITY TOOLS
    • Tables
    • Drive
    • Vectors
      • Document
      • Article
      • URLs
  • 🏠Workspace
    • History
    • Teams
    • Billing & Subscription
      • Upgrade/Downgrade a subscription
      • Buy credits
      • Credit Usage
      • Cancel a subscription
    • Settings
      • Personnal
      • Workspace
        • Change workspace
        • Workspace settings
        • Custom Domain
        • Delete workspace
      • Change Language
    • Documentation
    • Integrations
    • API keys
  • 📑Other
    • FAQs
    • Contact Information
Powered by GitBook
On this page
  • 1 - Create the flow
  • 2 - Build the flow
  • 3 - Configuration
  • 4 - Run the flow

Was this helpful?

  1. Getting Started
  2. Let's start with the basics

Creating your first flow

Last updated 1 month ago

Was this helpful?

Harnessing the power of Diaflow's cutting-edge AI technology, we'll create a flow that not only analyzes but also intelligently responds to your document-related queries.

The goal of this example is to create a flow with a PDF file and a question as inputs, and to generate the answer to the question as the output. In our case, we are going to use a document that discusses Covid-19 and ask the AI to answer questions related to the document.

1 - Create the flow

Because this is your first flow, we will create the flow using the build from scratch. To create a flow, click on "New build"

You can choose one of three types:

  • Automation

  • Apps & Tools

  • Ai Agent/Chatbots

2 - Build the flow

With this example, choose Apps & Tools

Now we gonna add two components.

  • The first one is MongoDB Atlas. This component is a database who takes in "Input" a question and in "Data to vectorize" the file we have put in trigger. MongoDBAtlas is used to vectorize large amounts of data suitable for feeding into a model component. In our case he is used to query about the content of the PDF file.

  • The second component is OpenAI, which can generate a response based on the database output. OpenAI offers many models, but for our purposes, we will use GPT-3.5 Turbo.

3 - Configuration

The next step is the configuration of each component. We will start with the "Trigger". In the "Config," you will add two inputs: the first is a question, and the second is a file.

For the example, the question we will use is : "How much is the estimated loss of revenue from the airlines and airports in 2020 due to the COVID-19 pandemic ?".

To insert the text you have to click on "Preview" in "Trigger" and write the question. And the document is a PDF File called "Covid19_SITREP".

You can download the PDF link just below and upload the document in "File".

For the configuration of the MongoDB Atlas you just have to put the right elements in "Input" and "Data to vectorize" like down below.

The configuration for the OpenAI component should be set up as follows.

The final step is configuring the output. It’s quite similar to the input configuration: click on "Add," enter "Response" in the "Title" field, put an "@" in the "Value" field, select opa-0.output, and then click "OK."

Now all configurations have been done it’s time to execute the flow.

4 - Run the flow

To execute the flow it's pretty simple. You have to click on "Execute" on the top right of your screen.

Once the "Run" button has been clicked, the "Flow diagnostics" right-aligned sidebar will be displayed, showing you the current execution status of the flow. After a short period of time, the text output component will be populated with the result of your inquiry about the source document.


Congratulations on your inaugural Diaflow experience! You've just witnessed the seamless creation of a dynamic flow using our innovative flow template, effortlessly tapping into the power of AI technology.

🚀
1MB
Covid19_SITREP.pdf
pdf
PDF link for the example