1. Home
  2. 5: Automation & Workflows
  3. Input Protocol + IoT Connector Nodes

OpenAI Node Configuration Guide

The OpenAI Node enables Rayven workflows to interact with OpenAI's large language models (e.g., GPT-4) by sending a prompt and receiving a generated response. It supports both static prompts and dynamic prompts built from incoming workflow payloads.

What It Does

This node integrates with OpenAI’s API to generate text-based output from a prompt. You can configure it to run:

  • Manually (on incoming payloads),

  • On a schedule (trigger),

  • Or conditionally (with activation filters).

The response is added to the payload and passed downstream under a configurable key.


 Step-by-Step: How to Configure the OpenAI Node

  1. Add the node

    • Drag the OpenAI Node from the External Services section into your workflow.

  2. Enter API credentials and select a model

    • You must have an active OpenAI API key and access to the selected model.

  3. Define your prompt source

    • Choose static text, a dynamic string from incoming payloads, or a file from FTP.

  4. Optionally configure trigger logic

    • If enabled, the node will generate output on a schedule, not just on incoming payloads.

  5. Connect downstream logic nodes

    • The generated text will be added to the payload at the specified output field name.


 Configuration Fields

General Settings

Field Requirement Description
Node Name* Required Internal reference for the node in your workflow.
Output Field Name* Required Key under which the OpenAI response will be added to the outgoing payload.
API Key* Required Your OpenAI API key. Keep this secure.
Model* Required Select the model to use. Options may include gpt-4, gpt-3.5-turbo, etc.
 

 Prompt Source

Field Requirement Description
Prompt Source* Required Select how the prompt is defined:
- Static: Manually enter the full prompt.
- Dynamic: Extract from a field in the incoming payload.
- FTP File: Load the prompt text from an FTP file.
Text Area Optional If using Static, this is where you type the prompt.
FTP Address / Username / Password Required only if using FTP File. Connects to an FTP server to fetch the file contents as prompt input.  
 

 Trigger (Optional)

Field Description
Enable Trigger If enabled, runs automatically on a schedule.
Interval Between Trigger Events Time between executions.
Interval Units Time unit for scheduling (e.g., Minutes, Hours, Days).
 

 Activation Filters (Optional)

Field Description
Logical Operand Choose how filters are combined (AND / OR).
Select Data Source Filter Limit execution to specific UIDs or device labels.
 

 Output Example

Input Payload:

json
CopyEdit
{
"product": "Rayven Edge Gateway",
"question": "What are its core features?"
}

With:

  • Prompt = "Provide a summary of [[question]] for [[product]]."

  • Output Field Name = ai_response

Result:

json
CopyEdit
{
"product": "Rayven Edge Gateway",
"question": "What are its core features?",
"ai_response": "The Rayven Edge Gateway enables real-time data ingestion, local processing, and secure transmission to cloud services. Key features include low latency response, device integration, and rule-based processing at the edge."
}

 Best Practices

  • Keep prompts short but clear — language models respond best to well-structured input.

  • Use [[field]] notation for dynamic prompts built from incoming payloads.

  • Sanitize user input if using prompts that contain open-ended or user-submitted data.

  • Avoid long-running requests in trigger mode to prevent backlog accumulation.

  • Never store your API key in shared configuration files.


 Use Cases

  • Auto-generate summaries, recommendations, or classifications

  • Explain complex data fields in plain language

  • Convert structured input into formatted output (e.g., alerts, scripts, reports)

  • Translate user input into commands or queries

  • Enrich telemetry or UI data for dashboards


 FAQ

Q: Can this node use function-calling or vision models?

A: Not currently. Only text generation models are supported via standard prompt/response interaction.

Q: How is API rate limiting handled?

A: You are responsible for staying within your OpenAI API rate limits. Use Upload Interval and Triggers wisely.

Q: Can this node generate multiple fields in one output?

A: Yes — include structured output in your prompt (e.g., “Respond in JSON format”).