Creating your first flow

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."

You can choose one of three types:

  • Automation

  • Apps & Tools

  • AI Agent/Chatbots

Or

  • Build with AI

  • Discover our community

2 - Build the flow

With this example, choose Apps

User Guide: Summary Video Content from YouTube Video

Section 1: Flow Purpose

Goal: The purpose of this flow is to automatically summarize the content of a YouTube video. By simply providing a URL, Diaflow will process the video and generate a concise summary. This saves users the time and effort required to watch the entire video to extract key information.

Note: This flow only works for YouTube videos that have transcripts/captions available.

Section 2: Configuration

Here is the step-by-step guide to building this flow:

Step 1: Configure the Trigger Node

  • In the Trigger node, create a new field.

  • Set the Type to Short Text.

  • Name the field YouTube URL.

  • Description: This field will be the input where you paste the link to the YouTube video you want to summarize.

Step 2: Add the "YouTube" Node. This node is responsible for extracting the transcript from the video.

Click "+" to add component

The Pop-up will display, search keyword "YouTube"

Choose the "YouTube" card

Config at the YouTube node

  • URL Field: Type @ to open the variable menu and select the output from the Trigger node (the YouTube URL field created in Step 1).

  • Detect Language Field: Select the value Auto Generate.

Step 3: Add the "OpenAI" Node This node will process the transcript and generate the summary.

Choose "OpenAI" node at the component list

  • Connection: Use Diaflow's Private Key.

  • Model: Select your preferred AI model. Recommendation: You should choose models listed from line 5 onwards (e.g., GPT-4o or newer) to ensure the most accurate and optimized response.

  • Prompt:

  • Important: Inside the prompt box, you must type @ to mention/reference the Output (Transcript) from the YouTube node.

Step 4: Configure the "Output" Node

  • Click the "Add" button to define what data you want to display to the end-user.

  • For this use case, add the results from the following two nodes:

    • YouTube (to show the transcript/video info).

    • OpenAI (to show the generated summary).


Section 3: 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 flow.

Section 4: Publish the flow

Click the button "Publish" in the right corner

The Pop-up "Successfully Published" will be displayed. You can use the methods:

  • Internal Apps

  • Public Apps

  • Run via API


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.

Last updated

Was this helpful?