automa icon indicating copy to clipboard operation
automa copied to clipboard

Firefow wokflow event don't run with JS

Open open1999 opened this issue 5 months ago • 2 comments

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

open1999 avatar Aug 31 '24 20:08 open1999