Attachment onto a Twin using a URL, data: URL, raw bytes, or JSON-serializable payload, then enriches it with the same workflow execution metadata as update_attachment so the new attachment shows up under the captures section for the twin/environment and the workflow execution.
When to use it
- A workflow generates a fresh image (annotated frame, model output, screenshot) that you want to persist as a new capture rather than overwriting an existing one.
- You need an attachment that is discoverable in the environment’s Executions → Gallery view — the node automatically stamps
metadata.environment_uuid. - You want the new attachment to appear in the workflow execution’s captures list —
metadata.workflow_execution_uuidis always set.
Supported file types
The node is generic — any file type works:- Images —
data:image/png,data:image/jpeg,data:image/webp,image/gif,image/heic,image/heif, plushttp(s)://URLs to image files. - Video —
video/mp4,video/quicktime(.mov),video/webm,video/x-matroska(.mkv),video/x-msvideo(.avi). - Audio —
audio/mpeg(.mp3),audio/wav,audio/ogg,audio/webm. - Text / documents —
text/plain,text/csv,text/markdown,application/json,application/pdf. - Archives / 3D / binary —
application/zip,model/gltf-binary(.glb),model/gltf+json(.gltf),application/octet-stream(falls back to.bin).
data:<mime>;base64,... URLs the bytes are decoded inline; for http(s)://... URLs the bytes are fetched server-side regardless of Content-Type. The extension is auto-inferred from the MIME / URL path when the optional name input doesn’t include one.
Inputs
When
source_url resolves to a dict or list (for example call_model.model_result, a detections array, or a telemetry row), the node JSON-encodes it (json.dumps(..., indent=2, default=str)) and stores it as a .json attachment — no explicit serialize step required.
Anchor rules
Every attachment must belong to something so it has an ACL parent and a discoverable UI surface. The node accepts any one (or more) oftwin_uuid, asset_uuid, environment_uuid. If none of those is supplied, the node falls back to the workflow’s bound environment (when set). A workflow that is bound to neither an environment nor any of these three inputs will fail with a clear error rather than silently producing an orphan attachment.
Discoverability per anchor:
twin_uuid→ twin captures + the environment’s Executions → Gallery view (via auto-stampedmetadata.environment_uuid) + workflow run captures.asset_uuid→ asset attachments + workflow run captures.environment_uuid→ the environment’s Executions → Gallery view + workflow run captures.- workflow-only (workspace anchor via the workflow’s workspace) → workflow run captures only.
Chaining with update_attachment
create_attachment.attachment_uuid is designed to feed straight into update_attachment.attachment_uuid. The analysis blocks merge — create_attachment seeds the initial values (status, prompt, model_*) and update_attachment overlays additional results (result, detections, annotated_image_bytes) without disturbing top-level keys like capture_type or environment_uuid. Typical chain:
Outputs
attachment_uuid— UUID of the newly created attachmentmetadata— final attachment metadata after enrichmentcreated— boolean success flag
Related
update_attachment— enrich an existing attachment instead of creating a new one.