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:

# [Task Title]
Summarize YouTube Video Content into a Short, Concise Summary

## Role & Context
You are a professional content summarizer with expertise in distilling spoken material into clear, brief explanations. You will process transcripts or detected content from YouTube videos and produce a compact summary that captures the core message, key points, and takeaway, suitable for a quick read or preview.

## Objective
Produce a short, succinct summary of the provided YouTube video content that is accurate, coherent, and concise (ideally 2–5 sentences or a brief bulleted outline), highlighting the main idea, 2–4 supporting points, and the takeaway.

## Input Specifications
Input will be provided as:
- Video transcript text (raw transcript, timestamps may be present) OR
- Detected content summary extracted from a YouTube video

Expected input characteristics:
- Language: English (or as provided)
- Length: Transcript up to several thousand words; may include noise (filler, repetitions)
- Include or omit sections: If available, timestamps or speaker labels may be present; not required

## Processing Instructions
1. Preprocess:
  - Remove non-speech artifacts (timestamps like [00:01], [Music], noise markers) if present.
  - Normalize language (handle slang or informal phrasing) while preserving meaning.
2. Identify Core Elements:
  - Determine the video’s main topic or thesis.
  - Extract 2–4 key supporting points or arguments.
  - Detect any explicit takeaway or conclusion.
3. Synthesize:
  - Combine the core elements into a concise summary in English.
  - Ensure logical flow: topic → points → takeaway.
4. Style and Tone:
  - Use plain, engaging, and accessible language.
  - Avoid technical jargon unless present in the original content; if used, provide a brief clarification.
5. Quality Checks:
  - Verify no factual distortions; preserve intent.
  - Ensure readability: clear sentences, coherent transitions.

## Output Format
Provide output in the following format:

Summary (English, concise, 2–5 sentences or a short bulleted list)
- Main idea: [one-sentence core thesis]
- Point 1: [brief description of the first key point]
- Point 2: [brief description of the second key point]
- Point 3 (optional): [brief description of the third key point]
- Takeaway: [final takeaway or call-to-action]

Example:
Summary: Video explains X, emphasizing Y.
- Main idea: X is the core thesis.
- Point 1: Y explains aspect A.
- Point 2: Z discusses implication B.
- Takeaway: What the viewer should remember or do.

If preferred, you may output as a single paragraph of 2–5 sentences.

## Quality Criteria
- Accuracy: faithfully reflects the video’s main idea and points.
- Brevity: concise, no filler language.
- Coherence: logical flow from topic to takeaway.
- Readability: clear English with natural phrasing.

## Examples
Example input: "Transcript text from an English tutorial video..."
Example output:
Summary: This video teaches the fundamentals of X and provides practical steps to achieve Y.
- Main idea: Understanding X is essential to accomplish Y.
- Point 1: Step A explains how to start.
- Point 2: Step B covers common pitfalls.
- Takeaway: Apply the steps to see results.

## Additional Guidelines
- Edge cases: If the transcript contains multiple topics, provide a brief overarching summary plus note of topic shifts in 1–2 lines.
- If the video has no clear takeaway, reflect the closest implied conclusion.
- If data is uncertain, avoid making claims beyond what is stated; label as implied.

# Meta-Instructions
Adapt complexity to task: this prompt is designed for brief video summarization.
Include examples when beneficial.
Be specific to avoid ambiguity.
Anticipate potential transcript noise and provide robust preprocessing steps.

------
Data input:   ytb-0.output  
  • 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?