Generate Artifact Node
此内容尚不支持你的语言。
The generate_artifact node asks a model to produce a file and stores it as an artifact of your workspace. It writes only the new artifact’s id, { "artifactId": 123 }, to its outputVar. Your app reads the artifact and downloads the file through the Artifacts API.
Availability. This node is behind a platform switch that is off by default, and image generation and audio generation each have their own switch, also off by default. While a switch is off the node fails at once with no model call, with the code DISABLED. Do not build a customer-facing flow on it until Wetel has told you it is switched on for your environment. In production it is in the schema (since the 2026-10-30 release), switched off.
A video_script artifact is a small JSON manifest of 1 to 8 scenes (hook, cards, table, flow and a closing call to action), each with a spoken narration, played by the workspace app’s own player in the Documents window; it is not an MP4 file: the Documents window and the chat card play it, and “Download video” records an MP4 (or WebM) in the person’s own browser in real time; the spoken voice is included only when the scenes have speech files (see narrate). It uses the same switch, limits and spend cap as markdown. Scenes carry no URLs or markup.
Audio is limited per workspace per day (10 speech files and 5 music files by default) and each file is capped at 20 MB.
Unlike pdf_export, this node does call a model, so it is billed as a model call and counts toward your workspace’s daily artifact limit and monthly spend cap.
See Workflow Overview for the node/edge envelope this fits into.
Config fields
Section titled “Config fields”| Field | Type | Required | Description |
|---|---|---|---|
artifactType | string | Yes | markdown (a document), html_page (one static page: stored as inert text and shown only in a sandboxed preview; scripts and external files are not supported) or image (a picture, PNG, JPEG or WebP as the model returns it). No other value exists. audio_speech (the prompt is read aloud, stored as a WAV file) or audio_music (a short piece composed from the prompt, stored as an MP3 file). video_script (the model writes a short narrated explainer as scenes; the platform checks it and stores it only if it is valid, otherwise the node fails with BLOCKED). |
promptTemplate | string | Yes | A Handlebars template over the run variables, rendered as plain text, at most 4000 characters. Never put a secret or a signed URL in it: a prompt that looks like a credential is refused. |
titleTemplate | string | Yes | A Handlebars template over the run variables, plain text, at most 500 characters; the rendered title is cut to 200. Stored as the artifact’s title. A title that renders empty fails the node. |
aspectRatio | string | No | Image only: 1:1, 16:9 or 9:16. |
voice | string | No | audio_speech only: a prebuilt voice name (Kore, Charon, Fenrir, Aoede or Puck). Defaults to Kore. |
narrate | boolean | No | video_script only: when true, and the platform has video narration switched on, each scene also gets a spoken voice (one speech file per scene, saved with the video). Each scene counts as one speech file against your workspace’s daily speech limit; a scene whose speech cannot be made simply has no voice and the video still succeeds. Setting it on another artifact type is refused when you save. Default false. |
modelId | string | No | Image and audio only: an allowed model id for the chosen type. An unknown id fails the node. Leave it empty for the platform default. |
outputVar | string | No | Variable that receives { "artifactId": <number> } once the file is stored. Never a URL, a storage path or the file’s content. |
timeoutMs | number | No | Bound on the whole node, 1000 to 300000, default 90000. See per-node timeouts. |
The node also takes the common maxVisits field and the mock fields, like every node. The type, the templates and the limits are checked when you save or publish.
{ "id": "draft_summary", "type": "generate_artifact", "config": { "artifactType": "markdown", "titleTemplate": "Summary for {{customerName}}", "promptTemplate": "Write a one-page summary of this case for the customer: {{caseNotes}}", "outputVar": "summaryDoc" }}Templates are rendered strictly: a template that parses but cannot be rendered with this run’s variables fails the node before any model call, instead of sending raw {{...}} text to the model.
What the node writes
Section titled “What the node writes”Only { "artifactId": <number> }, to outputVar. Nothing else reaches the run variables. Read the file with artifact and artifactDownloadUrl. The artifact records the AI employee (agentId), the model (generator), the session and the workflow run that produced it. Output of a draft test run is marked isTest.
Failures
Section titled “Failures”A refusal is decided before any model is called and carries a fixed code in the node’s error message. The node follows its failure edge when it has one (see failure routing); add one so the user is told something. The message never repeats the provider’s own text.
| Code | Meaning |
|---|---|
DISABLED | The platform switch for artifact generation (or for images) is off. This is the default. |
QUOTA_EXCEEDED | A daily artifact limit or the concurrency limit was reached. |
SPEND_CAP | The workspace’s monthly spend cap is reached. |
INVALID_INPUT | Unsupported type, or an empty, oversized or credential-shaped prompt. |
BLOCKED | The model declined the prompt or returned no image. |
TOO_LARGE | The produced file is over its size limit. |
PROVIDER_UNAVAILABLE | No provider is configured, or the provider failed. |
INTERNAL | Storing the file or its record failed. |
A configuration mistake in the node itself (a bad type, a template that cannot render) fails the node as an author error rather than with one of these codes.
In a mock-mode test
Section titled “In a mock-mode test”A draft test runs in mock mode by default: the config and templates are checked exactly as in a live run, then nothing is generated, stored or billed, and the output is { "artifactId": null, "mocked": true } unless the test supplies a mockResponse.
Next steps
Section titled “Next steps”- Artifacts API: read and download what the node stored.
- PDF Export Node: the model-free way to print structured content.
- Workflow Overview