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 / power automate desktop...
Power Automate
Answered

power automate desktop 2.15.280.21347 pythonsciptoutput json string data to "Convert JSON to custom object" or other actions return error

(1) ShareShare
ReportReport
Posted on by 7

Hi all, 

 

I have encountered a very strange case when action "run python script", it produced pythonscriptoutput of 

 

{
"customer_name1_text": "test1",
"Created By": "1639508334545x479973977990408450",
"customer_address1_text": "test1 address",
"delivery_date1_date": "2342-02-02T19:42:00.000Z",
"item_qty_text": "1",
"remark_text": "test1",
"Modified Date": "2021-12-15T10:44:12.933Z",
"transaction_date_date": "4234-02-02T18:34:00.000Z",
"_id": "1639524201778x506621132000460800",
"Created Date": "2021-12-14T23:23:22.382Z",
"item_name_text": "testst",
"status_text": "draft",
"item_code1_text": "23424234sdfsdf",
"sync_status1_number": 0,
"customer_phone1_text": "234234234234",
"order_type_text": "Sales"
}

 

JSON format verified by online tools.  But when this output taken into next action, for example "convert JSON to custom object" then I have "unexpected character encountered while parsing value: . Path '', line 0, position 0",  if use the same pythonscriptoutput to another "run python script" like "json = %PythonScriptOutput%" the error is "unexpected token ''".

Any idea what went wrong?

 

thx

 

I have the same question (0)
  • Verified answer
    bart8684 Profile Picture
    13 on at

    Hi,

     

    Output from Run Python script actions contains invisible character:

    bart8684_0-1639637475859.png

    bart8684_1-1639637496321.png

    Please try to remove it before you try to convert response to custom object:

    bart8684_2-1639637630315.png

     

  • warrenchow Profile Picture
    7 on at

    Sorry for the late reply, almost gave up on the problem before I saw your solution. Works perfectly.  Thx

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard