{ "kind": "open-flow-workflow", "version": 1, "name": "Create Latest Sheet Event in Google Calendar", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_1be8805ca49a6239": { "name": "Check for new rows", "kind": "poll", "config": { "spreadsheetId": { "kind": "value", "value": "YOUR_SPREADSHEET_ID" }, "sheet": { "kind": "value", "value": "Sheet1" }, "columnRange": { "kind": "value", "value": "A:ZZZ" }, "firstDataRow": { "kind": "value", "value": 2 }, "headerRow": { "kind": "value", "value": 1 }, "dateTimeRender": { "kind": "value", "value": "FORMATTED_STRING" }, "valueRender": { "kind": "value", "value": "FORMULA" }, "maxRowsPerPoll": { "kind": "value", "value": 500 } }, "definition": { "configInputs": [ { "jsonSchema": { "type": "string", "pattern": "^[A-Za-z]{1,3}(?::[A-Za-z]{1,3})?$" }, "nullable": false, "handle": "columnRange", "value": "A:ZZZ" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "sheet" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "spreadsheetId" }, { "collapsed": true, "group": "Advanced settings" }, { "jsonSchema": { "type": "string", "enum": [ "FORMATTED_STRING", "SERIAL_NUMBER" ] }, "nullable": false, "handle": "dateTimeRender", "value": "FORMATTED_STRING" }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "firstDataRow", "value": 2 }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "headerRow", "value": 1 }, { "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 500 }, "nullable": false, "handle": "maxRowsPerPoll", "value": 100 }, { "jsonSchema": { "type": "string", "enum": [ "UNFORMATTED_VALUE", "FORMATTED_VALUE", "FORMULA" ] }, "nullable": false, "handle": "valueRender", "value": "UNFORMATTED_VALUE" } ], "definitionVersion": 2, "description": "Polls a sheet and triggers once for every new row appended below the last row already seen.", "displayName": "New Row Added", "key": "googlesheets.on_row_added", "name": "on_row_added", "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "row": { "type": "object" }, "rowNumber": { "type": "integer" }, "sheetId": { "type": "integer" }, "sheetTitle": { "type": "string" }, "spreadsheetId": { "type": "string" }, "values": { "type": "array", "items": {} } }, "additionalProperties": false, "required": [ "spreadsheetId", "sheetId", "sheetTitle", "rowNumber", "row", "values" ] } }, "nullable": false, "handle": "events" } ], "provider": "googlesheets", "type": "poll" }, "pollTimes": [ { "type": "every", "unit": "minute", "value": 1 } ] }, "n_981f7068c0842913": { "inputs": { "events": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1be8805ca49a6239", "output": "events" } ] } }, "name": "Prepare the latest event", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "row": { "type": "object" }, "rowNumber": { "type": "integer" }, "sheetId": { "type": "integer" }, "sheetTitle": { "type": "string" }, "spreadsheetId": { "type": "string" }, "values": { "type": "array", "items": {} } }, "additionalProperties": false, "required": [ "spreadsheetId", "sheetId", "sheetTitle", "rowNumber", "row", "values" ] } }, "nullable": false, "handle": "events" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": false, "description": "Event payload to create.", "properties": { "summary": { "type": "string", "description": "Event title." }, "description": { "type": "string", "description": "Event description." }, "location": { "type": "string", "description": "Event location." }, "start": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Event start time." }, "end": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Event end time." }, "attendees": { "type": "array", "items": { "type": "object", "properties": { "email": { "type": "string", "minLength": 1, "description": "Attendee email address." }, "displayName": { "type": "string", "description": "Attendee display name." }, "optional": { "type": "boolean", "description": "Whether attendance is optional." }, "resource": { "type": "boolean", "description": "Whether the attendee represents a resource." }, "responseStatus": { "type": "string", "description": "Attendee response status, such as accepted or declined." }, "comment": { "type": "string", "description": "Additional attendee comment." }, "additionalGuests": { "type": "integer", "description": "Number of additional guests invited by this attendee." } }, "required": [ "email" ], "additionalProperties": false, "description": "Schema for attendeeSchema." }, "description": "Event attendees." }, "recurrence": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Schema for nonEmptyString." }, "description": "Event recurrence rules." }, "conferenceData": { "type": "object", "properties": { "conferenceId": { "type": "string", "description": "Conference identifier for the event." }, "notes": { "type": "string", "description": "Additional conference notes." }, "entryPoints": { "type": "array", "items": { "description": "An array item." }, "description": "Conference entry points returned by Google Calendar." }, "conferenceSolution": { "description": "Conference solution metadata." }, "createRequest": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "description": "Client-generated request ID used to create conference details." }, "conferenceSolutionKey": { "description": "Conference solution payload accepted by Google Calendar." } }, "required": [ "requestId" ], "additionalProperties": true, "description": "Conference creation request details." } }, "additionalProperties": true, "description": "Conference data for the event." }, "reminders": { "type": "object", "properties": { "useDefault": { "type": "boolean", "description": "Whether to use the calendar's default reminders." }, "overrides": { "type": "array", "items": { "type": "object", "properties": { "method": { "type": "string", "minLength": 1, "description": "Reminder delivery method, such as email or popup." }, "minutes": { "type": "integer", "description": "Minutes before the event when the reminder triggers." } }, "required": [ "method", "minutes" ], "additionalProperties": false, "description": "Schema for reminderOverrideSchema." }, "description": "Reminder overrides for the event." } }, "additionalProperties": false, "description": "Reminder settings for the event." }, "colorId": { "type": "string", "description": "Google Calendar color ID for the event." }, "visibility": { "type": "string", "description": "Event visibility, such as default or private." }, "transparency": { "type": "string", "description": "Whether the event blocks time on the calendar." }, "status": { "type": "string", "description": "Event status, such as confirmed or cancelled." }, "extendedProperties": { "type": "object", "properties": { "private": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Private extended properties keyed by name." }, "shared": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Shared extended properties keyed by name." } }, "additionalProperties": false, "description": "Extended event properties." }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "fileUrl": { "type": "string", "format": "uri", "description": "Attachment URL." }, "title": { "type": "string", "description": "Attachment title." }, "mimeType": { "type": "string", "description": "Attachment MIME type." }, "iconLink": { "type": "string", "description": "Icon URL for the attachment." } }, "required": [ "fileUrl" ], "additionalProperties": false, "description": "Schema for attachmentSchema." }, "description": "Attachments on the event." }, "source": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Source URL associated with the event." }, "title": { "type": "string", "description": "Human-readable title for the source." } }, "required": [ "url" ], "additionalProperties": true, "description": "Source metadata for the event." } }, "required": [ "start", "end" ] }, "nullable": false, "handle": "event" } ], "name": "Prepare the latest event", "moduleId": "n_589b88a0d4836bf8", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_3511ea322dc46587": { "inputs": { "calendarId": { "kind": "value", "value": "primary" }, "event": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_981f7068c0842913", "output": "event" } ] } }, "name": "Create calendar event", "kind": "task", "task": { "inputs": [ { "description": "Google Calendar ID. Omit to use the primary calendar when supported.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Google Calendar ID. Omit to use the primary calendar when supported." }, "nullable": true, "handle": "calendarId", "value": null }, { "description": "Event payload to create.", "jsonSchema": { "type": "object", "additionalProperties": false, "description": "Event payload to create.", "properties": { "summary": { "type": "string", "description": "Event title." }, "description": { "type": "string", "description": "Event description." }, "location": { "type": "string", "description": "Event location." }, "start": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Event start time." }, "end": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Event end time." }, "attendees": { "type": "array", "items": { "type": "object", "properties": { "email": { "type": "string", "minLength": 1, "description": "Attendee email address." }, "displayName": { "type": "string", "description": "Attendee display name." }, "optional": { "type": "boolean", "description": "Whether attendance is optional." }, "resource": { "type": "boolean", "description": "Whether the attendee represents a resource." }, "responseStatus": { "type": "string", "description": "Attendee response status, such as accepted or declined." }, "comment": { "type": "string", "description": "Additional attendee comment." }, "additionalGuests": { "type": "integer", "description": "Number of additional guests invited by this attendee." } }, "required": [ "email" ], "additionalProperties": false, "description": "Schema for attendeeSchema." }, "description": "Event attendees." }, "recurrence": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Schema for nonEmptyString." }, "description": "Event recurrence rules." }, "conferenceData": { "type": "object", "properties": { "conferenceId": { "type": "string", "description": "Conference identifier for the event." }, "notes": { "type": "string", "description": "Additional conference notes." }, "entryPoints": { "type": "array", "items": { "description": "An array item." }, "description": "Conference entry points returned by Google Calendar." }, "conferenceSolution": { "description": "Conference solution metadata." }, "createRequest": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "description": "Client-generated request ID used to create conference details." }, "conferenceSolutionKey": { "description": "Conference solution payload accepted by Google Calendar." } }, "required": [ "requestId" ], "additionalProperties": true, "description": "Conference creation request details." } }, "additionalProperties": true, "description": "Conference data for the event." }, "reminders": { "type": "object", "properties": { "useDefault": { "type": "boolean", "description": "Whether to use the calendar's default reminders." }, "overrides": { "type": "array", "items": { "type": "object", "properties": { "method": { "type": "string", "minLength": 1, "description": "Reminder delivery method, such as email or popup." }, "minutes": { "type": "integer", "description": "Minutes before the event when the reminder triggers." } }, "required": [ "method", "minutes" ], "additionalProperties": false, "description": "Schema for reminderOverrideSchema." }, "description": "Reminder overrides for the event." } }, "additionalProperties": false, "description": "Reminder settings for the event." }, "colorId": { "type": "string", "description": "Google Calendar color ID for the event." }, "visibility": { "type": "string", "description": "Event visibility, such as default or private." }, "transparency": { "type": "string", "description": "Whether the event blocks time on the calendar." }, "status": { "type": "string", "description": "Event status, such as confirmed or cancelled." }, "extendedProperties": { "type": "object", "properties": { "private": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Private extended properties keyed by name." }, "shared": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Shared extended properties keyed by name." } }, "additionalProperties": false, "description": "Extended event properties." }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "fileUrl": { "type": "string", "format": "uri", "description": "Attachment URL." }, "title": { "type": "string", "description": "Attachment title." }, "mimeType": { "type": "string", "description": "Attachment MIME type." }, "iconLink": { "type": "string", "description": "Icon URL for the attachment." } }, "required": [ "fileUrl" ], "additionalProperties": false, "description": "Schema for attachmentSchema." }, "description": "Attachments on the event." }, "source": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Source URL associated with the event." }, "title": { "type": "string", "description": "Human-readable title for the source." } }, "required": [ "url" ], "additionalProperties": true, "description": "Source metadata for the event." } }, "required": [ "start", "end" ] }, "nullable": false, "handle": "event" }, { "description": "Which guests receive notifications about this change.", "jsonSchema": { "type": "string", "enum": [ "all", "externalOnly", "none" ], "description": "Which guests receive notifications about this change." }, "nullable": true, "handle": "sendUpdates", "value": null } ], "outputs": [ { "description": "Event ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Event ID." }, "nullable": false, "handle": "id" }, { "description": "Event status.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Event status." }, "nullable": false, "handle": "status" }, { "description": "Event title.", "jsonSchema": { "type": "string", "description": "Event title." }, "nullable": true, "handle": "summary" }, { "description": "Event description.", "jsonSchema": { "type": "string", "description": "Event description." }, "nullable": true, "handle": "description" }, { "description": "Event location.", "jsonSchema": { "type": "string", "description": "Event location." }, "nullable": true, "handle": "location" }, { "description": "Google Calendar web URL for the event.", "jsonSchema": { "type": "string", "description": "Google Calendar web URL for the event." }, "nullable": true, "handle": "htmlLink" }, { "description": "Timestamp when the event was created.", "jsonSchema": { "type": "string", "description": "Timestamp when the event was created." }, "nullable": true, "handle": "created" }, { "description": "Timestamp when the event was last updated.", "jsonSchema": { "type": "string", "description": "Timestamp when the event was last updated." }, "nullable": true, "handle": "updated" }, { "description": "Event start time.", "jsonSchema": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Event start time." }, "nullable": true, "handle": "start" }, { "description": "Event end time.", "jsonSchema": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Event end time." }, "nullable": true, "handle": "end" }, { "description": "Event organizer.", "jsonSchema": { "type": "object", "properties": { "email": { "type": "string", "description": "Organizer or creator email address." }, "displayName": { "type": "string", "description": "Organizer or creator display name." }, "self": { "type": "boolean", "description": "Whether this person is the authenticated user." } }, "additionalProperties": true, "description": "Event organizer." }, "nullable": true, "handle": "organizer" }, { "description": "Event creator.", "jsonSchema": { "type": "object", "properties": { "email": { "type": "string", "description": "Organizer or creator email address." }, "displayName": { "type": "string", "description": "Organizer or creator display name." }, "self": { "type": "boolean", "description": "Whether this person is the authenticated user." } }, "additionalProperties": true, "description": "Event creator." }, "nullable": true, "handle": "creator" }, { "description": "Attendees returned for the event.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "email": { "type": "string", "minLength": 1, "description": "Attendee email address." }, "displayName": { "type": "string", "description": "Attendee display name." }, "optional": { "type": "boolean", "description": "Whether attendance is optional." }, "resource": { "type": "boolean", "description": "Whether the attendee represents a resource." }, "responseStatus": { "type": "string", "description": "Attendee response status, such as accepted or declined." }, "comment": { "type": "string", "description": "Additional attendee comment." }, "additionalGuests": { "type": "integer", "description": "Number of additional guests invited by this attendee." } }, "required": [ "email" ], "additionalProperties": false, "description": "Schema for attendeeSchema." }, "description": "Attendees returned for the event." }, "nullable": true, "handle": "attendees" }, { "description": "Recurrence rules for the event.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Schema for nonEmptyString." }, "description": "Recurrence rules for the event." }, "nullable": true, "handle": "recurrence" }, { "description": "Recurring master event ID when this item is an instance.", "jsonSchema": { "type": "string", "description": "Recurring master event ID when this item is an instance." }, "nullable": true, "handle": "recurringEventId" }, { "description": "Original start time for a recurring event instance.", "jsonSchema": { "type": "object", "properties": { "date": { "type": "string", "minLength": 1, "description": "All-day event date in YYYY-MM-DD format." }, "dateTime": { "type": "string", "format": "date-time", "description": "Event timestamp in RFC 3339 format." }, "timeZone": { "type": "string", "minLength": 1, "description": "IANA time zone used to interpret the event time." } }, "additionalProperties": false, "description": "Original start time for a recurring event instance." }, "nullable": true, "handle": "originalStartTime" }, { "description": "Event type returned by Google Calendar.", "jsonSchema": { "type": "string", "description": "Event type returned by Google Calendar." }, "nullable": true, "handle": "eventType" }, { "description": "Conference data for the event.", "jsonSchema": { "type": "object", "properties": { "conferenceId": { "type": "string", "description": "Conference identifier for the event." }, "notes": { "type": "string", "description": "Additional conference notes." }, "entryPoints": { "type": "array", "items": { "description": "An array item." }, "description": "Conference entry points returned by Google Calendar." }, "conferenceSolution": { "description": "Conference solution metadata." }, "createRequest": { "type": "object", "properties": { "requestId": { "type": "string", "minLength": 1, "description": "Client-generated request ID used to create conference details." }, "conferenceSolutionKey": { "description": "Conference solution payload accepted by Google Calendar." } }, "required": [ "requestId" ], "additionalProperties": true, "description": "Conference creation request details." } }, "additionalProperties": true, "description": "Conference data for the event." }, "nullable": true, "handle": "conferenceData" }, { "description": "Extended event properties.", "jsonSchema": { "type": "object", "properties": { "private": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Private extended properties keyed by name." }, "shared": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Shared extended properties keyed by name." } }, "additionalProperties": false, "description": "Extended event properties." }, "nullable": true, "handle": "extendedProperties" }, { "description": "Attachments on the event.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "fileUrl": { "type": "string", "format": "uri", "description": "Attachment URL." }, "title": { "type": "string", "description": "Attachment title." }, "mimeType": { "type": "string", "description": "Attachment MIME type." }, "iconLink": { "type": "string", "description": "Icon URL for the attachment." } }, "required": [ "fileUrl" ], "additionalProperties": false, "description": "Schema for attachmentSchema." }, "description": "Attachments on the event." }, "nullable": true, "handle": "attachments" }, { "description": "Reminder settings for the event.", "jsonSchema": { "type": "object", "properties": { "useDefault": { "type": "boolean", "description": "Whether to use the calendar's default reminders." }, "overrides": { "type": "array", "items": { "type": "object", "properties": { "method": { "type": "string", "minLength": 1, "description": "Reminder delivery method, such as email or popup." }, "minutes": { "type": "integer", "description": "Minutes before the event when the reminder triggers." } }, "required": [ "method", "minutes" ], "additionalProperties": false, "description": "Schema for reminderOverrideSchema." }, "description": "Reminder overrides for the event." } }, "additionalProperties": false, "description": "Reminder settings for the event." }, "nullable": true, "handle": "reminders" }, { "description": "Source metadata for the event.", "jsonSchema": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Source URL associated with the event." }, "title": { "type": "string", "description": "Human-readable title for the source." } }, "required": [ "url" ], "additionalProperties": true, "description": "Source metadata for the event." }, "nullable": true, "handle": "source" } ], "name": "Create calendar event", "executor": { "kind": "connector", "action": "googlecalendar.create_event" } } } }, "edges": [ { "source": "n_1be8805ca49a6239", "target": "n_981f7068c0842913" }, { "source": "n_981f7068c0842913", "target": "n_3511ea322dc46587" } ] } }, "modules": { "n_589b88a0d4836bf8": { "name": "Prepare the latest event", "imports": [], "source": "export default function prepare({events}){if(!Array.isArray(events)||events.length===0)throw Error('No new rows');const row=events[events.length-1].row,date=row['Event Start Date'],year=new Date().getFullYear();if(typeof date!=='string')throw Error('Event Start Date must be text');const d=new Date((date.includes(String(year))?date:`${date} ${year}`)+' UTC');if(!Number.isFinite(d.getTime()))throw Error('Invalid event date');const start=d.toISOString().slice(0,10),end=new Date(Date.parse(start)+86400000).toISOString().slice(0,10);return{event:{summary:row['Event Name'],description:row['Event Description'],location:row.Location,start:{date:start},end:{date:end},colorId:'3',transparency:'transparent'}}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }