• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Linebreak in JSON Data causes Syntax Error

AeroFi

Member
Hi Pabbly Experts,

I have an API returned with the following JSON response:

JavaScript:
const response = [{"text": "This is a sample\nwith newlines\nand more."}]

However Pabbly could not process such linebreak data and results in the error:
SyntaxError: Invalid or unexpected token

Tried with Text Formatter with no avail as well.

Any pointers?
 
P

Pabblymember11

Guest
Hey @AeroFi

Please provide the URL of the workflow where you encountered this issue, along with the name of the application involved and its API documentation. Your contribution will greatly assist in diagnosing and resolving the matter effectively.
 
P

Pabblymember11

Guest
Can you please try using the same JS code on the online compiler once and then let us know?
 
P

Pabblymember11

Guest
Hey @AeroFi

During the automation process, an error occurred in my Code step, displaying "SyntaxError: Invalid or unexpected token." To resolve this, please kindly wrap the new line "\\n" characters from your JavaScript code line breaks in `` wrapped strings won't break the syntax in JSON. This adjustment will help rectify the syntax issue and ensure smoother execution of the code.


1701168670905.png


As a result -

1701168864124.png
 

AeroFi

Member
I might have a problem here as I cannot separate the value from the key when dealing with the response from the API.. It comes bundled together in one object.
 
P

Pabblymember11

Guest
Please allow us some time, we are currently looking into it.
 
P

Pabblymember11

Guest
Sure, we will let you know once we get any update on this.
 
P

Pabblymember11

Guest
Sorry for the delay, our technical team is currently looking into it.

Shall notify you with an update soon.
 

AeroFi

Member
Sorry for the delay, our technical team is currently looking into it.

Shall notify you with an update soon.
HI @Supreme, alright thanks.. Any estimates on this bugfix? As it is impacting the customer operations and considering a change if it persists for too long...
 
P

Pabblymember11

Guest
Our team is trying its best to resolve the issue, so once we get any update on the concern will let you know.
 
P

Pabblymember11

Guest
HI @Supreme, alright thanks.. Any estimates on this bugfix? As it is impacting the customer operations and considering a change if it persists for too long...
We've made significant updates on our end to ensure everything works smoothly. We encourage you to give it a try from your side with your preferred conditions.
 
Top