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 / Parsed Text: SyntaxErr...
Power Automate
Unanswered

Parsed Text: SyntaxError: unexpected token

(0) ShareShare
ReportReport
Posted on by 2

Hello dear PA - Community,

 

I am an absolute beginner with PA Desktop. I want to use PA - Desktop  to parse through my E-Mails and extract some Data like (Invoice Number, Amount paid etc.) To get this data and write an invoice. So far I managed it, that the flow will extract the Text. But when I want to pass the text into a python script I get an SyntaxError: unexpected token (see below).  

 

File "", line 1
t= The following payment notice is related to your  royalties paid by Customer. Please allow up to 5 business days following the payment date for the funds to appear in your bank account. Any queries related to this payment should be directed to: adress@customer made to:Me(1245)Our Supplier Payment Date :29-MAY-2022Payment currency:EURPayment Amount :2.09 Invoice Number Invoice Date Invoice Description Discount Taken Amount Paid Amount Remaining13-MAY-2022Apr 2022 2.090.00
^
SyntaxError: unexpected token '**'

 

How can I fix this error? Or does someone else has a solution how to extract data from his own Emails and create an invoice?

Thank you in advance for your help! 

 

Regards 

 

JBretzinger

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @JBretzinger 

     

    Hope you are doing well.

     

    If i am right you need to extract the required text data from the given text and create an invoice. Well i am not sure of how u are thinking to creating the invoice. But to extract the required data from text, you can utlise the regex approach along with usage of Parse Text action.

     

    Let me know if you had further questions.

     

    Thanks & Regards,

    Nived N

  • JBretzinger Profile Picture
    2 on at

    Hello Nived,

     

    thank you for your support. 

     

    My Problem is that I extract the text from the email, but I am not able to pass the variable from the parser to the next step. I always get the Syntax Error as mentioned above. At the moment I am not able to get into the next step.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @JBretzinger 

     

    could i get more details about python script

     

    I think it would be an issue with python script may be

     

    Thanks & Regards,

    Nived N

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard