Skip to navigation

Script

The Source node that brings text into a workflow — typed inline or read from an uploaded file.

Family: Source · type: source_script

The Script node is where every line begins. It provides the text the rest of the workflow voices — typed inline or read from an uploaded file. Every runnable workflow has at least one.

Config

Config keyMeaning
input_typeWhere the text comes from — text (typed inline) or file (an uploaded .txt/.pdf)
textThe script, when input_type is text
source_languageThe script’s language (BCP-47, e.g. en-us)
upload_idsConfirmed upload IDs, when the script comes from a file
input_modeplain (default) or markup — in markup mode, provider-native inline tags in the script (a <break/> pause, an SSML subset, inline phonemes) are protected instead of normalized. Models that can’t speak a tag strip it with a warning

The schema also accepts input_type: "media" (transcribe audio into a script), but it is not implemented yet — a run using it fails at the Script node. Use text or file today.

Type your script inline

The simplest source — set the text and its language:

node["config"] = {"input_type": "text", "source_language": "en-us",
"text": "Hello from Onepin."}

Read from a file

Upload the file first, then point the node at the confirmed upload:

node["config"] = {"input_type": "file", "source_language": "en-us",
"upload_ids": [upload_id]}

The upload is a three-step flow (client.uploads.create → PUT the bytes → client.uploads.confirm with context_type="workflow"). See Upload a file for the walkthrough.

Script uploads are .txt and .pdf only. The csv_column and csv_has_header keys still appear in the schema so that definitions saved before CSV support was removed keep loading, but they no longer select anything.

Inspect this node

Get the live config schema straight from the platform:

client.nodes.get_node_detail(node_type="source_script").data