{ "kind": "open-flow-workflow", "version": 1, "name": "Sync GitHub Issues to a Notion Database", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_930447df24181f3d": { "name": "Receive GitHub issue event", "kind": "integration", "config": { "owner": { "kind": "value", "value": "your-github-owner" }, "repo": { "kind": "value", "value": "your-github-repo" }, "events": { "kind": "value", "value": [ "issues" ] }, "insecureSsl": { "kind": "value", "value": false } }, "definition": { "configInputs": [ { "jsonSchema": { "type": "array", "items": { "type": "string", "enum": [ "*", "branch_protection_configuration", "branch_protection_rule", "check_run", "check_suite", "code_scanning_alert", "commit_comment", "create", "custom_property_values", "delete", "dependabot_alert", "deploy_key", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issue_comment", "issue_dependencies", "issues", "label", "member", "meta", "milestone", "package", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "pull_request_review_thread", "push", "registry_package", "release", "repository", "repository_advisory", "repository_import", "repository_ruleset", "repository_vulnerability_alert", "secret_scanning_alert", "secret_scanning_alert_location", "secret_scanning_scan", "security_and_analysis", "star", "status", "sub_issues", "team_add", "watch", "workflow_job", "workflow_run" ] }, "minItems": 1, "uniqueItems": true }, "nullable": false, "handle": "events" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "insecureSsl", "value": false }, { "jsonSchema": { "type": "string", "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$" }, "nullable": false, "handle": "owner" }, { "jsonSchema": { "type": "string", "pattern": "^(?!\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$" }, "nullable": false, "handle": "repo" } ], "definitionVersion": 2, "description": "Triggers when selected GitHub webhook events occur in a repository.", "displayName": "Repository Event", "key": "github.on_repo_event", "name": "on_repo_event", "outputs": [ { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "deliveryId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "event" } ], "provider": "github", "type": "integration", "endpoint": { "body": { "allowArray": false, "allowEmpty": false, "formats": [ "json" ] }, "methods": [ "POST" ], "successStatus": 202 } } }, "n_82a81c7cb86ba0be": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_930447df24181f3d", "output": "body" } ] }, "dataSourceId": { "kind": "value", "value": "YOUR_NOTION_DATA_SOURCE_ID" } }, "name": "Prepare issue change", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "dataSourceId" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "supported" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "opened" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "action" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "dataSourceId" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "filter" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "parent" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "properties" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "trash" } ], "name": "Prepare issue change", "moduleId": "n_d188fc33cab15aea", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_6fadbb5db1e0840d": { "inputs": {}, "name": "Is this a supported change?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "supported" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_8df1ba893666462e": { "inputs": {}, "name": "Was the issue opened?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "opened", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "opened" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_fdb106b0e1d0a65b": { "inputs": { "parent": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "parent" } ] }, "properties": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "properties" } ] } }, "name": "Create the issue page", "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 the issue page", "executor": { "kind": "connector", "action": "notion.create_page", "outputMode": "value" } } }, "n_1cc1aabb2e44f283": { "inputs": { "dataSourceId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "dataSourceId" } ] }, "filter": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "filter" } ] }, "pageSize": { "kind": "value", "value": 2 } }, "name": "Find the issue page", "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 the issue page", "executor": { "kind": "connector", "action": "notion.query_data_source", "outputMode": "value" } } }, "n_f39807e065c9f292": { "inputs": { "result": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_1cc1aabb2e44f283", "output": "output" } ] } }, "name": "Check the matching page", "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": "result" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "found" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "pageId" } ], "name": "Check the matching page", "moduleId": "n_37a4fe79f1ec4858", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_4f7d0b8cbeaf0d54": { "inputs": {}, "name": "Was the issue found?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "found", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_f39807e065c9f292", "output": "found" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_dcdf0854a83e30f5": { "inputs": { "pageId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_f39807e065c9f292", "output": "pageId" } ] }, "properties": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "properties" } ] }, "in_trash": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_82a81c7cb86ba0be", "output": "trash" } ] } }, "name": "Update or archive the issue page", "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": "Update or archive the issue page", "executor": { "kind": "connector", "action": "notion.update_page", "outputMode": "value" } } } }, "edges": [ { "source": "n_930447df24181f3d", "target": "n_82a81c7cb86ba0be" }, { "source": "n_82a81c7cb86ba0be", "target": "n_6fadbb5db1e0840d" }, { "source": "n_6fadbb5db1e0840d", "target": "n_8df1ba893666462e", "sourceHandle": "yes" }, { "source": "n_8df1ba893666462e", "target": "n_fdb106b0e1d0a65b", "sourceHandle": "opened" }, { "source": "n_8df1ba893666462e", "target": "n_1cc1aabb2e44f283", "sourceHandle": "otherwise" }, { "source": "n_1cc1aabb2e44f283", "target": "n_f39807e065c9f292" }, { "source": "n_f39807e065c9f292", "target": "n_4f7d0b8cbeaf0d54" }, { "source": "n_4f7d0b8cbeaf0d54", "target": "n_dcdf0854a83e30f5", "sourceHandle": "found" } ] } }, "modules": { "n_d188fc33cab15aea": { "name": "Prepare issue change", "imports": [], "source": "export default function issueNotionPrepare({body,dataSourceId}) {\n const actions=['opened','edited','deleted','closed','reopened'];const action=body?.action;\n if(!actions.includes(action))return {supported:false,opened:false,action:'ignored',dataSourceId:'',filter:{},parent:{},properties:{},trash:false};\n const issue=body.issue;if(!issue||!Number.isSafeInteger(issue.id)||issue.id<=0||typeof issue.title!=='string'||!issue.title.trim()||issue.title.length>2000||typeof issue.html_url!=='string'||!/^https:\\/\\/github\\.com\\//.test(issue.html_url))throw Error('Invalid issue payload');\n if(typeof dataSourceId!=='string'||!dataSourceId.trim()||dataSourceId==='YOUR_NOTION_DATA_SOURCE_ID')throw Error('Configure Notion data source ID');\n const properties=action==='opened'?{'Issue':{title:[{text:{content:issue.title}}]},'Issue ID':{number:issue.id},'Link':{url:issue.html_url},'Closed':{checkbox:false}}:action==='edited'?{'Issue':{title:[{text:{content:issue.title}}]}}:action==='closed'?{'Closed':{checkbox:true}}:action==='reopened'?{'Closed':{checkbox:false}}:{};\n return {supported:true,opened:action==='opened',action,dataSourceId,filter:{property:'Issue ID',number:{equals:issue.id}},parent:{data_source_id:dataSourceId},properties,trash:action==='deleted'};\n}\n" }, "n_37a4fe79f1ec4858": { "name": "Check the matching page", "imports": [], "source": "export default function issueNotionMatch({result}) {\n if(!result||!Array.isArray(result.results)||typeof result.has_more!=='boolean')throw Error('Invalid Notion query response');\n if(result.has_more||result.results.length>1)throw Error('More than one Notion page matches this issue');\n if(result.results.length===0)return {found:false,pageId:''};\n const page=result.results[0];if(page.object!=='page'||typeof page.id!=='string'||!page.id)throw Error('Invalid matching Notion page');return {found:true,pageId:page.id};\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }