Skip to main content
Community site session details

Community site session details

Session Id : ncb8OE5P+k8AiJrjINFAOs
Power Automate - Building Flows
Answered

ERROR: "Invalid type. Expected Array but got Null." in Parse JSON

Like (0) ShareShare
ReportReport
Posted on 21 Apr 2024 16:14:58 by 4

Estou rodando um fluxo onde a trigger é um formulário, no qual a pessoa pode incluir um anexo no formulário OU não, e o json lê esse anexo quando tem, mas quando não envia nenhum anexo, ele dá o erro

 
[
  {
    "message" "Tipo inválido. Array esperado, mas obteve Null." ,
    "NúmeroLinha" 0 ,
    "posiçãolinha" 0 ,
    "caminho" "" ,
    "schemaId" "#" ,
    "errorType" "tipo" ,
    "childErrors" : []
  }
]

este é o meu fluxo:

gabismacedo_0-1713715282068.pnggabismacedo_1-1713715486029.png

 

Esse é o json:

{
    "tipo" : "matriz" ,
        "Unid" : {
            "tipo" : "objeto" ,
            "propriedades" : {
                "nome" : {
                    "tipo" : "string"
                },
                "link" : {
                    "tipo" : "string"
                },
                "eu ia" : {
                    "tipo" : "string"
                },
                "tipo" : {},
                "tamanho" : {
                    "tipo" : "inteiro"
                },
                "referência ID" : {
                    "tipo" : "string"
                },
                "driveID" : {
                    "tipo" : "string"
                },
                "status" : {
                    "tipo" : "inteiro"
                },
                "uploadSessionUrl" : {}
            },
            "obrigatório" : [
                "nome" ,
                "link" ,
                "eu ia" ,
                "tipo" ,
                "tamanho" ,
                "referência ID" ,
                "driveID" ,
                "status" ,
                "uploadSessionUrl"
            ]
        }
}

Já configurei os campos "uploadSessionUrl" e "type" como nulo, mas ainda dá o mesmo erro, configurei todos os campos para aceitar o valor nulo e o erro persiste, alguém poderia me ajudar?

  • gabismacedo Profile Picture
    4 on 22 Apr 2024 at 12:19:11
    Re: ERROR: "Invalid type. Expected Array but got Null." in Parse JSON

    Hello,

     

    It worked, thank you very much for your help

  • Verified answer
    v-bofeng-msft Profile Picture
    on 22 Apr 2024 at 01:04:39
    Re: ERROR: "Invalid type. Expected Array but got Null." in Parse JSON

    Hi @gabismacedo ,

     

    I recommend that you add a condition action to check whether the attachment is empty. If it is not empty, then proceed with the Parse JSON action.

     

    Best Regards,

    Bof

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete