{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        16,
        -32
      ],
      "id": "4daae987-8376-4ca6-be23-66f3dec887d9",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        400,
        -32
      ],
      "id": "4d9dfb7b-4b25-4587-ba25-5668ea27cec1",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "update",
        "pageId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Repo|title",
              "title": "={{ $json.name }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        1264,
        -256
      ],
      "id": "beb400af-3845-48b4-958f-f3d3212fe44f",
      "name": "Update a database page",
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "5565544d-90dd-4112-a8cc-c3c43a790b3a",
              "leftValue": "={{ $('Loop Over Items').item.json.name }}",
              "rightValue": "={{ $json.id }}",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        960,
        -16
      ],
      "id": "9ca2674b-8bd1-4daf-868c-de10e0ca3c6b",
      "name": "If"
    },
    {
      "parameters": {
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "value": "682aed8f-63d5-4f59-a3e4-7a9bfc326372",
          "mode": "list",
          "cachedResultName": "GitHub Repos",
          "cachedResultUrl": "https://www.notion.so/682aed8f63d54f59a3e47a9bfc326372"
        },
        "title": "={{ $json.name }}",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Repo|title",
              "title": "={{ $('Loop Over Items').item.json.name }}"
            },
            {
              "key": "URL|url",
              "urlValue": "={{ $('Loop Over Items').item.json.html_url }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        1264,
        128
      ],
      "id": "e79c3833-a413-471e-b7d1-0501e8f4c43a",
      "name": "Create a database page",
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "user",
        "owner": {
          "__rl": true,
          "mode": "name",
          "value": "MokeyBytes"
        },
        "returnAll": true
      },
      "type": "n8n-nodes-base.github",
      "typeVersion": 1.1,
      "position": [
        208,
        -32
      ],
      "id": "3848207f-2f2e-4e37-8bd7-c0c98668c0e1",
      "name": "Get a user's repositories",
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "getAll",
        "databaseId": {
          "__rl": true,
          "value": "682aed8f-63d5-4f59-a3e4-7a9bfc326372",
          "mode": "list",
          "cachedResultName": "GitHub Repos",
          "cachedResultUrl": "https://www.notion.so/682aed8f63d54f59a3e47a9bfc326372"
        },
        "returnAll": true,
        "filterType": "manual",
        "matchType": "allFilters",
        "filters": {
          "conditions": [
            {
              "key": "Repo|title",
              "condition": "equals",
              "titleValue": "={{ $json.name }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        720,
        -16
      ],
      "id": "3baada37-73ed-478e-a81b-eea61fbb81de",
      "name": "Get many database pages",
      "alwaysOutputData": true,
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get a user's repositories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get many database pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Update a database page",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create a database page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update a database page": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a database page": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a user's repositories": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many database pages": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d8a05028-2a06-4c65-98d4-0c2348170a62",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "mSyutwg9Mx5ATPt8",
  "tags": []
}