web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Expected Integer but g...
Power Automate
Answered

Expected Integer but got string

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 820

#3
Haque Profile Picture

Haque 505

Last 30 days Overall leaderboard