Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Expected Integer but got string

(0) ShareShare
ReportReport
Posted on by

Hi Folks,

 

Reading in a CSV file using the ParseCSV tool. I then read the data in and process it as a JSON, which works well until the subject error occurs. As its a text file and effectively a long text string, I guess I need to keep all values as string only, and then look to convert the field into a number or an integer (which is the best for really, big numbers?) - or am I missing something here?

 

Thanks

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Expected Integer but got string

    Hi @Anonymous,

     

    I assume that the issue is caused by the ParseCSV action to consider the subject as an integer.

     

    As a workaround, you could initialize an array variable to store new array that restructures the JSON. Steps as below, add a Apply to each action to loop the original JSON, then add double quotes at the subject property:

    {
    "subject": "@{item()?['subject']}",
    "Name": @{item()?['Name']}
    }

    Annotation 2020-09-11 102344.jpg

     

    Annotation 2020-09-11 102345.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow