{
  "name": "Auto-block focus time in Google Calendar on busy days",
  "nodes": [
    {
      "id": "965166ee-bf7e-48e6-b559-624c4a5bb72f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -880,
        96
      ]
    },
    {
      "id": "af8970e0-6d2c-48d4-907b-5e022ab8d5ac",
      "name": "Get Full Week Events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -656,
        96
      ]
    },
    {
      "id": "76c503e8-926f-4254-be1b-f2c5b55938e8",
      "name": "Calculate Full Week Focus Time Slots",
      "type": "n8n-nodes-base.code",
      "position": [
        -448,
        96
      ]
    },
    {
      "id": "a6d17dd6-3aea-4860-b3c1-cd95d8e6a78c",
      "name": "Should Create Focus Time?",
      "type": "n8n-nodes-base.if",
      "position": [
        -224,
        96
      ]
    },
    {
      "id": "49a4675b-2a0f-4219-9500-aa1803fd794b",
      "name": "Split Free Slots",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "a7191014-8661-41c2-b121-7f7f924c895e",
      "name": "Create Focus Time Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        224,
        0
      ]
    },
    {
      "id": "019babfa-6ac8-4028-951c-0cb776ef24cd",
      "name": "Log Results",
      "type": "n8n-nodes-base.code",
      "position": [
        448,
        0
      ]
    },
    {
      "id": "7ecbdb56-9195-4d13-891b-e307d10417f5",
      "name": "Log No Focus Time Needed",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        208
      ]
    },
    {
      "id": "5a76f16a-5931-45d8-8319-440b39491a65",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -80
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "Set the schedule time the workflow would run (recommend to set at a time before user's work day starts). "
      }
    },
    {
      "id": "f9e74c3f-ab4e-4e70-bddc-08f4903dc6f5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        -80
      ],
      "parameters": {
        "width": 592,
        "height": 400,
        "content": "Workflow checks user's calendar from Sunday to Saturday of current week. Goal of this part is to determine if a day has 6 or more hours booked already\n\nNote: Update the credentials used in the \"Get Fu"
      }
    },
    {
      "id": "8ac0657c-c682-414e-b56e-884f517bcda2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -176
      ],
      "parameters": {
        "width": 704,
        "height": 544,
        "content": "For days with 6 or more hours already booked, the workflow automatically blocks out the remaining hours for dedicated focus time. The workflows assumes an 8 hour work week. For example, if Monday has "
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Full Week Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Free Slots": {
      "main": [
        [
          {
            "node": "Create Focus Time Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Full Week Events": {
      "main": [
        [
          {
            "node": "Calculate Full Week Focus Time Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Focus Time Event": {
      "main": [
        [
          {
            "node": "Log Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Should Create Focus Time?": {
      "main": [
        [
          {
            "node": "Split Free Slots",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log No Focus Time Needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Full Week Focus Time Slots": {
      "main": [
        [
          {
            "node": "Should Create Focus Time?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}