1

I'm trying to use the OpenAI integration in n8n to extract specific information from a client's message and return it in a structured JSON format.

For example, I want the assistant to extract values like the client's name and city and return a response like this:

{
  "output": "Hi! How would you like to be called? 😊",
  "custom_fields_values": [
    {
      "field_name": "City",
      "values": [{ "value": "Curitiba" }]
    },
    {
      "field_name": "Name",
      "values": [{ "value": "Ana" }]
    }
  ]
}

What should I include in the prompt, and how should I configure the OpenAI node in n8n to make sure the response always follows this JSON structure?

Any tips for making the output reliable and machine-readable?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.