in workspace-integration/sheets-to-eventarc-custom/Code.gs [44:61]
function getEvent(editEvent) {
const event = {
"@type": "type.googleapis.com/io.cloudevents.v1.CloudEvent",
"attributes": {
"datacontenttype": { "ceString": "application/json" },
"time": { "ceTimestamp": new Date() }
},
"specVersion": "1.0",
"id": Utilities.getUuid(),
"source": "google_sheets",
"textData": '{"user": "' + editEvent.user + '", "range": "' + editEvent.range.getA1Notation()
+ '", "oldValue": "' + editEvent.oldValue + '", "newValue": "' + editEvent.value + '"}',
"type": EVENT_TYPE
};
Logger.log("Created an event: " + JSON.stringify(event));
return event;
}