{ "kind": "open-flow-workflow", "version": 1, "name": "Enroll Webhook Signups in the Current Notion Semester", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_87ccd5bf46ddf0d1": { "name": "Receive signup", "kind": "webhook", "bodyFields": [ { "jsonSchema": {}, "nullable": true, "handle": "name" }, { "jsonSchema": {}, "nullable": true, "handle": "email" } ], "method": "POST", "options": { "responseBody": { "kind": "workflow-outputs", "output": "body", "timeoutMs": 60000 }, "responseHeaders": { "WWW-Authenticate": "Basic realm=\"Signups\"" }, "responseStatusCodeOutput": "statusCode" } }, "n_6696622a8ce5969c": { "inputs": { "headers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_87ccd5bf46ddf0d1", "output": "headers" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_87ccd5bf46ddf0d1", "output": "body" } ] }, "expectedAuthorization": { "kind": "unset" }, "userSourceId": { "kind": "value", "value": "YOUR_USER_DATA_SOURCE_ID" }, "semesterSourceId": { "kind": "value", "value": "YOUR_SEMESTER_DATA_SOURCE_ID" } }, "name": "Authorize the signup", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "expectedAuthorization" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userSourceId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "semesterSourceId" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "accepted" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "response" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "name" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "email" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userSourceId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "semesterSourceId" } ], "name": "Authorize the signup", "moduleId": "n_1c6931b668d228b0", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_78405ccfe3f26634": { "inputs": {}, "name": "Signup accepted?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "accepted" } }, "operator": "isTrue" } ] } ] } ] }, "n_4674d0f3761f42e3": { "inputs": { "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "statusCode" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "response" } ] } }, "name": "Reject signup", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Reject signup", "moduleId": "n_ecee87d05046b52e", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_0038714092b772c7": { "inputs": { "email": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "email" } ] } }, "name": "Prepare lookup filters", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "email" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "semester" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "user" } ], "name": "Prepare lookup filters", "moduleId": "n_3533b156bf116d44", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_4f0879dcd1274452": { "inputs": { "dataSourceId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "semesterSourceId" } ] }, "filter": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0038714092b772c7", "output": "semester" } ] }, "pageSize": { "kind": "value", "value": 2 } }, "name": "Find current semester", "kind": "task", "task": { "inputs": [ { "description": "The data source ID to query.", "jsonSchema": { "type": "string", "description": "The data source ID to query." }, "nullable": false, "handle": "dataSourceId" }, { "description": "The filter object to narrow results.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion filter field value." }, "description": "The filter object to narrow results." }, "nullable": true, "handle": "filter", "value": null }, { "description": "The list of Notion API objects.", "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion API object." }, "description": "The list of Notion API objects." }, "nullable": true, "handle": "sorts", "value": null }, { "description": "The number of results per page.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 100, "description": "The number of results per page." }, "nullable": true, "handle": "pageSize", "value": null }, { "description": "The cursor for pagination.", "jsonSchema": { "type": "string", "description": "The cursor for pagination." }, "nullable": true, "handle": "startCursor", "value": null }, { "description": "The property names to include in results.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A property name to include." }, "description": "The property names to include in results." }, "nullable": true, "handle": "filterProperties", "value": null }, { "description": "Set to true to query archived pages; false or omitted queries non-archived pages.", "jsonSchema": { "type": "boolean", "description": "Set to true to query archived pages; false or omitted queries non-archived pages." }, "nullable": true, "handle": "is_archived", "value": null }, { "description": "The result object type to return.", "jsonSchema": { "type": "string", "enum": [ "page", "data_source" ], "description": "The result object type to return." }, "nullable": true, "handle": "result_type", "value": null } ], "outputs": [ { "description": "The official Notion data source query response.", "jsonSchema": { "type": "object", "properties": { "object": { "const": "list", "description": "The Notion object type for a paginated response." }, "results": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "A Notion page object returned by the API." }, { "type": "object", "properties": { "object": { "const": "data_source", "description": "The Notion object type." }, "id": { "type": "string", "description": "The data source ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the data source was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the data source was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "title": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source title rich text objects." }, "description": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source description rich text objects." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The data source icon object, or null when it has no icon." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the data source." }, "in_trash": { "type": "boolean", "description": "Whether the data source is in the trash." } }, "additionalProperties": true, "description": "A Notion data source object returned by the API." } ], "description": "A Notion page or data source object." }, "description": "The list of result objects." }, "next_cursor": { "type": [ "string", "null" ], "description": "The cursor for the next page of results." }, "has_more": { "type": "boolean", "description": "Whether more results are available." }, "type": { "const": "page_or_data_source", "description": "The type-specific pagination metadata field name." }, "page_or_data_source": { "type": "object", "properties": {}, "additionalProperties": false, "description": "Pagination metadata for data source query results that can be pages or data sources." }, "request_status": { "type": "object", "properties": { "type": { "type": "string", "description": "The request status type returned by Notion." }, "incomplete_reason": { "type": "string", "description": "The reason the response is incomplete." } }, "additionalProperties": true, "description": "The pagination request status returned by Notion." } }, "required": [ "object", "results", "next_cursor", "has_more", "type", "page_or_data_source" ], "additionalProperties": true, "description": "The official Notion data source query response." }, "nullable": false, "handle": "output" } ], "name": "Find current semester", "executor": { "kind": "connector", "action": "notion.query_data_source", "outputMode": "value" } } }, "n_0f8fb17c267adaf3": { "inputs": { "output": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_4f0879dcd1274452", "output": "output" } ] } }, "name": "Check current semester", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "object": { "const": "list", "description": "The Notion object type for a paginated response." }, "results": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "A Notion page object returned by the API." }, { "type": "object", "properties": { "object": { "const": "data_source", "description": "The Notion object type." }, "id": { "type": "string", "description": "The data source ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the data source was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the data source was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "title": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source title rich text objects." }, "description": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source description rich text objects." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The data source icon object, or null when it has no icon." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the data source." }, "in_trash": { "type": "boolean", "description": "Whether the data source is in the trash." } }, "additionalProperties": true, "description": "A Notion data source object returned by the API." } ], "description": "A Notion page or data source object." }, "description": "The list of result objects." }, "next_cursor": { "type": [ "string", "null" ], "description": "The cursor for the next page of results." }, "has_more": { "type": "boolean", "description": "Whether more results are available." }, "type": { "const": "page_or_data_source", "description": "The type-specific pagination metadata field name." }, "page_or_data_source": { "type": "object", "properties": {}, "additionalProperties": false, "description": "Pagination metadata for data source query results that can be pages or data sources." }, "request_status": { "type": "object", "properties": { "type": { "type": "string", "description": "The request status type returned by Notion." }, "incomplete_reason": { "type": "string", "description": "The reason the response is incomplete." } }, "additionalProperties": true, "description": "The pagination request status returned by Notion." } }, "required": [ "object", "results", "next_cursor", "has_more", "type", "page_or_data_source" ], "additionalProperties": true, "description": "The official Notion data source query response." }, "nullable": false, "handle": "output" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "semesterId" } ], "name": "Check current semester", "moduleId": "n_7262c06954782534", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_b343659e8c4c6ac9": { "inputs": { "dataSourceId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "userSourceId" } ] }, "filter": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0038714092b772c7", "output": "user" } ] }, "pageSize": { "kind": "value", "value": 2 } }, "name": "Find user by email", "kind": "task", "task": { "inputs": [ { "description": "The data source ID to query.", "jsonSchema": { "type": "string", "description": "The data source ID to query." }, "nullable": false, "handle": "dataSourceId" }, { "description": "The filter object to narrow results.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion filter field value." }, "description": "The filter object to narrow results." }, "nullable": true, "handle": "filter", "value": null }, { "description": "The list of Notion API objects.", "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion API object." }, "description": "The list of Notion API objects." }, "nullable": true, "handle": "sorts", "value": null }, { "description": "The number of results per page.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 100, "description": "The number of results per page." }, "nullable": true, "handle": "pageSize", "value": null }, { "description": "The cursor for pagination.", "jsonSchema": { "type": "string", "description": "The cursor for pagination." }, "nullable": true, "handle": "startCursor", "value": null }, { "description": "The property names to include in results.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "A property name to include." }, "description": "The property names to include in results." }, "nullable": true, "handle": "filterProperties", "value": null }, { "description": "Set to true to query archived pages; false or omitted queries non-archived pages.", "jsonSchema": { "type": "boolean", "description": "Set to true to query archived pages; false or omitted queries non-archived pages." }, "nullable": true, "handle": "is_archived", "value": null }, { "description": "The result object type to return.", "jsonSchema": { "type": "string", "enum": [ "page", "data_source" ], "description": "The result object type to return." }, "nullable": true, "handle": "result_type", "value": null } ], "outputs": [ { "description": "The official Notion data source query response.", "jsonSchema": { "type": "object", "properties": { "object": { "const": "list", "description": "The Notion object type for a paginated response." }, "results": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "A Notion page object returned by the API." }, { "type": "object", "properties": { "object": { "const": "data_source", "description": "The Notion object type." }, "id": { "type": "string", "description": "The data source ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the data source was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the data source was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "title": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source title rich text objects." }, "description": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source description rich text objects." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The data source icon object, or null when it has no icon." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the data source." }, "in_trash": { "type": "boolean", "description": "Whether the data source is in the trash." } }, "additionalProperties": true, "description": "A Notion data source object returned by the API." } ], "description": "A Notion page or data source object." }, "description": "The list of result objects." }, "next_cursor": { "type": [ "string", "null" ], "description": "The cursor for the next page of results." }, "has_more": { "type": "boolean", "description": "Whether more results are available." }, "type": { "const": "page_or_data_source", "description": "The type-specific pagination metadata field name." }, "page_or_data_source": { "type": "object", "properties": {}, "additionalProperties": false, "description": "Pagination metadata for data source query results that can be pages or data sources." }, "request_status": { "type": "object", "properties": { "type": { "type": "string", "description": "The request status type returned by Notion." }, "incomplete_reason": { "type": "string", "description": "The reason the response is incomplete." } }, "additionalProperties": true, "description": "The pagination request status returned by Notion." } }, "required": [ "object", "results", "next_cursor", "has_more", "type", "page_or_data_source" ], "additionalProperties": true, "description": "The official Notion data source query response." }, "nullable": false, "handle": "output" } ], "name": "Find user by email", "executor": { "kind": "connector", "action": "notion.query_data_source", "outputMode": "value" } } }, "n_b9e8a9853a12f9eb": { "inputs": { "output": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b343659e8c4c6ac9", "output": "output" } ] }, "name": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "name" } ] }, "email": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "email" } ] }, "userSourceId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6696622a8ce5969c", "output": "userSourceId" } ] } }, "name": "Check user match", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "object": { "const": "list", "description": "The Notion object type for a paginated response." }, "results": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "A Notion page object returned by the API." }, { "type": "object", "properties": { "object": { "const": "data_source", "description": "The Notion object type." }, "id": { "type": "string", "description": "The data source ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the data source was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the data source was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "title": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source title rich text objects." }, "description": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The data source description rich text objects." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The data source icon object, or null when it has no icon." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the data source." }, "in_trash": { "type": "boolean", "description": "Whether the data source is in the trash." } }, "additionalProperties": true, "description": "A Notion data source object returned by the API." } ], "description": "A Notion page or data source object." }, "description": "The list of result objects." }, "next_cursor": { "type": [ "string", "null" ], "description": "The cursor for the next page of results." }, "has_more": { "type": "boolean", "description": "Whether more results are available." }, "type": { "const": "page_or_data_source", "description": "The type-specific pagination metadata field name." }, "page_or_data_source": { "type": "object", "properties": {}, "additionalProperties": false, "description": "Pagination metadata for data source query results that can be pages or data sources." }, "request_status": { "type": "object", "properties": { "type": { "type": "string", "description": "The request status type returned by Notion." }, "incomplete_reason": { "type": "string", "description": "The reason the response is incomplete." } }, "additionalProperties": true, "description": "The pagination request status returned by Notion." } }, "required": [ "object", "results", "next_cursor", "has_more", "type", "page_or_data_source" ], "additionalProperties": true, "description": "The official Notion data source query response." }, "nullable": false, "handle": "output" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "name" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "email" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userSourceId" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "exists" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "propertyId" }, { "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion parent field value." }, "description": "The official Notion parent object payload. Use { page_id: \"...\" } for a child page under an existing page, { data_source_id: \"...\" } for a data source row, or { workspace: true } to create a workspace-level private page when the credential is an OAuth public integration. When parent is provided, do not use the top-level title field; set the title through properties.title instead. Internal integration secrets usually cannot create workspace-level private pages and should use a parent page or data source." }, "nullable": true, "handle": "parent" }, { "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion page property value." }, "description": "The page properties." }, "nullable": true, "handle": "properties" } ], "name": "Check user match", "moduleId": "n_047f504c61faf7b0", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_e602f83636706f74": { "inputs": {}, "name": "Existing user?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_b9e8a9853a12f9eb", "output": "exists" } }, "operator": "isTrue" } ] } ] } ] }, "n_eb168959fd2f0644": { "inputs": { "userId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b9e8a9853a12f9eb", "output": "userId" } ] }, "propertyId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b9e8a9853a12f9eb", "output": "propertyId" } ] } }, "name": "Use existing user", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "propertyId" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "propertyId" } ], "name": "Use existing user", "moduleId": "n_3f5f88088a193b55", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a1edd84478ed1876": { "inputs": { "parent": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b9e8a9853a12f9eb", "output": "parent" } ] }, "properties": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b9e8a9853a12f9eb", "output": "properties" } ] } }, "name": "Create user", "kind": "task", "task": { "inputs": [ { "description": "The parent page ID.", "jsonSchema": { "type": "string", "description": "The parent page ID." }, "nullable": true, "handle": "parentId", "value": null }, { "description": "The page title.", "jsonSchema": { "type": "string", "description": "The page title." }, "nullable": true, "handle": "title", "value": null }, { "description": "The official Notion parent object payload. Use { page_id: \"...\" } for a child page under an existing page, { data_source_id: \"...\" } for a data source row, or { workspace: true } to create a workspace-level private page when the credential is an OAuth public integration. When parent is provided, do not use the top-level title field; set the title through properties.title instead. Internal integration secrets usually cannot create workspace-level private pages and should use a parent page or data source.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion parent field value." }, "description": "The official Notion parent object payload. Use { page_id: \"...\" } for a child page under an existing page, { data_source_id: \"...\" } for a data source row, or { workspace: true } to create a workspace-level private page when the credential is an OAuth public integration. When parent is provided, do not use the top-level title field; set the title through properties.title instead. Internal integration secrets usually cannot create workspace-level private pages and should use a parent page or data source." }, "nullable": true, "handle": "parent", "value": null }, { "description": "The page properties.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion page property value." }, "description": "The page properties." }, "nullable": true, "handle": "properties", "value": null }, { "description": "The child blocks to add.", "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion block object." }, "description": "The child blocks to add." }, "nullable": true, "handle": "children", "value": null }, { "description": "Enhanced Markdown content to create page content. Mutually exclusive with children. Markdown-only private pages without parent are supported only for OAuth public connections or personal access tokens; internal integration secrets should provide a parent page or data source.", "jsonSchema": { "type": "string", "description": "Enhanced Markdown content to create page content. Mutually exclusive with children. Markdown-only private pages without parent are supported only for OAuth public connections or personal access tokens; internal integration secrets should provide a parent page or data source." }, "nullable": true, "handle": "markdown", "value": null }, { "description": "The data source template payload to apply to the created page.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion template field value." }, "description": "The data source template payload to apply to the created page." }, "nullable": true, "handle": "template", "value": null }, { "description": "The page icon object.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion icon field value." }, "description": "The page icon object." }, "nullable": true, "handle": "icon", "value": null }, { "description": "The page cover object.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion cover field value." }, "description": "The page cover object." }, "nullable": true, "handle": "cover", "value": null } ], "outputs": [ { "description": "The created Notion page object returned by the API.", "jsonSchema": { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "The created Notion page object returned by the API." }, "nullable": false, "handle": "output" } ], "name": "Create user", "executor": { "kind": "connector", "action": "notion.create_page", "outputMode": "value" } } }, "n_3993309994a5b46d": { "inputs": { "output": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a1edd84478ed1876", "output": "output" } ] } }, "name": "Confirm created user", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "The created Notion page object returned by the API." }, "nullable": false, "handle": "output" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "propertyId" } ], "name": "Confirm created user", "moduleId": "n_06de3971cbcc0096", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_9d3b08a357e4043a": { "inputs": { "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_9d3b08a357e4043a", "output": "state" } ] }, "semesterId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0f8fb17c267adaf3", "output": "semesterId" } ] }, "response": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1e837b1c6a83d2dd", "output": "output" } ] } }, "name": "Collect existing semesters", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" }, { "jsonSchema": { "anyOf": [ { "type": "object", "properties": { "object": { "const": "property_item", "description": "The Notion object type." }, "id": { "type": "string", "description": "The property ID." }, "type": { "type": "string", "enum": [ "rich_text", "number", "select", "multi_select", "date", "formula", "relation", "rollup", "title", "people", "files", "checkbox", "url", "email", "phone_number", "created_time", "created_by", "last_edited_time", "last_edited_by" ], "description": "The property type returned by Notion." }, "title": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The title rich text values returned for direct title property items." }, "rich_text": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The rich text values returned for direct rich_text property items." }, "number": { "type": [ "number", "null" ], "description": "The number property value." }, "select": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The select option value, or null when empty." }, "multi_select": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion select option object." }, "description": "The selected multi-select option values." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date property value, or null when empty." }, "formula": { "type": "object", "properties": { "type": { "type": "string", "description": "The formula result type, such as string, number, boolean, or date." }, "string": { "type": [ "string", "null" ], "description": "The string formula result when type is string." }, "number": { "type": [ "number", "null" ], "description": "The number formula result when type is number." }, "boolean": { "type": "boolean", "description": "The boolean formula result when type is boolean." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date formula result when type is date." } }, "additionalProperties": true, "description": "A Notion formula property item value." }, "relation": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The related Notion page ID." } }, "additionalProperties": true, "description": "A Notion relation page reference." }, "description": "The relation page references returned for direct relation property items." }, "rollup": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "number", "date", "array", "unsupported", "incomplete" ], "description": "The rollup result type returned by Notion." }, "function": { "type": "string", "description": "The rollup aggregation function configured in Notion." }, "number": { "type": [ "number", "null" ], "description": "The number rollup result when type is number." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date rollup result when type is date." }, "array": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rollup array item." }, "description": "The array rollup result when type is array." }, "unsupported": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The unsupported rollup marker returned when type is unsupported." }, "incomplete": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The incomplete rollup marker returned while more relation items must be paginated." } }, "additionalProperties": true, "description": "The rollup aggregation metadata and partial or final value returned by Notion." }, "people": { "type": "array", "items": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "description": "The user objects returned for direct people property items." }, "files": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion file object." }, "description": "The file property values." }, "checkbox": { "type": "boolean", "description": "The checkbox property value." }, "url": { "type": [ "string", "null" ], "description": "The URL property value, or null when empty." }, "email": { "type": [ "string", "null" ], "format": "email", "description": "The email property value, or null when empty." }, "phone_number": { "type": [ "string", "null" ], "description": "The phone number property value, or null when empty." }, "created_time": { "type": "string", "format": "date-time", "description": "The page creation time for created_time properties." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The last edit time for last_edited_time properties." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." } }, "additionalProperties": true, "description": "A direct Notion page property item returned by the API." }, { "type": "object", "properties": { "object": { "const": "list", "description": "The Notion object type for a paginated response." }, "results": { "type": "array", "items": { "type": "object", "properties": { "object": { "const": "property_item", "description": "The Notion object type." }, "id": { "type": "string", "description": "The property ID." }, "type": { "type": "string", "enum": [ "rich_text", "number", "select", "multi_select", "date", "formula", "relation", "rollup", "title", "people", "files", "checkbox", "url", "email", "phone_number", "created_time", "created_by", "last_edited_time", "last_edited_by" ], "description": "The property type returned by Notion." }, "title": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A single Notion rich text object returned as a paginated title property item." }, "rich_text": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A single Notion rich text object returned as a paginated rich_text property item." }, "relation": { "type": "object", "properties": { "id": { "type": "string", "description": "The related Notion page ID." } }, "additionalProperties": true, "description": "A Notion relation page reference." }, "people": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A single Notion user returned as a paginated people property item." } }, "additionalProperties": true, "description": "A single Notion page property item entry inside a paginated property response." }, "description": "The paginated property item entries." }, "next_cursor": { "type": [ "string", "null" ], "description": "The cursor for the next page of results." }, "has_more": { "type": "boolean", "description": "Whether more results are available." }, "type": { "const": "property_item", "description": "The pagination result type returned by Notion." }, "property_item": { "type": "object", "properties": { "id": { "type": "string", "description": "The property ID." }, "next_url": { "type": [ "string", "null" ], "format": "uri", "description": "The URL for the next page of property items when available." }, "type": { "type": "string", "enum": [ "rich_text", "number", "select", "multi_select", "date", "formula", "relation", "rollup", "title", "people", "files", "checkbox", "url", "email", "phone_number", "created_time", "created_by", "last_edited_time", "last_edited_by" ], "description": "The property type returned by Notion." }, "title": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The title pagination metadata object; read title item values from results[].title." }, "rich_text": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The rich_text pagination metadata object; read rich text item values from results[].rich_text." }, "relation": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The relation pagination metadata object; read relation page references from results[].relation." }, "people": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The people pagination metadata object; read user items from results[].people." }, "rollup": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "number", "date", "array", "unsupported", "incomplete" ], "description": "The rollup result type returned by Notion." }, "function": { "type": "string", "description": "The rollup aggregation function configured in Notion." }, "number": { "type": [ "number", "null" ], "description": "The number rollup result when type is number." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date rollup result when type is date." }, "array": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rollup array item." }, "description": "The array rollup result when type is array." }, "unsupported": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The unsupported rollup marker returned when type is unsupported." }, "incomplete": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The incomplete rollup marker returned while more relation items must be paginated." } }, "additionalProperties": true, "description": "The rollup aggregation metadata and partial or final value returned by Notion." } }, "additionalProperties": true, "description": "The metadata and type-specific wrapper for a paginated Notion page property response." } }, "additionalProperties": true, "description": "A paginated Notion page property item response." } ], "description": "The official Notion page property item response." }, "nullable": true, "handle": "response" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "semesterId" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "cursor" }, { "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion page property value." }, "description": "The page properties to update." }, "nullable": true, "handle": "properties" } ], "name": "Collect existing semesters", "moduleId": "n_601356208c6a62fa", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_62087da09aa6cc46": { "inputs": {}, "name": "Another relation page?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_9d3b08a357e4043a", "output": "more" } }, "operator": "isTrue" } ] } ] } ] }, "n_1e837b1c6a83d2dd": { "inputs": { "pageId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_eb168959fd2f0644", "output": "userId" }, { "kind": "node", "nodeId": "n_3993309994a5b46d", "output": "userId" } ] }, "propertyId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_eb168959fd2f0644", "output": "propertyId" }, { "kind": "node", "nodeId": "n_3993309994a5b46d", "output": "propertyId" } ] }, "pageSize": { "kind": "value", "value": 100 }, "startCursor": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_9d3b08a357e4043a", "output": "cursor" } ] } }, "name": "Read semester relations", "kind": "task", "task": { "inputs": [ { "description": "The page ID.", "jsonSchema": { "type": "string", "description": "The page ID." }, "nullable": false, "handle": "pageId" }, { "description": "The property ID to retrieve.", "jsonSchema": { "type": "string", "description": "The property ID to retrieve." }, "nullable": false, "handle": "propertyId" }, { "description": "The number of property items per page.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 100, "description": "The number of property items per page." }, "nullable": true, "handle": "pageSize", "value": null }, { "description": "The cursor for paginated property item results.", "jsonSchema": { "type": "string", "description": "The cursor for paginated property item results." }, "nullable": true, "handle": "startCursor", "value": null } ], "outputs": [ { "description": "The official Notion page property item response.", "jsonSchema": { "anyOf": [ { "type": "object", "properties": { "object": { "const": "property_item", "description": "The Notion object type." }, "id": { "type": "string", "description": "The property ID." }, "type": { "type": "string", "enum": [ "rich_text", "number", "select", "multi_select", "date", "formula", "relation", "rollup", "title", "people", "files", "checkbox", "url", "email", "phone_number", "created_time", "created_by", "last_edited_time", "last_edited_by" ], "description": "The property type returned by Notion." }, "title": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The title rich text values returned for direct title property items." }, "rich_text": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rich text object." }, "description": "The rich text values returned for direct rich_text property items." }, "number": { "type": [ "number", "null" ], "description": "The number property value." }, "select": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The select option value, or null when empty." }, "multi_select": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion select option object." }, "description": "The selected multi-select option values." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date property value, or null when empty." }, "formula": { "type": "object", "properties": { "type": { "type": "string", "description": "The formula result type, such as string, number, boolean, or date." }, "string": { "type": [ "string", "null" ], "description": "The string formula result when type is string." }, "number": { "type": [ "number", "null" ], "description": "The number formula result when type is number." }, "boolean": { "type": "boolean", "description": "The boolean formula result when type is boolean." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date formula result when type is date." } }, "additionalProperties": true, "description": "A Notion formula property item value." }, "relation": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The related Notion page ID." } }, "additionalProperties": true, "description": "A Notion relation page reference." }, "description": "The relation page references returned for direct relation property items." }, "rollup": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "number", "date", "array", "unsupported", "incomplete" ], "description": "The rollup result type returned by Notion." }, "function": { "type": "string", "description": "The rollup aggregation function configured in Notion." }, "number": { "type": [ "number", "null" ], "description": "The number rollup result when type is number." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date rollup result when type is date." }, "array": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rollup array item." }, "description": "The array rollup result when type is array." }, "unsupported": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The unsupported rollup marker returned when type is unsupported." }, "incomplete": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The incomplete rollup marker returned while more relation items must be paginated." } }, "additionalProperties": true, "description": "The rollup aggregation metadata and partial or final value returned by Notion." }, "people": { "type": "array", "items": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "description": "The user objects returned for direct people property items." }, "files": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion file object." }, "description": "The file property values." }, "checkbox": { "type": "boolean", "description": "The checkbox property value." }, "url": { "type": [ "string", "null" ], "description": "The URL property value, or null when empty." }, "email": { "type": [ "string", "null" ], "format": "email", "description": "The email property value, or null when empty." }, "phone_number": { "type": [ "string", "null" ], "description": "The phone number property value, or null when empty." }, "created_time": { "type": "string", "format": "date-time", "description": "The page creation time for created_time properties." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The last edit time for last_edited_time properties." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." } }, "additionalProperties": true, "description": "A direct Notion page property item returned by the API." }, { "type": "object", "properties": { "object": { "const": "list", "description": "The Notion object type for a paginated response." }, "results": { "type": "array", "items": { "type": "object", "properties": { "object": { "const": "property_item", "description": "The Notion object type." }, "id": { "type": "string", "description": "The property ID." }, "type": { "type": "string", "enum": [ "rich_text", "number", "select", "multi_select", "date", "formula", "relation", "rollup", "title", "people", "files", "checkbox", "url", "email", "phone_number", "created_time", "created_by", "last_edited_time", "last_edited_by" ], "description": "The property type returned by Notion." }, "title": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A single Notion rich text object returned as a paginated title property item." }, "rich_text": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A single Notion rich text object returned as a paginated rich_text property item." }, "relation": { "type": "object", "properties": { "id": { "type": "string", "description": "The related Notion page ID." } }, "additionalProperties": true, "description": "A Notion relation page reference." }, "people": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A single Notion user returned as a paginated people property item." } }, "additionalProperties": true, "description": "A single Notion page property item entry inside a paginated property response." }, "description": "The paginated property item entries." }, "next_cursor": { "type": [ "string", "null" ], "description": "The cursor for the next page of results." }, "has_more": { "type": "boolean", "description": "Whether more results are available." }, "type": { "const": "property_item", "description": "The pagination result type returned by Notion." }, "property_item": { "type": "object", "properties": { "id": { "type": "string", "description": "The property ID." }, "next_url": { "type": [ "string", "null" ], "format": "uri", "description": "The URL for the next page of property items when available." }, "type": { "type": "string", "enum": [ "rich_text", "number", "select", "multi_select", "date", "formula", "relation", "rollup", "title", "people", "files", "checkbox", "url", "email", "phone_number", "created_time", "created_by", "last_edited_time", "last_edited_by" ], "description": "The property type returned by Notion." }, "title": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The title pagination metadata object; read title item values from results[].title." }, "rich_text": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The rich_text pagination metadata object; read rich text item values from results[].rich_text." }, "relation": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The relation pagination metadata object; read relation page references from results[].relation." }, "people": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The people pagination metadata object; read user items from results[].people." }, "rollup": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "number", "date", "array", "unsupported", "incomplete" ], "description": "The rollup result type returned by Notion." }, "function": { "type": "string", "description": "The rollup aggregation function configured in Notion." }, "number": { "type": [ "number", "null" ], "description": "The number rollup result when type is number." }, "date": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The date rollup result when type is date." }, "array": { "type": "array", "items": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "A Notion rollup array item." }, "description": "The array rollup result when type is array." }, "unsupported": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The unsupported rollup marker returned when type is unsupported." }, "incomplete": { "type": "object", "properties": {}, "additionalProperties": false, "description": "The incomplete rollup marker returned while more relation items must be paginated." } }, "additionalProperties": true, "description": "The rollup aggregation metadata and partial or final value returned by Notion." } }, "additionalProperties": true, "description": "The metadata and type-specific wrapper for a paginated Notion page property response." } }, "additionalProperties": true, "description": "A paginated Notion page property item response." } ], "description": "The official Notion page property item response." }, "nullable": false, "handle": "output" } ], "name": "Read semester relations", "executor": { "kind": "connector", "action": "notion.retrieve_page_property", "outputMode": "value" } } }, "n_85622947ff268a93": { "inputs": { "pageId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_eb168959fd2f0644", "output": "userId" }, { "kind": "node", "nodeId": "n_3993309994a5b46d", "output": "userId" } ] }, "properties": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_9d3b08a357e4043a", "output": "properties" } ] } }, "name": "Add current semester", "kind": "task", "task": { "inputs": [ { "description": "The page ID to update.", "jsonSchema": { "type": "string", "description": "The page ID to update." }, "nullable": false, "handle": "pageId" }, { "description": "The new page title.", "jsonSchema": { "type": "string", "description": "The new page title." }, "nullable": true, "handle": "title", "value": null }, { "description": "The page properties to update.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion page property value." }, "description": "The page properties to update." }, "nullable": true, "handle": "properties", "value": null }, { "description": "The new page icon object.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion icon field value." }, "description": "The new page icon object." }, "nullable": true, "handle": "icon", "value": null }, { "description": "The new page cover object.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion cover field value." }, "description": "The new page cover object." }, "nullable": true, "handle": "cover", "value": null }, { "description": "The data source template payload to apply to the existing page.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A Notion template field value." }, "description": "The data source template payload to apply to the existing page." }, "nullable": true, "handle": "template", "value": null }, { "description": "Whether to move the page to trash.", "jsonSchema": { "type": "boolean", "description": "Whether to move the page to trash." }, "nullable": true, "handle": "in_trash", "value": null }, { "description": "Whether to lock or unlock the page in the Notion app UI.", "jsonSchema": { "type": "boolean", "description": "Whether to lock or unlock the page in the Notion app UI." }, "nullable": true, "handle": "is_locked", "value": null }, { "description": "Whether to delete all child blocks from the page before applying template changes.", "jsonSchema": { "type": "boolean", "description": "Whether to delete all child blocks from the page before applying template changes." }, "nullable": true, "handle": "erase_content", "value": null } ], "outputs": [ { "description": "The updated Notion page object returned by the API.", "jsonSchema": { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "The updated Notion page object returned by the API." }, "nullable": false, "handle": "output" } ], "name": "Add current semester", "executor": { "kind": "connector", "action": "notion.update_page", "outputMode": "value" } } }, "n_7956ff3e4d0ceae4": { "inputs": { "output": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_85622947ff268a93", "output": "output" } ] }, "userId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_eb168959fd2f0644", "output": "userId" }, { "kind": "node", "nodeId": "n_3993309994a5b46d", "output": "userId" } ] } }, "name": "Confirm enrollment", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "object": { "const": "page", "description": "The Notion object type." }, "id": { "type": "string", "description": "The page ID." }, "created_time": { "type": "string", "format": "date-time", "description": "The time when the page was created." }, "last_edited_time": { "type": "string", "format": "date-time", "description": "The time when the page was last edited." }, "created_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "last_edited_by": { "type": "object", "properties": { "object": { "const": "user", "description": "The Notion object type." }, "id": { "type": "string", "description": "The Notion user ID." }, "name": { "type": [ "string", "null" ], "description": "The user's display name, or null when unavailable." }, "avatar_url": { "type": [ "string", "null" ], "description": "The user's avatar URL, or null when unavailable." }, "type": { "type": "string", "enum": [ "person", "bot" ], "description": "The user type returned by Notion." }, "person": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "The person's email address." } }, "additionalProperties": true, "description": "Details about a person user." }, "bot": { "type": "object", "additionalProperties": { "description": "A Notion API field value." }, "description": "Details about a bot user." } }, "additionalProperties": true, "description": "A Notion user reference." }, "cover": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page cover object, or null when the page has no cover." }, "icon": { "type": [ "object", "null" ], "additionalProperties": { "description": "A Notion API field value." }, "description": "The page icon object, or null when the page has no icon." }, "parent": { "type": "object", "properties": { "type": { "type": "string", "description": "The parent type, such as workspace, page_id, data_source_id, database_id, or block_id." } }, "additionalProperties": true, "description": "The parent object that contains this Notion object." }, "is_archived": { "type": "boolean", "description": "Whether the page has been archived." }, "in_trash": { "type": "boolean", "description": "Whether the page is in the trash." }, "is_locked": { "type": "boolean", "description": "Whether the page is locked." }, "properties": { "type": "object", "additionalProperties": { "description": "A Notion property value or property schema object." }, "description": "The Notion page, database, or data source properties keyed by property name." }, "url": { "type": "string", "format": "uri", "description": "The canonical Notion URL for the page." }, "public_url": { "type": [ "string", "null" ], "format": "uri", "description": "The public Notion URL if the page is published to the web." } }, "additionalProperties": true, "description": "The updated Notion page object returned by the API." }, "nullable": false, "handle": "output" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "userId" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Confirm enrollment", "moduleId": "n_d64817eb7b17d825", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_561979aa8ef411d3": { "name": "Signup result", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "outputMappings": { "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7956ff3e4d0ceae4", "output": "statusCode" }, { "kind": "node", "nodeId": "n_4674d0f3761f42e3", "output": "statusCode" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7956ff3e4d0ceae4", "output": "body" }, { "kind": "node", "nodeId": "n_4674d0f3761f42e3", "output": "body" } ] } } } }, "edges": [ { "source": "n_87ccd5bf46ddf0d1", "target": "n_6696622a8ce5969c" }, { "source": "n_6696622a8ce5969c", "target": "n_78405ccfe3f26634" }, { "source": "n_78405ccfe3f26634", "target": "n_0038714092b772c7", "sourceHandle": "yes" }, { "source": "n_78405ccfe3f26634", "target": "n_4674d0f3761f42e3", "sourceHandle": "otherwise" }, { "source": "n_4674d0f3761f42e3", "target": "n_561979aa8ef411d3" }, { "source": "n_0038714092b772c7", "target": "n_4f0879dcd1274452" }, { "source": "n_4f0879dcd1274452", "target": "n_0f8fb17c267adaf3" }, { "source": "n_0f8fb17c267adaf3", "target": "n_b343659e8c4c6ac9" }, { "source": "n_b343659e8c4c6ac9", "target": "n_b9e8a9853a12f9eb" }, { "source": "n_b9e8a9853a12f9eb", "target": "n_e602f83636706f74" }, { "source": "n_e602f83636706f74", "target": "n_eb168959fd2f0644", "sourceHandle": "yes" }, { "source": "n_e602f83636706f74", "target": "n_a1edd84478ed1876", "sourceHandle": "otherwise" }, { "source": "n_a1edd84478ed1876", "target": "n_3993309994a5b46d" }, { "source": "n_eb168959fd2f0644", "target": "n_9d3b08a357e4043a" }, { "source": "n_3993309994a5b46d", "target": "n_9d3b08a357e4043a" }, { "source": "n_9d3b08a357e4043a", "target": "n_62087da09aa6cc46" }, { "source": "n_62087da09aa6cc46", "target": "n_1e837b1c6a83d2dd", "sourceHandle": "yes" }, { "source": "n_1e837b1c6a83d2dd", "target": "n_9d3b08a357e4043a" }, { "source": "n_62087da09aa6cc46", "target": "n_85622947ff268a93", "sourceHandle": "otherwise" }, { "source": "n_85622947ff268a93", "target": "n_7956ff3e4d0ceae4" }, { "source": "n_7956ff3e4d0ceae4", "target": "n_561979aa8ef411d3" } ] } }, "modules": { "n_1c6931b668d228b0": { "name": "Authorize the signup", "imports": [], "source": "import {Buffer} from 'node:buffer';\nexport default function authorize({headers,body,expectedAuthorization,userSourceId,semesterSourceId}){const expected=typeof expectedAuthorization==='string'?expectedAuthorization.trim():'';const parsed=/^Basic ([A-Za-z0-9+/]+={0,2})$/.exec(expected),credentials=parsed?Buffer.from(parsed[1],'base64').toString('utf8'):'';if(!parsed||!/^[^:]+:.+$/.test(credentials)||/[\\r\\n]/.test(credentials))throw Error('Configure a Basic authorization secret');const h=Object.entries(headers||{}).filter(([k])=>k.toLowerCase()==='authorization'),received=h.length===1&&typeof h[0][1]==='string'?/^Basic +([A-Za-z0-9+/]+={0,2})$/i.exec(h[0][1].trim()):null,actual=received?Buffer.from(received[1],'base64').toString('utf8'):'';let diff=credentials.length^actual.length;for(let i=0;i1)throw Error('Ambiguous user email');const page=output.results[0];if(page&&(!page.id||!page.properties?.Semesters?.id))throw Error('User relation property is missing');return{exists:!!page,userId:page?.id??'',propertyId:page?.properties?.Semesters?.id??'',parent:{data_source_id:userSourceId},properties:{Name:{title:[{text:{content:name}}]},Email:{email}}}}\n" }, "n_3f5f88088a193b55": { "name": "Use existing user", "imports": [], "source": "export default function existing({userId,propertyId}){if(!userId||!propertyId)throw Error('Missing user relation');return{userId,propertyId}}\n" }, "n_06de3971cbcc0096": { "name": "Confirm created user", "imports": [], "source": "export default function created({output}){if(typeof output?.id!=='string'||!output.id||typeof output.properties?.Semesters?.id!=='string'||!output.properties.Semesters.id)throw Error('Created user not confirmed; inspect Notion before retry');return{userId:output.id,propertyId:output.properties.Semesters.id}}\n" }, "n_601356208c6a62fa": { "name": "Collect existing semesters", "imports": [], "source": "export default function relations({previousState,response,semesterId}){let state=previousState??{ids:[],seen:[],cursor:null};if(!Array.isArray(state.ids)||!Array.isArray(state.seen))throw Error('Invalid relation progress');if(response!=null){if(response.object!=='list'||!Array.isArray(response.results)||typeof response.has_more!=='boolean')throw Error('Invalid relation page');const ids=response.results.map(x=>{if(typeof x?.relation?.id!=='string'||!x.relation.id)throw Error('Invalid relation');return x.relation.id}),cursor=response.has_more?response.next_cursor:null;if(response.has_more&&(typeof cursor!=='string'||!cursor||state.seen.includes(cursor)))throw Error('Invalid or repeated relation cursor');state={ids:state.ids.concat(ids),seen:cursor?state.seen.concat(cursor):state.seen,cursor}}const all=[semesterId,...state.ids.filter(id=>id!==semesterId)];if(response!=null&&!state.cursor&&all.length>100)throw Error('Notion cannot set more than 100 relations in one request');return{state,more:response==null||state.cursor!=null,cursor:state.cursor,properties:{Semesters:{relation:all.map(id=>({id}))}}}}\n" }, "n_d64817eb7b17d825": { "name": "Confirm enrollment", "imports": [], "source": "export default function complete({output,userId}){if(typeof output?.id!=='string'||output.id!==userId)throw Error('Notion update not confirmed; inspect before retry');return{statusCode:200,body:{accepted:true}}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }