$ cat workspace-template.yaml

G

Generazione Video News Trend tramite Input preselezionati

// Template per la generazione di video news a partire dal trend italiano del momento, con la possibilità di scegliere un avatar / vestiario e ambiente di esecuzione.

Document Generation

// Canvas Preview

canvas.flow

// Instruction

instruction.md

Generazione Video News Trend tramite Input preselezionati

Overview

This workflow automates the creation of a news-style video based on current web trends. It searches for trending topics in Italy, summarizes the findings, generates a voiceover, creates a visual avatar with specific clothing, generates a matching background, and finally animates the avatar into a complete video. It requires selected workspaces for the Avatar, Vestiario (Clothing), and Web Trend data.

Workflow Chain

[Workspace Picker - Avatar]  -> [Workspace Break - Avatar]    -> [Image Edit - Unione Avatar e Vestiti]      -> [Avatar in contesto]        -> [Portrait Animation - Avatar Web Trend]
[Workspace Picker - Vestiario]  -> [Workspace Break - Vestiario]    -> [Image Edit - Unione Avatar e Vestiti]      -> [Avatar in contesto]        -> [Portrait Animation - Avatar Web Trend]
[Workspace Picker - Vestiario]  -> [Workspace Break - Vestiario]    -> [Text Transform - Prompt Sfondo]      -> [Image Creation - Sfondo]        -> [Avatar in contesto]          -> [Portrait Animation - Avatar Web Trend]
[Web Search - Web Trend]  -> [Fetch URL as Markdown - Web Trend]    -> [Text Summarizer - Riassunto Web Trend]      -> [Text to Speech - Voce Web Trend]        -> [Portrait Animation - Avatar Web Trend]

Node Reference

Web Trend Branch

  • Web Search - Web Trend: Searches the web for trending topics.
    • Inputs from: User/Manual.
    • Configurable inputs: query (string), country (select: Any, US, GB, CA, AU, IT), num_results (integer 1-20).
    • Output: urls (Text[]), result_count (Number).
  • Fetch URL as Markdown - Web Trend: Scrapes content from URLs.
    • Inputs from: Web Search - Web Trend.
    • Configurable inputs: urls (Text[]), timeout_seconds (integer 5-120).
    • Output: markdown (Text[]).
  • Text Summarizer - Riassunto Web Trend: Summarizes the scraped content.
    • Inputs from: Fetch URL as Markdown - Web Trend.
    • Configurable inputs: content (Text), prompt (Text).
    • Output: summary (Text).
  • Text to Speech - Voce Web Trend: Converts the summary to audio.
    • Inputs from: Text Summarizer - Riassunto Web Trend.
    • Configurable inputs: prompt (Text), language (select: Italian, etc.), voice_reference (Audio).
    • Output: audio (Audio).

Avatar & Clothing Branch

  • Workspace Picker - Avatar: Selects the avatar workspace.
    • Inputs from: User/Manual.
    • Configurable inputs: workspaceId (Workspace).
    • Output: workspace (Workspace).
  • Workspace Break - Avatar: Decomposes the Avatar workspace.
    • Inputs from: Workspace Picker - Avatar.
    • Configurable inputs: workspaceId (Workspace), prompt (Text), driveItemId (DriveItem).
    • Output: image (Image), audio (Audio).
  • Workspace Picker - Vestiario: Selects the clothing workspace.
    • Inputs from: User/Manual.
    • Configurable inputs: workspaceId (Workspace).
    • Output: workspace (Workspace).
  • Workspace Break - Vestiario: Decomposes the Clothing workspace.
    • Inputs from: Workspace Picker - Vestiario.
    • Configurable inputs: workspaceId (Workspace), text2 (Text), value (Text).
    • Output: image (Image), text (Text).
  • Image Edit - Unione Avatar e Vestiti: Merges the avatar and clothing images.
    • Inputs from: Workspace Break - Avatar (image) and Workspace Break - Vestiario (images).
    • Configurable inputs: images (Image[]), prompt (Text), aspect_ratio (Number), megapixel (Number).
    • Output: image (Image).

Background Branch

  • Text Transform - Prompt Sfondo: Generates a background prompt based on the trend.
    • Inputs from: Fetch URL as Markdown - Web Trend or Text Summarizer.
    • Configurable inputs: input_text (Text), prompt (Text).
    • Output: output_text (Text).
  • Image Creation - Sfondo: Generates the background image.
    • Inputs from: Text Transform - Prompt Sfondo.
    • Configurable inputs: prompt (Text), aspect_ratio (Number), megapixel (Number).
    • Output: image (Image).

Final Assembly

  • Avatar in contesto: Merges the combined avatar with the background.
    • Inputs from: Image Edit - Unione Avatar e Vestiti (image) and Image Creation - Sfondo (image).
    • Configurable inputs: images (Image[]), prompt (Text).
    • Output: image (Image).
  • Portrait Animation - Avatar Web Trend: Animates the final image with the audio.
    • Inputs from: Avatar in contesto (image) and Text to Speech - Voce Web Trend (audio).
    • Configurable inputs: image (Image), audio (Audio), resolution (select).
    • Output: video (Video).

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: Setup and User Decisions

  1. Call requestUserDecision to bundle the following questions:
    • "Select the Avatar Workspace" (context: Needed to extract the character image and voice reference via Workspace Break).
    • "Select the Vestiario (Clothing) Workspace" (context: Needed to extract clothing and accessory images via Workspace Break).
    • "Modify Avatar Appearance or Clothing?" (context: Provide custom text prompts to refine the look during the Image Edit stage).
    • "Desired Video Resolution" (context: Determines the final output quality for the Portrait Animation node).
  2. Phase 1 complete. Now proceed to Phase 2. Do NOT skip to Phase 3.

Phase 2: Data Extraction and Audio Generation

  1. Execute Workspace Picker - Avatar and Workspace Break - Avatar using the selected workspace to extract image and audio.
  2. Execute Workspace Picker - Vestiario and Workspace Break - Vestiario to extract clothing images and text.
  3. Execute Web Search - Web Trend using the default query.
  4. Execute Fetch URL as Markdown - Web Trend using the URLs from step 5.
  5. Execute Text Summarizer - Riassunto Web Trend using the markdown from step 6.
  6. Execute Text to Speech - Voce Web Trend using the summary from step 7 and the audio from step 3 as voice_reference.
  7. Execute Text Transform - Prompt Sfondo using the trend summary from step 7.
  8. Phase 2 complete. Now proceed to Phase 3. Do NOT skip to Phase 4.

Phase 3: Visual Asset Generation

  1. Execute Image Creation - Sfondo using the prompt from step 9.
  2. Execute Image Edit - Unione Avatar e Vestiti to merge the Avatar image (step 3) and Clothing images (step 4). If the user provided modification prompts in Phase 1, apply them to the prompt field here.
  3. Execute Avatar in contesto to merge the combined avatar (step 12) with the background (step 11).
  4. Phase 3 complete. Now proceed to Phase 4. Do NOT skip to Phase 5.

Phase 4: Final Animation and Output

  1. Execute Portrait Animation - Avatar Web Trend using the image from step 13 and the audio from step 8, applying the resolution selected in Phase 1.
  2. Call followUp to present the final video to the user.
  3. Phase 4 complete.

Configuration Tips

User saysConfigure
"Make it vertical"Portrait Animation: resolution=1080x1920
"Use a specific voice"Text to Speech: voice_reference=[Drive Item]
"High quality"Image Creation/Edit: megapixel=4
"Change the avatar's hair"Image Edit - Unione Avatar e Vestiti: prompt=[modification request]

Error Handling

ErrorCauseFix
Workspace Break failsSelected workspace is incompatible or empty.Ensure the selected workspace contains the required nodes/outputs.
Fetch URL returns emptyWebsite blocked scraping or timeout.Increase timeout_seconds or try a different search query.
Portrait Animation failsImage/Audio mismatch or unsupported resolution.Ensure the image is a clear portrait and resolution is a standard preset.

Re-editable artifacts

Incremental Edits to an Existing Canvas

  • Detection — If the structure pre-existed this turn, it's an EDIT (delta tools only); a bundled "build AND tweak" request is a fresh build.
  • Add / remove / reorder recipes — To change clothing, use sectionManager(ungroup, { sectionId }) on the Vestiario section, then organizeNodes and autoLayout.
  • Post-edit — After any manual tweak to a node, re-run the Portrait Animation node to reflect changes in the final video. Honor the original publish decision.

// Dependencies

requirements.py
1from input import WorkspacePicker2from process import WorkspaceBreak3from process import ImageEdit4from process import ImageCreation5from input import WebSearch6from process import TextSummarizer7from process import TextToSpeech8from process import PortraitAnimation9from process import FetchURLAsMarkdown10from process import TextTransform