@yisrael-wix wrote an example about this here
Also, you could aproach it by using an automation service (like Zapier or Integromat). You would send data to their webhook and then, as an action, choose “Add row to spreadsheet”. I did something similar for Google Calendar/Zapier. Look here:
https://girizano.wixsite.com/codecorner/post/writing-events-to-google-calendar-with-zapier