Generate text responses from OpenAI models using static or dynamic prompts, with optional file context from FTP folders.
Overview
The Open AI node is an AI node in Rayven workflows. It enables you to connect to OpenAI’s large language models (LLMs) to generate natural language outputs based on prompts you define.
The node can be used with:
-
Static prompts – pre-written instructions always used when the workflow runs.
-
Dynamic prompts – instructions constructed from workflow payloads, tables, or calculated values.
-
Reference documents – content read from FTP folders (e.g. PDFs, Word, CSV, JSON) to provide extra context.
Outputs from the node can be passed downstream in the workflow, displayed in interfaces, or written to tables.
Configuration
1. Prompt Type
-
Static Prompt: Enter plain text directly in the node. This text will always be used when the workflow runs.
-
Dynamic Prompt: Select Dynamic and enter the JSON key that contains the prompt. No quotes or symbols are required. The node will use the value from that key whenever a payload passes through.
2. Reference Files (Optional)
-
Point the node to an FTP folder containing documents.
-
File contents can be included in the prompt as supporting context.
3. Output Handling
- The generated output is appended to the workflow payload using your nominated Output JSON key (Output field name), making it available to subsequent nodes.
- All outputs from the Open AI node are returned in string format.
-
You can request structured responses (e.g. JSON) by shaping your prompt, but the result will still be delivered as a string.
-
To work with structured data, use another node (such as the JavaScript node) to parse or transform the string into usable JSON or other formats.
Practical Use Cases
-
Generate insights from tabular data: Combine a Query Table node with Open AI to analyse rows dynamically.
-
Create structured documents: Pass workflow payloads as prompts and request output in CSV or JSON format.
-
Summarise uploaded files: Ingest files via FTP, reference them in the Open AI node, and return summarised text.
-
User-driven queries: Connect the node with a Form or Text Field frontend widget to let application users ask questions directly.
Best Practices
-
Always validate outputs: Use a JavaScript or Rule Builder node to check or format responses before writing to tables or exposing them in interfaces.
-
Request structured results: Where possible, ask the model to return JSON or other structured formats for easier downstream processing.
-
Keep prompts deterministic: Use explicit instructions rather than vague phrasing to improve consistency.
-
Use Inspect Data: During development, regularly check inputs/outputs with the Inspect Data tab to refine prompts.
Summary
The Open AI node allows you to integrate LLM capabilities directly into Rayven workflows. By combining static or dynamic prompts with optional file references, you can generate text, summaries, structured outputs, or interactive responses. Its flexibility means outputs can be routed into tables, used in automations, or surfaced in interfaces for application users.
FAQs
Q: Can I use both static and dynamic prompts together?
A: No. You must choose either Static or Dynamic when configuring the node. If you select Static, the node will always use the plain text you enter. If you select Dynamic, the node will use the value from the JSON key you specify as the prompt.
Q: What file types can I use as reference material?
A: Currently text, CSV and PDF files are supported by the Open AI node.
Q: Does Rayven host the AI models?
A: No. The Open AI node connects securely to OpenAI’s APIs. Rayven acts as the enabler to integrate outputs into your application.
Q: Can I control the format of the output?
A: The output from the Open AI node is always returned as a string. You can request the model to structure its response in JSON (or another format), but it will still be passed through the workflow as a string. If you need to work with it as JSON, use another node (e.g. the JavaScript node) to parse or manipulate the output.
Q: Is the output stored automatically?
A: Yes. All workflow outputs, including those from the Open AI node, are automatically stored in Rayven’s unstructured Cassandra database, keyed by UID, Node ID, and Timestamp. This provides a complete history of workflow activity.
If you also want to store the result in a structured table (Primary or Secondary Table) for querying, lookups, or use in interfaces, you’ll need to map the output using an Update Table node. You can also send results to external systems via connector nodes.