Parse OpenAI response into individual rows

Hi everyone,

It seems I have a common problem, but I can’t find the solution. The JSON response from OpenAI is below.

I would like to create a workflow that takes the text in “choices:message:content” and have each of the “Feature 1” , “Feature 2”, etc be placed in individual rows. As of now, I can only create a workflow that adds the entire content of the response in 1 row.
Is there a way to parse the response so that:

  1. The content is split into multiple rows and
  2. Updates the rows every time new responses come in

Thank you!

    {
    "id": "chatcmpl-7pQvQm9FFWn75T9ioGHRQkgLxE4sX",
    "object": "chat.completion",
    "created": 1692492584,
    "model": "gpt-3.5-turbo-0613",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Feature 1: Automated Appliance Scheduling\nBenefit: Allow homeowners to schedule the usage of their appliances during the peak electricity usage hours (3-8pm on weekdays) to ensure efficient use of energy and minimize consumption.\n\nFeature 2: Energy-Saving Tips and Recommendations\nBenefit: Offer homeowners tailored energy-saving tips and recommendations during the peak hours to help them reduce electricity usage. These suggestions can include adjusting thermostat settings, optimizing lighting, and using energy-efficient appliances."
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 225,
        "completion_tokens": 96,
        "total_tokens": 321
    }
}

I have not tried this before, but I saw someone ask OpenAI to format the content in JSON format, then it can be parsed perhaps using a plugin, and using it as a list!

@salemmo409 thanks, i’m just going to work around it for now. I’m just building an MVP so if users require a smoother process, I’ll come back to this.

FWIW - i read elsewhere that someone asked GPT-4 to write a plugin for this and so that’ll be my route if I come back to this.