$ cat workspace-template.yaml
Compliance Check Normativo Settoriale Automatizzato
// Compliance Check Normativo Settoriale Automatizzato tramite input web search e drive
// Canvas Preview
// Instruction
Strumento di Compliance Check settoriale
Overview
This workflow automates the generation of a comprehensive GDPR compliance report for a specific company. It gathers data from three primary sources: web searches for public information, scraping of the company's website, and reading existing documents from a specified Google Drive folder. The collected data is analyzed for DPO requirements and DPIA necessity, merged, and transformed into a formal, legally-structured compliance document which is then saved to Google Drive.
Workflow Chain
(Note: The actual data flow converges through the analysis and merging nodes to produce the final report.)
Node Reference
Input Dinamici (Section)
- What it does: Acts as a container for initial user-provided parameters.
- Inputs from: N/A
- Configurable inputs:
Input Sito Web(String),Input Nome Azienda(String),Input Cartella Drive (Opzionale)(Drive Folder Reader). - Output: Individual string and file reference values.
Web Analysis & Crawler (Section)
- What it does: Orchestrates the web-based data gathering process.
- Inputs from:
Input Sito WebandInput Nome Azienda. - Configurable inputs: N/A
- Output: Scraped web content and search results.
Web Search - Compliance (Workspace)
- What it does: Performs a Brave Search to find relevant URLs.
- Inputs from:
Input Nome AziendaandInput Sito Web. - Configurable inputs:
query(String),country(Select: Any, US, GB, CA, AU, IT),num_results(Number, 1-20). - Output:
urls(Text[]),result_count(Number),rate_limited(Boolean).
Fetch URL as Markdown (Workspace)
- What it does: Scrapes the content of provided URLs and converts them to Markdown.
- Inputs from:
Web Search - Compliance. - Configurable inputs:
urls(Text[]),timeout_seconds(Number, 5-120). - Output:
markdown(Text[]),title(Text[]),success_count(Number).
Web Crawler - Scansione Sito (Workspace)
- What it does: Analyzes scraped website content to identify privacy-relevant pages.
- Inputs from:
Fetch URL as Markdown. - Configurable inputs:
input_text(Text),prompt(Text),llmModelId(LLM Picker). - Output:
output_text(Text) containing a summary of relevant pages.
Analisi Obbligo DPO (Art. 37 GDPR) (Workspace)
- What it does: Evaluates if the company is legally required to appoint a DPO.
- Inputs from:
Web Crawler - Scansione Sito. - Configurable inputs:
input_text(Text),prompt(Text),llmModelId(LLM Picker). - Output:
output_text(Text) detailing DPO necessity.
DPIA - Data Protection Impact Assessment (Workspace)
- What it does: Assesses the need for a formal DPIA based on data processing risks.
- Inputs from:
Web Crawler - Scansione Sito. - Configurable inputs:
input_text(Text),prompt(Text),llmModelId(LLM Picker). - Output:
output_text(Text) containing risk assessment and mitigation plans.
Text Merge (Workspace)
- What it does: Combines the DPO analysis and DPIA assessment into one text block.
- Inputs from:
Analisi Obbligo DPOandDPIA. - Configurable inputs:
text1(Text),text2(Text). - Output:
text(Merged Text).
Documento Compliance Finale (Workspace)
- What it does: Transforms all gathered intelligence into a formal, structured legal document.
- Inputs from:
Text MergeandDocumento Report Compliance(from Drive). - Configurable inputs:
input_texts(Text[]),prompt(Text),llmModelId(LLM Picker). - Output:
output_text(The complete formal report).
Save File - Compliance Report (Workspace)
- What it does: Finalizes the process by saving the generated report to Google Drive.
- Inputs from:
Documento Compliance Finale. - Configurable inputs:
text(Text),name(Text),destinationFolder(DriveItem). - Output:
driveItemId(DriveItem).
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 & Decision
- Call
requestUserDecisionto collect the following:- "Qual è l'URL del sito web da analizzare?" (Context: Needed for the Web Crawler).
- "Qual è il nome esatto dell'azienda?" (Context: Needed for search queries).
- "Seleziona una cartella Drive per il salvataggio del report finale." (Context: Required for the terminal output node).
- "Desideri pubblicare il report direttamente dopo la generazione?" (Context: Determines if the final step is automated or requires confirmation). Phase 1 complete. Now proceed to Phase 2. Do NOT skip to Phase 3.
Phase 2: Data Gathering
- For EACH URL provided by
Web Search - Compliance, repeat: a. ExecuteFetch URL as Markdown. b. Ifsuccess_count> 0, proceed; else, log error. Phase 2 complete. Now proceed to Phase 3. Do NOT skip to Phase 4.
Phase 3: Analysis & Synthesis
- Execute
Web Crawler - Scansione Sitousing the fetched markdown. - Execute
Analisi Obbligo DPO (Art. 37 GDPR)using the output from step 3. - Execute
DPIA - Data Protection Impact Assessmentusing the output from step 3. - Execute
Text Mergeto combine the outputs of step 4 and step 5. - Execute
Documento Compliance Finaleusing the merged text and any documents retrieved from theInput Cartella Drive. Phase 3 complete. Now proceed to Phase 4. Do NOT skip to Phase 5.
Phase 4: Finalization
- If the user chose to publish in Step 1, execute
Save File - Compliance Reportwith the generated text. - If the user did NOT choose to publish, call
requestUserDecisionto ask: "Il report è pronto. Vuoi procedere al salvataggio su Drive?" - If confirmed, execute
Save File - Compliance Report. Phase 4 complete.
followUp
Configuration Tips
Error Handling
Re-editable artifacts
Incremental Edits to an Existing Report
- Detection — If the user provides an existing report text instead of a new company name, treat this as an EDIT.
- Add / remove / reorder recipes — To add a new compliance section, use
sectionFinderto locate the target section,sectionManager(ungroup, { sectionId }), thenorganizeNodesandsectionManager(group, { nodeIds, label }). - Post-edit — After modifying the prompt or input text, re-run the
Documento Compliance Finalenode and honor the original publish decision.
// Dependencies
1from input import WebSearch2from input import String3from input import DriveFolderReader4from process import FetchURLAsMarkdown5from process import TextTransform6from output import SaveFile7from process import TextMerge$ git log --oneline
aggiunto file-name corretto in base a input iniziale