cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Seuadr
Advocate II
Advocate II

sharepoint "Create item - Invalid text character" flow failure

Hi all, running into an issue with the sharepoint "create item" function, it is failing because of an invalid character, but i am not spotting the character and was hoping that someone here would be able to help? here is the raw input that does not work:

 

{
    "method": "post",
    "path": "/datasets/https%253A%252F%252Fmichiganstate.sharepoint.com%252Fsites%252FIPF.BS.BPS.CentralControl/tables/Today%2527s%2520Utility%2520Shutdowns/items",
    "host": {
        "api": {
            "runtimeUrl": "https://flow-apim-msmanaged-na-eastus2-01.azure-apim.net/apim/sharepointonline"
        },
        "connection": {
            "name": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-19bb13e0-3b22-4df0-957c-c24b37d4044f"
        }
    },
    "authentication": {
        "scheme": "Key",
        "parameter": "*sanitized*",
        "type": "Raw"
    },
    "body": {
        "Title": "Infrastructure Planning and Facilities High Voltage Crew will be disconnecting the temporary\nconstruction transformer and electrical service that was used to power the site\nwhile under construction.  April 13 From 5 a.m. to 6:30 a.m.,  Central Services and STEM Temporary Construction Transformer",
        "What": "Infrastructure Planning and Facilities High Voltage Crew will be disconnecting the temporary\nconstruction transformer and electrical service that was used to power the site\nwhile under construction.",
        "When": " April 13 From 5 a.m. to 6:30 a.m., ",
        "Where": "Central Services and STEM Temporary Construction Transformer"
    }
}

and now here is an input from one that ran fine:

{
    "method": "post",
    "path": "/datasets/https%253A%252F%252Fmichiganstate.sharepoint.com%252Fsites%252FIPF.BS.BPS.CentralControl/tables/Today%2527s%2520Utility%2520Shutdowns/items",
    "host": {
        "api": {
            "runtimeUrl": "https://flow-apim-msmanaged-na-eastus2-01.azure-apim.net/apim/sharepointonline"
        },
        "connection": {
            "name": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-19bb13e0-3b22-4df0-957c-c24b37d4044f"
        }
    },
    "authentication": {
        "scheme": "Key",
        "parameter": "*sanitized*",
        "type": "Raw"
    },
    "body": {
        "Title": "Temporary shutdown of Distribution Panel LDP-A (480/277\nvolt)  March 25 From 5 a.m. to 7 a.m. on Thursday,  Bioengineering",
        "What": "Temporary shutdown of Distribution Panel LDP-A (480/277\nvolt)",
        "When": " March 25 From 5 a.m. to 7 a.m. on Thursday, ",
        "Where": "Bioengineering"
    }
}

as far as i know, nothing has changed about the source (an email)

here is the JSON parse output from both:

good output:
{
    "body": {
        "@odata.etag": "",
        "ItemInternalId": "8f0b1220-b612-4178-a5e8-469de5bed3ad",
        "Subject Input": "Bioengineering Electrical Utility Work",
        "Building": "Bioengineering",
        "Time Input": "From 5 a.m. to 7 a.m. on Thursday, March 25",
        "Time": "From 5 a.m. to 7 a.m. on Thursday,",
        "Date": " March 25",
        "Date Conversion": "44280",
        "What": "Temporary shutdown of Distribution Panel LDP-A (480/277\nvolt)"
    }
}

Bad output:
{
    "body": {
        "@odata.etag": "",
        "ItemInternalId": "fa0c1d22-9294-482c-9dcd-9534c6cada99",
        "Subject Input": "Central Services and STEM Construction Site Electrical Outage",
        "Building": "Central Services and STEM Temporary Construction Transformer",
        "Time Input": "From 5 a.m. to 6:30 a.m., on Tuesday, April 13",
        "Time": "From 5 a.m. to 6:30 a.m.,",
        "Date": " April 13",
        "Date Conversion": "44299",
        "What": "Infrastructure Planning and Facilities High Voltage Crew will be disconnecting the temporary\nconstruction transformer and electrical service that was used to power the site\nwhile under construction."
    }
}
1 ACCEPTED SOLUTION

Accepted Solutions
annajhaveri
Super User
Super User

@Seuadr  the input which is failing has more than 255 character value for Title field. The Title field is of type single line of text and it can accept value of max 255 characters. So you need to truncate the value of Title field to 255 characters to update its value or create a column of type multi line text to save all the text data to multiline text column.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
annajhaveri
Super User
Super User

@Seuadr  the input which is failing has more than 255 character value for Title field. The Title field is of type single line of text and it can accept value of max 255 characters. So you need to truncate the value of Title field to 255 characters to update its value or create a column of type multi line text to save all the text data to multiline text column.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

you are absolutely right. this post was caught by the spam filter, so i started a new topic on the same question, and tested all kinds of different combinations to try and figure out what combination of invalid characters was there - it never even occurred to me that there might be a character limit! 

 

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (69,292)