Here’s a Google Cloud Function that takes some arbitrary json (in json_data) and posts it to a new record in a Cloud SQL database. No error handling or deduplication/matching, just a straight post:
Before using, it needs information to connect to the database, so customize the INSTANCE_NAME, DATABASE_NAME, and TABLE_NAME for the INSERT. For more on Cloud SQL, see https://cloud.google.com/sql/docs.