{ "kind": "open-flow-workflow", "version": 1, "name": "Post Queued Google Sheets Rows to X", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_72e9256b5ff04335": { "name": "Every six hours UTC", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "0 */6 * * *", "timezone": "UTC" } ] }, "n_724afec9894053d0": { "inputs": { "spreadsheetId": { "kind": "value", "value": "YOUR_SPREADSHEET_ID" }, "sheetName": { "kind": "value", "value": "Tweets" } }, "name": "Choose the queue sheet", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "spreadsheetId" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "sheetName" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "spreadsheetId" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "sheetName" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "range" } ], "name": "Choose the queue sheet", "moduleId": "n_6990a720fdde0015", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_035faeda51fe540d": { "inputs": { "spreadsheetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_724afec9894053d0", "output": "spreadsheetId" } ] } }, "name": "Find the queue sheet ID", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "Whether to exclude hidden sheets from the results.", "jsonSchema": { "type": "boolean", "description": "Whether to exclude hidden sheets from the results." }, "nullable": true, "handle": "excludeHidden", "value": null } ], "outputs": [ { "description": "The unique ID of the spreadsheet.", "jsonSchema": { "type": "string", "description": "The unique ID of the spreadsheet." }, "nullable": false, "handle": "spreadsheetId" }, { "description": "The list of sheet names in the spreadsheet.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "An array item." }, "description": "The list of sheet names in the spreadsheet." }, "nullable": false, "handle": "sheetNames" }, { "description": "A map from sheet name to numeric sheet ID.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "integer", "description": "A record value." }, "description": "A map from sheet name to numeric sheet ID." }, "nullable": false, "handle": "sheetIdByName" } ], "name": "Find the queue sheet ID", "executor": { "kind": "connector", "action": "googlesheets.get_sheet_names" } } }, "n_fb8917a88b2639c4": { "inputs": { "sheetIdByName": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_035faeda51fe540d", "output": "sheetIdByName" } ] }, "sheetName": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_724afec9894053d0", "output": "sheetName" } ] }, "spreadsheetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_724afec9894053d0", "output": "spreadsheetId" } ] }, "range": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_724afec9894053d0", "output": "range" } ] } }, "name": "Verify the queue sheet", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": { "type": "integer", "description": "A record value." }, "description": "A map from sheet name to numeric sheet ID." }, "nullable": false, "handle": "sheetIdByName" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "sheetName" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "spreadsheetId" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "range" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "sheetId" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "spreadsheetId" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "range" } ], "name": "Verify the queue sheet", "moduleId": "n_bf0faba3a55dc70b", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_edce23e21b962ed0": { "inputs": { "spreadsheetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fb8917a88b2639c4", "output": "spreadsheetId" } ] }, "range": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fb8917a88b2639c4", "output": "range" } ] }, "valueRenderOption": { "kind": "value", "value": "UNFORMATTED_VALUE" } }, "name": "Read the queued rows", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The A1 notation of the range to retrieve.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to retrieve." }, "nullable": false, "handle": "range" }, { "description": "The major dimension for the returned values.", "jsonSchema": { "type": "string", "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" ], "description": "The major dimension for the returned values." }, "nullable": true, "handle": "majorDimension", "value": null }, { "description": "How values should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values should be rendered in the output." }, "nullable": true, "handle": "valueRenderOption", "value": null }, { "description": "How dates and times should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates and times should be rendered in the output." }, "nullable": true, "handle": "dateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The A1 notation of the range.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range." }, "nullable": false, "handle": "range" }, { "description": "The major dimension of the values (ROWS or COLUMNS).", "jsonSchema": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "nullable": false, "handle": "majorDimension" }, { "description": "The data values in the range.", "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "name": "Read the queued rows", "executor": { "kind": "connector", "action": "googlesheets.values_get" } } }, "n_e350fe83de96fd75": { "inputs": { "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_edce23e21b962ed0", "output": "values" } ] } }, "name": "Validate queued posts", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": {} } }, "nullable": false, "handle": "snapshot" }, { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "items" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "hasItems" } ], "name": "Validate queued posts", "moduleId": "n_b967a449b5c90c8e", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_9b34afcd81560550": { "inputs": {}, "name": "Any queued posts?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_e350fe83de96fd75", "output": "hasItems" } }, "operator": "isTrue" } ] } ] } ] }, "n_17c1e61fdd63f6e2": { "inputs": { "items": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_e350fe83de96fd75", "output": "items" } ] }, "previous": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_17c1e61fdd63f6e2", "output": "state" } ] } }, "name": "Prepare the next post", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "items" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previous" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string", "description": "The Tweet text content. Required unless another content source is provided." }, "nullable": true, "handle": "text" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "rowIndex" } ], "name": "Prepare the next post", "moduleId": "n_e866cbda97591f44", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a7b066721a389d00": { "inputs": {}, "name": "More posts?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_17c1e61fdd63f6e2", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_fd8015ea9c63a68c": { "inputs": { "text": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_17c1e61fdd63f6e2", "output": "text" } ] } }, "name": "Post to X", "kind": "task", "task": { "inputs": [ { "description": "The Tweet text content. Required unless another content source is provided.", "jsonSchema": { "type": "string", "description": "The Tweet text content. Required unless another content source is provided." }, "nullable": true, "handle": "text", "value": null }, { "description": "The card URI to attach to the Tweet.", "jsonSchema": { "type": "string", "description": "The card URI to attach to the Tweet." }, "nullable": true, "handle": "cardUri", "value": null }, { "description": "Whether to mark the Tweet as promoted-only nullcast content.", "jsonSchema": { "type": "boolean", "description": "Whether to mark the Tweet as promoted-only nullcast content." }, "nullable": true, "handle": "nullcast", "value": null }, { "description": "The place ID to attach to the Tweet.", "jsonSchema": { "type": "string", "description": "The place ID to attach to the Tweet." }, "nullable": true, "handle": "geoPlaceId", "value": null }, { "description": "The poll options to create with the Tweet.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A string value." }, "description": "The poll options to create with the Tweet." }, "nullable": true, "handle": "pollOptions", "value": null }, { "description": "The Tweet ID to quote in the new Tweet.", "jsonSchema": { "type": "string", "description": "The Tweet ID to quote in the new Tweet." }, "nullable": true, "handle": "quoteTweetId", "value": null }, { "description": "Who can reply to the Tweet.", "jsonSchema": { "type": "string", "enum": [ "following", "mentionedUsers", "subscribers" ], "description": "Who can reply to the Tweet." }, "nullable": true, "handle": "replySettings", "value": null }, { "description": "The uploaded media IDs to attach to the Tweet.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A string value." }, "description": "The uploaded media IDs to attach to the Tweet." }, "nullable": true, "handle": "mediaMediaIds", "value": null }, { "description": "Who can reply to the poll Tweet.", "jsonSchema": { "type": "string", "description": "Who can reply to the poll Tweet." }, "nullable": true, "handle": "pollReplySettings", "value": null }, { "description": "The user IDs to tag in the attached media.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A string value." }, "description": "The user IDs to tag in the attached media." }, "nullable": true, "handle": "mediaTaggedUserIds", "value": null }, { "description": "The poll duration in minutes.", "jsonSchema": { "type": "integer", "description": "The poll duration in minutes." }, "nullable": true, "handle": "pollDurationMinutes", "value": null }, { "description": "The DM deep link to attach to the Tweet.", "jsonSchema": { "type": "string", "description": "The DM deep link to attach to the Tweet." }, "nullable": true, "handle": "directMessageDeepLink", "value": null }, { "description": "Whether to restrict the Tweet to super followers only.", "jsonSchema": { "type": "boolean", "description": "Whether to restrict the Tweet to super followers only." }, "nullable": true, "handle": "forSuperFollowersOnly", "value": null }, { "description": "The Tweet ID to reply to.", "jsonSchema": { "type": "string", "description": "The Tweet ID to reply to." }, "nullable": true, "handle": "replyInReplyToTweetId", "value": null }, { "description": "The user IDs to exclude from reply mentions.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A string value." }, "description": "The user IDs to exclude from reply mentions." }, "nullable": true, "handle": "replyExcludeReplyUserIds", "value": null } ], "outputs": [ { "description": "The ID of the created Tweet.", "jsonSchema": { "type": "string", "description": "The ID of the created Tweet." }, "nullable": false, "handle": "id" }, { "description": "The text content of the created Tweet.", "jsonSchema": { "type": "string", "description": "The text content of the created Tweet." }, "nullable": false, "handle": "text" }, { "description": "The edit history Tweet IDs returned by the X API.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A string value." }, "description": "The edit history Tweet IDs returned by the X API." }, "nullable": true, "handle": "editHistoryTweetIds" }, { "description": "The raw create Tweet response returned by the X API.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The raw create Tweet response returned by the X API." }, "nullable": false, "handle": "raw" } ], "name": "Post to X", "executor": { "kind": "connector", "action": "twitter.creation_of_a_post" } } }, "n_b1270a19fdeb39c8": { "inputs": { "id": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fd8015ea9c63a68c", "output": "id" } ] } }, "name": "Confirm the X post", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string", "description": "The ID of the created Tweet." }, "nullable": false, "handle": "id" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "ok" } ], "name": "Confirm the X post", "moduleId": "n_52f78389639e693b", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a9bd2ffc1360520c": { "inputs": { "spreadsheetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fb8917a88b2639c4", "output": "spreadsheetId" } ] }, "range": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fb8917a88b2639c4", "output": "range" } ] }, "valueRenderOption": { "kind": "value", "value": "UNFORMATTED_VALUE" } }, "name": "Recheck the queue", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The A1 notation of the range to retrieve.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The A1 notation of the range to retrieve." }, "nullable": false, "handle": "range" }, { "description": "The major dimension for the returned values.", "jsonSchema": { "type": "string", "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" ], "description": "The major dimension for the returned values." }, "nullable": true, "handle": "majorDimension", "value": null }, { "description": "How values should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values should be rendered in the output." }, "nullable": true, "handle": "valueRenderOption", "value": null }, { "description": "How dates and times should be rendered in the output.", "jsonSchema": { "type": "string", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates and times should be rendered in the output." }, "nullable": true, "handle": "dateTimeRenderOption", "value": null } ], "outputs": [ { "description": "The A1 notation of the range.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range." }, "nullable": false, "handle": "range" }, { "description": "The major dimension of the values (ROWS or COLUMNS).", "jsonSchema": { "type": "string", "description": "The major dimension of the values (ROWS or COLUMNS)." }, "nullable": false, "handle": "majorDimension" }, { "description": "The data values in the range.", "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" } ], "name": "Recheck the queue", "executor": { "kind": "connector", "action": "googlesheets.values_get" } } }, "n_e49c34104c0269ab": { "inputs": { "snapshot": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_e350fe83de96fd75", "output": "snapshot" } ] }, "values": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a9bd2ffc1360520c", "output": "values" } ] }, "items": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_e350fe83de96fd75", "output": "items" } ] }, "sheetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fb8917a88b2639c4", "output": "sheetId" } ] } }, "name": "Check the queue before deletion", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "array", "items": {} } }, "nullable": false, "handle": "snapshot" }, { "jsonSchema": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." }, { "type": "boolean", "description": "A union variant." }, { "const": null, "description": "A union variant." } ], "description": "The cell value schema." }, "description": "An array item." }, "description": "The data values in the range." }, "nullable": false, "handle": "values" }, { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "items" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "sheetId" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "items" } ], "name": "Check the queue before deletion", "moduleId": "n_c01d50ab5e7cd1e7", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_0a05c03ff29ebc7f": { "inputs": { "items": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_e49c34104c0269ab", "output": "items" } ] }, "previous": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0a05c03ff29ebc7f", "output": "state" } ] } }, "name": "Prepare the next row deletion", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "items" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previous" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "object", "properties": { "range": { "type": "object", "properties": { "sheetId": { "type": "integer", "description": "The numeric ID of the sheet." }, "dimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The dimension (rows or columns) this range spans." }, "startIndex": { "type": "integer", "minimum": 0, "description": "The zero-based start index of the range." }, "endIndex": { "type": "integer", "minimum": 1, "description": "The exclusive end index of the range." } }, "required": [ "dimension" ], "additionalProperties": false, "description": "The range of dimensions to delete." } }, "required": [ "range" ], "additionalProperties": false, "description": "The delete-dimension request payload." }, "nullable": true, "handle": "request" } ], "name": "Prepare the next row deletion", "moduleId": "n_92423226dbf56497", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_124b12dd3d0246d3": { "inputs": {}, "name": "More rows to delete?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_0a05c03ff29ebc7f", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_242097281034d988": { "inputs": { "spreadsheetId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_fb8917a88b2639c4", "output": "spreadsheetId" } ] }, "deleteDimensionRequest": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0a05c03ff29ebc7f", "output": "request" } ] } }, "name": "Delete a posted row", "kind": "task", "task": { "inputs": [ { "description": "The spreadsheet ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The spreadsheet ID." }, "nullable": true, "handle": "spreadsheetId", "value": null }, { "description": "The delete-dimension request payload.", "jsonSchema": { "type": "object", "properties": { "range": { "type": "object", "properties": { "sheetId": { "type": "integer", "description": "The numeric ID of the sheet." }, "dimension": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The dimension (rows or columns) this range spans." }, "startIndex": { "type": "integer", "minimum": 0, "description": "The zero-based start index of the range." }, "endIndex": { "type": "integer", "minimum": 1, "description": "The exclusive end index of the range." } }, "required": [ "dimension" ], "additionalProperties": false, "description": "The range of dimensions to delete." } }, "required": [ "range" ], "additionalProperties": false, "description": "The delete-dimension request payload." }, "nullable": true, "handle": "deleteDimensionRequest", "value": null }, { "description": "The numeric ID of the sheet.", "jsonSchema": { "type": "integer", "description": "The numeric ID of the sheet." }, "nullable": true, "handle": "sheetId", "value": null }, { "description": "The name of the sheet.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The name of the sheet." }, "nullable": true, "handle": "sheetName", "value": null }, { "description": "The dimension to delete (shorthand).", "jsonSchema": { "type": "string", "enum": [ "ROWS", "COLUMNS" ], "description": "The dimension to delete (shorthand)." }, "nullable": true, "handle": "dimension", "value": null }, { "description": "The zero-based start index of the range to delete (shorthand).", "jsonSchema": { "type": "integer", "minimum": 0, "description": "The zero-based start index of the range to delete (shorthand)." }, "nullable": true, "handle": "startIndex", "value": null }, { "description": "The exclusive end index of the range to delete (shorthand).", "jsonSchema": { "type": "integer", "minimum": 1, "description": "The exclusive end index of the range to delete (shorthand)." }, "nullable": true, "handle": "endIndex", "value": null }, { "description": "Whether to include the updated spreadsheet in the response.", "jsonSchema": { "type": "boolean", "description": "Whether to include the updated spreadsheet in the response." }, "nullable": true, "handle": "includeSpreadsheetInResponse", "value": null }, { "description": "The ranges to include in the response spreadsheet.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "An array item." }, "description": "The ranges to include in the response spreadsheet." }, "nullable": true, "handle": "responseRanges", "value": null }, { "description": "Whether to include grid data in the response spreadsheet.", "jsonSchema": { "type": "boolean", "description": "Whether to include grid data in the response spreadsheet." }, "nullable": true, "handle": "responseIncludeGridData", "value": null } ], "outputs": [ { "description": "The unique ID of the spreadsheet.", "jsonSchema": { "type": "string", "description": "The unique ID of the spreadsheet." }, "nullable": false, "handle": "spreadsheetId" }, { "description": "The list of replies for each request in the batch update.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A generic JSON object schema." }, "description": "The list of replies for each request in the batch update." }, "nullable": true, "handle": "replies" }, { "description": "The updated spreadsheet after the batch mutation.", "jsonSchema": { "type": "object", "properties": { "spreadsheetId": { "type": "string", "description": "The unique ID of the spreadsheet." }, "spreadsheetUrl": { "type": [ "string", "null" ], "description": "The URL of the spreadsheet." }, "properties": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The spreadsheet-level properties." }, "sheets": { "type": "array", "items": { "type": "object", "properties": { "properties": { "type": "object", "properties": { "sheetId": { "type": "integer", "description": "The numeric sheet ID." }, "title": { "type": "string", "description": "The sheet title." }, "index": { "type": "integer", "description": "The zero-based sheet index." }, "sheetType": { "type": "string", "description": "The type of the sheet." }, "hidden": { "type": "boolean", "description": "Whether the sheet is hidden." }, "gridProperties": { "type": "object", "properties": {}, "additionalProperties": true, "description": "The grid properties of the sheet." } }, "additionalProperties": false, "description": "The sheet properties." }, "data": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A generic JSON object schema." }, "description": "The grid data for the sheet." }, "conditionalFormats": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A generic JSON object schema." }, "description": "The conditional formatting rules for the sheet." } }, "required": [ "properties" ], "additionalProperties": false, "description": "The normalized sheet schema." }, "description": "The list of sheets in the spreadsheet." }, "namedRanges": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A generic JSON object schema." }, "description": "The named ranges defined in the spreadsheet." }, "developerMetadata": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A generic JSON object schema." }, "description": "The developer metadata attached to the spreadsheet." } }, "required": [ "spreadsheetId", "spreadsheetUrl", "properties", "sheets", "namedRanges", "developerMetadata" ], "additionalProperties": false, "description": "The updated spreadsheet after the batch mutation." }, "nullable": true, "handle": "updatedSpreadsheet" }, { "description": "The ID of a sheet affected by the mutation.", "jsonSchema": { "type": "integer", "description": "The ID of a sheet affected by the mutation." }, "nullable": true, "handle": "sheetId" }, { "description": "The ID of a chart affected by the mutation.", "jsonSchema": { "type": "integer", "description": "The ID of a chart affected by the mutation." }, "nullable": true, "handle": "chartId" }, { "description": "The A1 notation of the range affected by the mutation.", "jsonSchema": { "type": "string", "description": "The A1 notation of the range affected by the mutation." }, "nullable": true, "handle": "updatedRange" } ], "name": "Delete a posted row", "executor": { "kind": "connector", "action": "googlesheets.delete_dimension" } } } }, "edges": [ { "source": "n_72e9256b5ff04335", "target": "n_724afec9894053d0" }, { "source": "n_724afec9894053d0", "target": "n_035faeda51fe540d" }, { "source": "n_035faeda51fe540d", "target": "n_fb8917a88b2639c4" }, { "source": "n_fb8917a88b2639c4", "target": "n_edce23e21b962ed0" }, { "source": "n_edce23e21b962ed0", "target": "n_e350fe83de96fd75" }, { "source": "n_e350fe83de96fd75", "target": "n_9b34afcd81560550" }, { "source": "n_9b34afcd81560550", "target": "n_17c1e61fdd63f6e2", "sourceHandle": "yes" }, { "source": "n_17c1e61fdd63f6e2", "target": "n_a7b066721a389d00" }, { "source": "n_a7b066721a389d00", "target": "n_fd8015ea9c63a68c", "sourceHandle": "yes" }, { "source": "n_fd8015ea9c63a68c", "target": "n_b1270a19fdeb39c8" }, { "source": "n_b1270a19fdeb39c8", "target": "n_17c1e61fdd63f6e2" }, { "source": "n_a7b066721a389d00", "target": "n_a9bd2ffc1360520c", "sourceHandle": "otherwise" }, { "source": "n_a9bd2ffc1360520c", "target": "n_e49c34104c0269ab" }, { "source": "n_e49c34104c0269ab", "target": "n_0a05c03ff29ebc7f" }, { "source": "n_0a05c03ff29ebc7f", "target": "n_124b12dd3d0246d3" }, { "source": "n_124b12dd3d0246d3", "target": "n_242097281034d988", "sourceHandle": "yes" }, { "source": "n_242097281034d988", "target": "n_0a05c03ff29ebc7f" } ] } }, "modules": { "n_6990a720fdde0015": { "name": "Choose the queue sheet", "imports": [], "source": "export default function config({spreadsheetId,sheetName}){if(typeof spreadsheetId!=='string'||!spreadsheetId||spreadsheetId.startsWith('YOUR_')||typeof sheetName!=='string'||!sheetName||sheetName.startsWith('YOUR_'))throw Error('Configure the spreadsheet and sheet name');return{spreadsheetId,sheetName,range:\"'\"+sheetName.replaceAll(\"'\",\"''\")+\"'\"}}\n" }, "n_bf0faba3a55dc70b": { "name": "Verify the queue sheet", "imports": [], "source": "export default function names({sheetIdByName,sheetName,spreadsheetId,range}){const sheetId=sheetIdByName?.[sheetName];if(!Number.isInteger(sheetId)||sheetId<0)throw Error('Sheet not found');return{sheetId,spreadsheetId,range}}\n" }, "n_b967a449b5c90c8e": { "name": "Validate queued posts", "imports": [], "source": "export default function select({values}){if(!Array.isArray(values)||!Array.isArray(values[0]))throw Error('A header row is required');const header=values[0],indices=header.flatMap((v,i)=>v==='tweet'?[i]:[]);if(indices.length!==1)throw Error('Expected exactly one tweet column');const col=indices[0],items=[];for(let i=1;i0}}\n" }, "n_e866cbda97591f44": { "name": "Prepare the next post", "imports": [], "source": "export default function next({items,previous}){let index=previous?.index??0;if(index>=items.length)return{state:{index},more:false,text:'',rowIndex:0};return{state:{index:index+1},more:true,text:items[index].text,rowIndex:items[index].rowIndex}}\n" }, "n_52f78389639e693b": { "name": "Confirm the X post", "imports": [], "source": "export default function confirm({id}){if(typeof id!=='string'||!id)throw Error('X did not confirm the post');return{ok:true}}\n" }, "n_c01d50ab5e7cd1e7": { "name": "Check the queue before deletion", "imports": [], "source": "export default function check({snapshot,values,items,sheetId}){if(JSON.stringify(snapshot)!==JSON.stringify(values))throw Error('Sheet changed after posting; no rows deleted');if(!Number.isInteger(sheetId)||sheetId<0)throw Error('Invalid sheet ID');return{items:[...items].reverse().map(x=>({rowIndex:x.rowIndex,sheetId}))}}\n" }, "n_92423226dbf56497": { "name": "Prepare the next row deletion", "imports": [], "source": "export default function next({items,previous}){let i=previous?.index??0;if(i>=items.length)return{state:{index:i},more:false,request:{range:{sheetId:0,dimension:'ROWS',startIndex:1,endIndex:2}}};const x=items[i];return{state:{index:i+1},more:true,request:{range:{sheetId:x.sheetId,dimension:'ROWS',startIndex:x.rowIndex,endIndex:x.rowIndex+1}}}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }