fs.readFile() nodejs function problem

Hi everyone,
Is it possible to use the nodejs fs.readFile() function and how ?
If not then what is the alternative ?

Big thanks in advance!

Hey
Wix Code and Wix does not expose any file system functions you can use in the sense you are trying. You can read externally available files using fetch but there is no IO for files or folders in Wix. Yet.

So how can I use a json file that I got from google gmail api ? All I want is to send Emails from a user input form submission

Hey Zeev
Do you have a form created in a Wix page that you use? If so you want to get the details you get from the form and then use those details and send that person or you an email with details from that form.

I don’t know what the JSON file consists of from Google Gmail API if you just want to send mail. Is it a template JSON that you should send to their API to send email?

I use Zapier to do this

@andreas-kviby no, I want to use a user input with onClick function.
at the moment i just want to deliver one field of simple text and send the value with gmail api
its a no go at the moment

Ok, so one fields value is to be sent to one email though Gmail? Why don’t you just Zapier, it will take you five minutes to setup a zap that takes in the value from Wix and send that through Gmail to you.

Hi Zeev!

I stumbled upon exactly the same problem.
For now I just copy the json string to my module.

I hope one day corvid will support reading config files :slight_smile: