You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're executing the script as background script, I'd suggest adding a global try-catch block to print the error to the console. Then follow the help doc to find the output by opening Chrome DevTools on the Automa dashboard.
(Also might need to add automaNextBlock() at the end if there are more blocks after this JavaScript code block)
My problem is not the JS which works perfectly but that the JS which must be triggered in the automa script error management does not work if we are under Firefox.
Hello,
If we create a Javascript script in "Settings-Worflow Event- on action Finish (fail or success)."
The Javascript script is never triggered. No error (of course).
If we use httprequest it works.
Under Chrome everything works (Httprequest) and of course the same JS script.
Same problem with Firefox and Linux.
The code JS
`const workflow = automaRefData('workflow');
const wfl = workflow.logs;
const workflowlast = wfl[wfl.length-1];
const date1 = new Date();
const datefr = date1.toLocaleString('fr-FR',{
weekday: 'short',
day: 'numeric',
month: 'short',
year: '2-digit',
hour: 'numeric',
minute: 'numeric',
second: 'numeric'});
fetch("http://192.168.100.18:8089/api/webhook/tokenxxxx", {
method: "POST",
body: JSON.stringify({
Status: workflow.status,
ErrorBlock: workflowlast,
ErrorMessage: workflow.errorMessage,
DateError: datefr
}),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
});`
Firefox : 129
Windows : 10
Automa : 1.28.27
Thanks
The text was updated successfully, but these errors were encountered: