The API operation 'PostItem' requires the property 'item/Assignee' to be a string of maximum length '255' but is of length '460'.

Ahmed Haqqani 11 Reputation points
2022-09-28T19:19:37.727+00:00

When I am trying to enter the data in the Sharepoint I am getting this error "The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: The API operation 'PostItem' requires the property 'item/Assignee' to be a string of maximum length '255' but is of length '462'"

I have updated my sharepoint column to multiple line text however I am still getting the above error, however I am not getting this error when i am trying to add the same data manually in the column of the sharepoint

[https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2F******************%2Fissues%2F%3Fjql%3Dlabels%2B%253D%2BTEQ-ONG&data=05%7C01%7C%7C618e16234e074aa0771208daa183e748%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C637999885145956734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tonEm2PjAIAlvmrZXEANM8ITBeOf0S%2F6Jaz3zPMepFk%3D&reserved=0] * TEQ-WE100122

Microsoft 365 and Office SharePoint Server Development
Windows for business Windows Server User experience PowerShell
{count} vote

3 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-09-30T07:54:49.073+00:00

    Hi @Ahmed Haqqani
    I will recommend you to use following rest api to create list item

    url: "https://xxx.sharepoint.com/sites/xiexin/_api/web/lists/getByTitle('TestList99')/items",
    type: "POST",
    headers:
    {
    // Accept header: Specifies the format for response data from the server.
    "Accept": "application/json;odata=verbose",
    //Content-Type header: Specifies the format of the data that the client is sending to the server
    "Content-Type": "application/json;odata=verbose",
    // X-RequestDigest header: When you send a POST request, it must include the form digest value in X-RequestDigest header
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    }
    body:
    { "__metadata": {"type": "SP.Data.TestList99ListItem"},
    "Title": "New Title 2",
    "multicolumn": "text"
    }

    246412-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. Ahmed Haqqani 11 Reputation points
    2022-10-06T13:08:30.153+00:00

    Thanks a lot for your response, I was able to fix the data in the source itself by removing the unwated hyperlink as a power automate.
    Thanks for the advice.


  3. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-10-10T07:24:07.313+00:00

    Hi @Ahmed Haqqani
    I'm glad to hear you solve the problem ,if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others." and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    Issue Symptom:
    The API operation 'PostItem' requires the property 'item/Assignee' to be a string of maximum length '255' but is of length '460'

    Current status:
    Fix the data in the source itself by removing the unwated hyperlink as a power automate.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.