web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Structured JSON output...
Power Automate
Unanswered

Structured JSON output - arrays of primitive types are not supported

(1) ShareShare
ReportReport
Posted on by 306
Hello,

I trying to extract data from documents and classify them according to pre-defined categories

Generally speaking this works okay'ish. The main issue is that the GPT introduces categories on its own, which I don't want. As far as I can understand, it is not something I can solve by modifying the prompt. E.g. here's an example of someone with the same issue

However, this should be solvable by using a structured output with enum looking something like this:
{
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "enum": [
        "Technology",
        "Finance",
        "Health",
        "Education",
        "Entertainment",
        "Science",
        "Politics",
        "Sports"
      ],
      "description": "The category assigned to the document. Must be one of the predefined values."
    }
  },
  "required": ["category"]
}
The issue is that I get an 'Arrays of primitive types are not supported' error.



Does anyone know if there any workaround for this I want to use AI Builder? Or is the only way to use a model via Azure?
Categories:
I have the same question (0)
  • Building with Why Profile Picture
    351 Moderator on at
    A standard categorize text prompt should do what you are looking to accomplish, unless I am completely missing what you are attempting.
     
    Classify the <input text>  into one of the <input Categories> , or 'unclear'. Analyze the key themes and context of the provided text and classify it into the most appropriate category from the list of categories. Take into consideration any subcategories, industry-specific terminology, and the possibility of ambiguous classification. If the text does not clearly fit into a single category, pick the closest category or label it as 'unclear'. Your answer may only have the exact text of the closest category. Do not explain and do not use categories not listed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard