$ 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
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.
-
Phase 1: Initialization & Data Collection
- Call
requestUserDecisionto 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 ReaderandWeb Searchnodes (Global, Social, Keyword, Review) to gather raw data. - Phase 1 complete. Now proceed to Phase 2. Do NOT skip to Phase 3.
- Call
-
Phase 2: Content Extraction
- For EACH
Fetch URL as Markdownnode, execute the fetch operation using the URLs provided by the correspondingWeb Searchnode. - Ensure all
timeout_secondsare set to 30. - Phase 2 complete. Now proceed to Phase 3. Do NOT skip to Phase 4.
- For EACH
-
Phase 3: Analysis & Processing
- Pass the extracted Markdown content into the respective
Custom Codenodes (Social, SEO, Sentiment). - Execute the Python logic to compute metrics and generate insights.
- Phase 3 complete. Now proceed to Phase 4.
- Pass the extracted Markdown content into the respective
-
Phase 4: Finalization
- Aggregate all outputs into the final
JSON Objectnode. - Call
followUpto present the generated JSON report to the user for review.
- Aggregate all outputs into the final
Configuration Tips
Error Handling
- Fetch Failure: If
Fetch URL as Markdownreturns empty markdown, check theerrorarray output. If the error isssrf_blocked, the URL is restricted; remove it from the input list. - Rate Limiting: If
Web Searchreturnsrate_limited: true, reduce thenum_resultscount or wait before re-executing. - Custom Code Errors: If Python execution fails, verify that the
webContentinput 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 Searchnode and re-run the downstreamFetchandCustom Codenodes. - Post-edit: After any modification, re-run the
Custom Codenodes to refresh the analysis, then re-verify the finalJSON Objectoutput.
// Dependencies
requirements.py
1from input import DriveFolderReader2from input import DriveDocumentReader3from input import JSONObject4from input import WebSearch5from process import FetchURLAsMarkdown6from process import CustomCode