Workflow Overview
- OpenAI Node: Generates a structured JSON object instead of plain text.
- Get Data from JSON Node: Extracts specific parts (e.g.,
part1,part2) into variables. - Send Message Nodes: Displays the variables sequentially with typing delays.
Step-by-Step Implementation
Configure the AI Prompt
First, you must instruct the LLM to output strictly formatted data.
- Add an OpenAI: Generate Text node.
- In the System Prompt or Custom Instructions, add the following instruction:
- Save the response to a Custom Field, e.g.,
{{ai_json_response}}.
Extract Data from JSON
Use the Get Data from JSON action to break the response object into usable variables.
- Add a Get Data from JSON node immediately after your AI node.
- JSON Source: Select your variable
{{ai_json_response}}. - Map the JSON keys to new Custom Fields:
| JSON Path | Save to Variable |
|---|---|
.part1 | {{message_part_1}} |
.part2 | {{message_part_2}} |
.part3 | {{message_part_3}} |
