Text Node

Overview
The Text Node is used to output a string of text. It can also interpolate:
- Values using
{{tags}}within the text. The inputs are dynamically generated based on the interpolation tags used in the text. - Current graph inputs using
{{@graphInputs.<id>}}. It won't generate any node inputs. - Context inputs using
{{@context.<id>}}. It won't generate any node inputs either.
Both @graphInputs and @context support property access expressions like {{@graphInputs.foo.bar[0]}}.
This node is particularly useful for creating dynamic text based on the inputs to the node. The Text Node supports markdown, so you can use it to create richly formatted text.
- Inputs
- Outputs
- Editor Settings
Inputs
| Title | Data Type | Description | Default Value | Notes |
|---|---|---|---|---|
| (dynamic) | string | The inputs are dynamically generated based on the interpolation tags used. | N/A | The input names are derived from the interpolation tags used in the text. For example, if the text contains {{name}}, then there will be an input named name. |
Outputs
| Title | Data Type | Description | Notes |
|---|---|---|---|
| Output | string | The output text after interpolation |
Editor Settings
| Setting | Description | Default Value | Use Input Toggle | Input Data Type |
|---|---|---|---|---|
| Text | The text to output. You can use interpolation tags in the format {{tag}} to insert the values of the inputs. | {{input}} | No | string |
Example 1: Simple Text Output
- Create a Text Node.
- Set the
TexttoHello World!. - Run the graph. The output of the Text Node will be
Hello World.

Example 2: Interpolation
- Create a Text Node.
- Set the
TexttoHello, {{name}}!. - Create a Text Node and set the text to
Rivet. Connect it to thenameinput of the Text Node. - Run the graph. The output of the Text Node will be
Hello, Rivet!.

Example 3: Using Markdown
- Create a Text Node.
- Set the
Textto# Hello, {{name}}!. - Create a Text Node and set the text to
Rivet. Connect it to thenameinput of the Text Node. - Run the graph. The output of the Text Node will be
# Hello, Rivet!.

Error Handling
The Text Node does not have any notable error handling behavior. If an input is missing or null, the corresponding interpolation tag will be replaced with an empty string.
FAQ
Q: Can I use markdown in the Text Node?
A: Yes, the Text Node supports markdown. You can use markdown syntax in the text to create richly formatted text.
Q: Can I use the Text Node to create a template?
A: Yes, you can use the Text Node to create a template by using interpolation tags. You can then connect other nodes to the inputs of the Text Node to fill in the values of the tags.
Q: Can I use the Text Node to concatenate strings?
A: Yes, you can use the Text Node to concatenate strings by using interpolation tags. For example, you can set the text to {{string1}}{{string2}} to concatenate the values of string1 and string2.