This is a sample web app implemetation in Google Apps Script that receives a JSON payload and inserts it directly into a Google spreadsheet. It is a demo implementation for Automate app flow Google Spreadsheets Integration.
Using just one HTTP Request block in an Automate flow you can send data from your Automate flows directly into Google Spreadsheets! Pretty neat, isn't it?
https://docs.google.com/spreadsheets/d/1VZEp-ru9BH9AQSNHzRxnJZx1Nabviz6UiN9PIelOjA8