Your code is almost correct, try defining myfile. You should define the myfile variable with the path to the file you want to calculate the checksum for.
The provided code is an asynchronous function, but it’s not returning anything. If you want to use this function and get the result, you should return the calculated hash.
Of course the plugin is not executed on your pc but on bubble’s servers, so the file will not be on the filesystem, but it would be fetched from the network or passed to the plugin through the property object.
Can’t use fs. You’re going to have to fetch the file url and store the bytes.
let url = properties.template_file.startsWith('https:') ? properties.template_file : 'https:' + properties.template_file;
let res = await fetch(url);
let fileBytes = await res.arrayBuffer();
and also bubble is expecting an object with a string, not a Promise. Try to awaitthe calculatehash function.
Generally speaking copy pasting code from gpt or our answers without understanding what’s going on it’s a good way to set up future problems. If you have time try learning a bit more about what all this is about.