$ cat workspace-template.yaml

A

Analisi Completa Brand

// Analisi del brand, dei competitor, dei social network

Document Generation

// Canvas Preview

canvas.flow

// Instruction

instruction.md

Nodi Analisi Brand Online Drive URL Output JSON

Overview

This workflow performs a comprehensive brand analysis by aggregating data from Google Drive documents, public web searches, social media profiles, and competitor websites. It processes these inputs through specialized analysis nodes to produce a structured JSON report containing brand positioning, SWOT analysis, SEO metrics, sentiment analysis, and strategic recommendations.

Workflow Chain

[Drive Folder Reader]  -> [Drive Document Reader]
[Web Search (Global)]  -> [Fetch URL as Markdown]
[Web Search (Social)]  -> [Fetch URL as Markdown]    -> [Custom Code (Social Analysis)]
[Web Search (Keyword)]  -> [Custom Code (SEO Analysis)]
[Web Search (Review)]  -> [Fetch URL as Markdown]    -> [Custom Code (Sentiment Analysis)]

Node Reference

  • Drive Folder Reader: Scans a selected Drive folder for documents; feeds Drive Document Reader.
  • Drive Document Reader: Extracts text content from Drive files for analysis.
  • Web Search (Global/Social/Keyword/Review): Executes Brave Search queries; outputs a list of URLs.
  • Fetch URL as Markdown: Scrapes content from provided URLs and converts them to Markdown for LLM processing.
  • Custom Code (Social/SEO/Sentiment): Executes Python logic to analyze the aggregated text content and generate specific metrics (e.g., engagement rates, keyword difficulty, sentiment breakdown).
  • JSON Object: Serves as a static data container for templates and final report structures.

Execution Strategy

You MUST complete all 4 phases in order: Phase 1 -> Phase 2 -> Phase 3 -> Phase 4. Do NOT skip any phase.

  1. Phase 1: Initialization & Data Collection

    • Call requestUserDecision to confirm: 1) The target Brand Name, 2) The Google Drive folder ID to analyze, 3) The primary keywords for SEO research, and 4) Whether to proceed with a full automated report generation.
    • Execute Drive Folder Reader and Web Search nodes (Global, Social, Keyword, Review) to gather raw data.
    • Phase 1 complete. Now proceed to Phase 2. Do NOT skip to Phase 3.
  2. Phase 2: Content Extraction

    • For EACH Fetch URL as Markdown node, execute the fetch operation using the URLs provided by the corresponding Web Search node.
    • Ensure all timeout_seconds are set to 30.
    • Phase 2 complete. Now proceed to Phase 3. Do NOT skip to Phase 4.
  3. Phase 3: Analysis & Processing

    • Pass the extracted Markdown content into the respective Custom Code nodes (Social, SEO, Sentiment).
    • Execute the Python logic to compute metrics and generate insights.
    • Phase 3 complete. Now proceed to Phase 4.
  4. Phase 4: Finalization

    • Aggregate all outputs into the final JSON Object node.
    • Call followUp to present the generated JSON report to the user for review.

Configuration Tips

User saysConfigure
"Focus on Italian market"Web Search: country=IT
"Increase search depth"Web Search: num_results=20
"Slow loading pages"Fetch URL as Markdown: timeout_seconds=60

Error Handling

  • Fetch Failure: If Fetch URL as Markdown returns empty markdown, check the error array output. If the error is ssrf_blocked, the URL is restricted; remove it from the input list.
  • Rate Limiting: If Web Search returns rate_limited: true, reduce the num_results count or wait before re-executing.
  • Custom Code Errors: If Python execution fails, verify that the webContent input is not empty and matches the expected schema.

Incremental Edits to an Existing Analysis

  • Detection: If the canvas already contains populated JSON nodes, treat the request as an update.
  • Add/Remove: To add a new competitor or keyword, update the input of the relevant Web Search node and re-run the downstream Fetch and Custom Code nodes.
  • Post-edit: After any modification, re-run the Custom Code nodes to refresh the analysis, then re-verify the final JSON Object output.

// Dependencies

requirements.py
1from input import DriveFolderReader2from input import DriveDocumentReader3from input import JSONObject4from input import WebSearch5from process import FetchURLAsMarkdown6from process import CustomCode