Let's face it: researching companies manually is like trying to drink from a fire hose while blindfolded. You spend hours googling, reading random articles, and somehow still end up with half the picture.
But here's the plot twist: with Diaflow's automation magic and a sprinkle of AI brilliance, you can turn any company input into a comprehensive professional report in minutes, not hours.
Perfect for:
- Investment analysts who need quick company insights
- Sales teams researching prospects before big calls
- Consultants who want to sound incredibly well-informed (without the all-nighter research sessions)
Let's build your personal research assistant. Coffee is optional, but recommended.
What You're About to Build
A smart 6-step automation that works like having a research intern who never sleeps:
- You ask a input about any company
- AI converts it into perfect Google search terms
- System pulls real-time data from the web
- Content gets analyzed and structured using vector intelligence
- AI writes a comprehensive professional report
- You get insights that would normally take hours to compile
Think of it as having a Bloomberg terminal, but friendlier and way less expensive.

What You'll Need (The Toolkit)
Before we dive in, make sure you have:
- A Diaflow account (obviously)
- OpenAI API access (for the brain power)
- SerpAPI key (your Google search superpower)
- MongoDB Atlas plugin enabled (don't worry, it's automatic - no setup headaches)
Got everything? Great! Let's make some automation magic happen.
Set Up Your Research Flow
- From Diaflow home, click “New Build”
- Choose “Start from Scratch”
- Select: AI Agents / Chatbots

- You will be redirected to the visual flow builder. Here you can still use the chatbot in "simple" mode, but be more sophisticated by customizing the chatbot to your liking. In the chat UI configuration, switch from "Simple" to "Advanced" mode.

Step 1: Convert inputs into Search Gold (OpenAI-0)
Here's where we get clever. Instead of throwing raw inputs at Google, we'll have AI craft the perfect search query first.
Add an OpenAI block with these settings:
- Model: gpt-4o-mini
- Connect input to your trigger
Prompt (copy this exactly):
Generate a Google search criteria to answer the following input on the context: {{trigger.input}}
Only respond with the Google search criteria.

What happens: Your input "Please evaluate OpenAI" becomes something like "OpenAI company overview team investors market landscape" - much better for search engines.
Think of this as having a librarian who knows exactly which keywords will find the best information.
Step 2: Hunt Down the Data (SerpAPI)
Now we unleash our search power. SerpAPI is like having Google's search results delivered on a silver platter, minus the ads and clutter.
Add a SerpAPI block:
- Engine: Google Search
- Input: {{openai-0.output}} (your optimized search query)
- Search results: 2 (keeps it focused and fast)
- Credentials: Connect your SerpAPI key

This step scours the internet and brings back the most relevant, up-to-date information about your target company. It's like having a research team that works at the speed of light.
Step 3: Merge AI Prompt & Web Data (Multiple data sources to JSON)
🆕 New Step
Organize both the search prompt and the results into a clean JSON structure — essential before feeding into MongoDB vector processing.
- Add a Multiple data source to JSON block
- Inputs:
- openai-0.output (AI-generated query)
- serp-0.output (Web search results)

Step 4: Make Sense of the Data Chaos (MongoDB Atlas)
Raw search results are like puzzle pieces scattered on a table. This step organizes them into something meaningful.
Add a MongoDB Atlas block:
- Input: {{openai-0.output}}
- Data to vectorize: {{serp-0.output}}

What's happening behind the scenes: The system breaks down search results into digestible chunks and identifies which parts are most relevant to your original input. It's like having a speed-reader who highlights all the important bits.
No setup required here - Diaflow handles the technical stuff so you don't have to.
Step 5: Craft the Perfect Report (OpenAI-1)
This is where the magic culminates. Time to turn all that organized data into a polished, professional report.
Add another OpenAI block:
- Model: gpt-4o-mini
- Connect to your MongoDB Atlas output

The report-writing prompt:
Here is some helpful information on the company you are researching:
-----
{{mgo-0.output}}
-----
Write a comprehensive report with the following sections:
1. List of sources
2. Overview
3. Key Facts
4. Key people
5. Landscape
6. Suggested links
This prompt creates reports that look like they came from a professional research firm. Your colleagues will wonder when you became so thorough (your secret is safe with us).
Step 6: Deliver the Goods (Output)
Finally, let's show off your beautiful report.
Add an Output block:
- Custom field: "Result"
- Value: {{openai-1.output}}

This is your moment of glory - watching a comprehensive company report appear from a simple input.
Connect the Research Pipeline
Your workflow should flow like this: input Trigger → Search Query AI → SerpAPI → MongoDB Vector Analysis → Report Writing AI → Output

Each step feeds perfectly into the next, creating a seamless pipeline from curiosity to insight.
Why This Changes Your Research Game
Instead of opening 15 browser tabs, bookmarking articles you'll never read again, and trying to remember which CEO just stepped down, you now have an AI research assistant that:
- Never gets overwhelmed by information overload
- Always provides structured, professional output
- Works 24/7 without coffee breaks
- Pulls the most current information available
- Formats everything in consistent, readable reports
Want to research competitors before a big meeting? Done. Need quick insights on potential partners? Easy. Curious about that startup everyone's talking about? Your research assistant has it covered.
Pro Tips for Research Success
Ask better inputs: Instead of "Tell me about Apple," try "Analyze Apple's competitive position in the smartphone market" - more specific inputs get better reports.
Use it regularly: The more you use it, the better you'll get at crafting inputs that produce exactly the insights you need.
Save your reports: These aren't just throwaway summaries - they're professional research documents you can reference, share, and build upon.
Wrapping It Up
Company research doesn't have to feel like detective work anymore. With Diaflow's automated research flow, you can turn any business input into professional-grade insights faster than most people can Google the company name.
Try it, refine it, and watch your research productivity skyrocket. Because in business, information is power - and now you have a superpower.
Ready to become the most well-informed person in your next meeting? Start building your research assistant now and join the ranks of professionals who've automated their way to research excellence.

How Diaflow Transforms Business Research with Intelligent Automation
At Diaflow, we believe that professional research should be instant, comprehensive, and effortless. This automated company research flow demonstrates how Diaflow combines real-time web data, AI analysis, and intelligent processing to deliver professional-grade business insights in minutes.
Whether you're evaluating competitors, researching prospects, or staying current with industry developments, Diaflow transforms complex research tasks into simple, automated workflows. Stop spending hours on manual research and start making faster, better-informed business decisions with Diaflow's intelligent automation platform.