JavaScript Integration Error

Hi Everyone!

I have a question. I would really appreciate if anyone could help me in it. So basically I am using JavaScript in my workflow. But it is giving me error. I am not able to understand where the error lies in my code. Can anyone suggest me what it could be?

I am sharing the error as below;

And I also want to ask. What we have to enter in the section shown in picture as below;

image

Thank you in advance!

Kind Regards,
Muhammad Hayyan Khan

@Muhammad_Hayyan There might be an syntax error with javascript code. If you can share js file, we can take a look at it.
Also, Input Parameter is to provide any input arguments to javascript.

Please refer this article for detailed explanation.
Execute JavaScript – ElectroNeek Help Center

You can also go through this recipe to know how you can use JavaScript and python code inside Studio

1 Like

Hi! @Kudlappa_Gouder

I am attaching my javascript file with main file as below.

Javascript Issue.zip (50.0 KB)

Looking forward for your feedback!

1 Like

I think that is giving you that error because you have two HTML tags into the JS file.

So, I would suggest you to remove those tags and try again, only JS code.

2 Likes

Hi @Muhammad_Hayyan, We would like to find out if the solutions we provided above worked for you.

Please let us know your progress on this.

I am still facing the same issue. Working on it. Thank you for efforts :blush:

Hi @Kudlappa_Gouder

Have you tried the workflow at your end? I am waiting for feedback.

@Muhammad_Hayyan I tried to execute this script in the console and we have issue with script itself. Please correct the script and try again.

This is the error i am getting in Studio.

Same i am getting when i try to execute in the console.

Also, Please note that do not use script start and end tags and the entire Script should be in a single functionrefer below article for the same.
Execute JavaScript – ElectroNeek Help Center

1 Like