Skip to main content

Notifications

Power Automate - General Discussion
Answered

Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

Posted on by 265

Hello 

 

I have a flow that links planner and email. The flow used to run OK but recently I have the following error popup... Please see pics below 🙂 

 

In my titles option in create a task, I have an expression that says '

if(greater(length(body('Html_to_text_2')),255),substring(body('Html_to_text_2'),0,255),body('Html_to_text_2'))'  From my thread:Link
 
Does anyone know whats going on to give this error? Please let me know if you need more info. It looks like the flow fails on the last stage.. badrequest + the schema validation error!
 
 
flow part 1flow part 1flow part 2flow part 2error 1error 1error 2error 2
 
  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.
  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.
  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Hello again @v-bacao-msft  Sorry for the bump!

     

    I had a new feature I wanted to add to this same flow:

    To recap I have put some pics of the flow which is the same quoted in this thread and works perfectly so far

    And the condition says '@or(contains(triggerBody()?['To'], 'email1'), contains(triggerBody()?['To'], 'email2'), contains(triggerBody()?['To'], 'email3'), contains(triggerBody()?['To'], 'email4'))'

     

    Is there any way to add a condition/checker that says if the 'To' field in the email contains only ONE of the above emails, then assign the task to only them? If it contains all of them then do nothing for now? I saw in the create a task field it said assigned user ids - i could add in the 'To' field from the email there? but is there a way to filter it to only do this if there is one persin in the 'To' field on the email? Im thinking near the start after condition 2, add another conditon that should check if the email has more than one 'To' in it? (Not sure how to do this) if yes do everything below if no then create a task and assign it to the 'To' person? 

     

    Thanks!

     

    image.png

  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Hi @v-bacao-msft 

     

    Yeah worked perfeclty just had to change the connection.

     

    Quick question.

    Do you know if there is a way to easily attach a link to the email on the planner board? Just wondering dont think I need it yet

  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Hi @v-bacao-msft 

     

    I just chaged the connection to the other person in the Flow and I think its OK now. It ran successfully, will test it!

     

    P.S I have a delay of 1min after create a task. is this sufficient?

     

     

     

  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Hi @tested1 ,

     

    You could add a Delay action under Create a task action. After Create task is executed successfully, delay the execution of Update task details action for five minutes.

     

    But it seems that the error message is a permission issue, please also check if you have sufficient permissions to update or create a task.

     

    Hope it helps.

     

    Best Regards,

  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Hello @v-bacao-msft !

     

    Sorry for Bump. I had a quick update. 

     

    Now I wanted to put the subject of an email as the Title and the body of the email (same formula which was <255 chars) as the description on the planner task.

     

    I just want the subject of email as the title on planner task and the email body (<250 chars formula you gave me before) as the planner description 🙂 

     

     

    Is this the correct flow to do this? I am in the process of testing it but it is being very slow /delays while testing 😞

    The expression is like you said before:

     

    if(greater(length(body('Html_to_text_2')),255),substring(body('Html_to_text_2'),0,255),body('Html_to_text_2'))

     

    Thank you! I put some pics below

     

    UPDATE: i tried to test run it using an email I already have and it failed on the update task details part 😞 It said' Forbidden and you do not have the required permissions to access this item' (pic below). It is under a Team flow atm. I can test it properly again if everything i done looks ok

     

    image.pngimage.png

  • tested1 Profile Picture
    tested1 265 on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Excellent @v-bacao-msft !!

     

    I put the Plan ID Code and not the name and it worked fine so far! Surprising as Im sure when I clicked Plan ID before a dropdown of text fields came and it worked. Hopefully this works for good 🙂

  • Verified answer
    v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Schema validation has failed. Validation for field 'PlanId', on entity 'Task' has failed: The specified identifier is invalid.

    Hi @tested1 ,

     

    The custom value you configure in Plan Id and Bucket Id fields is just Display Name of the Plan and Bucket instead of Id value.

    If you want to enter a custom value, you need to populate an Id value similar to the one below.

    9.PNG

    You could use List buckets action to get Bucket Id and the corresponding Plan Id, and then reconfigure Create task action, as below:

    10.PNG

    Please take a try.

     

    Best Regards,

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,733

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,750

Leaderboard

Featured topics