RSVP - Google Sheets integration

Here is is with a loop. That works and grabs all the data from any event, regardless of whether they have 3 fields or 6.

The order that the values are returned are different for different events, which seems a bit weird. The guts of it is working though.

import { appendValuesWrapper } from ‘backend/googlesheet-wrapper.jsw’ ;
import { wixEvents } from “wix-events-backend” ;

export function wixEvents_onRsvpCreated ( event ) {
const eventId = event . eventId ;

**const**  rsvp  =  event . rsvpForm . inputValues ; 

const values =;

for ( let i = 0 ; i < rsvp . length ; i ++){
values . push ( rsvp [ i ]. value );
}
console . log ( values );

**const**  res  =  appendValuesWrapper ( values ); 

}