{
  "nodes": [
    {
      "id": "d88aec02-9955-4442-a55f-47db17d73c9b",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -256,
        304
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "87ceaa17-c596-4c9a-b7fc-df2c02a85cce",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        80,
        720
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "f61d2bf5-9ce2-4f8b-ac49-0cff0c710045",
      "name": "GitHub Search HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        16,
        304
      ],
      "parameters": {
        "url": "https://api.github.com/search/issues",
        "options": {
          "pagination": {
            "pagination": {
              "parameters": {
                "parameters": [
                  {
                    "name": "page",
                    "value": "={{ $pageCount + 1 }}"
                  }
                ]
              },
              "completeExpression": "={{ $response.body.items.length < 100 }}",
              "paginationCompleteWhen": "other"
            }
          }
        },
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "is:issue label:\"\ud83d\udc8e Bounty\" state:open"
            },
            {
              "name": "per_page",
              "value": "100"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f72dad12-8b5a-4c19-9e96-0369bb59f1dc",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "notes": "This splits out results of the 'GitHub Search HTTP Request' node into individual items so operation can be performed on each item, instead of having a list of all items",
      "position": [
        240,
        304
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "items"
      },
      "typeVersion": 1
    },
    {
      "id": "4a3ff3fd-93f3-4ef1-9d08-371bbe9aca79",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "notes": "Merge all data from 'GitHub Search HTTP Request' node with 'Get row(s) in sheet' node results in order to filter out recent ones not found in the Google Spreadsheet doc",
      "position": [
        528,
        320
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "joinMode": "keepNonMatches",
        "mergeByFields": {
          "values": [
            {
              "field1": "html_url",
              "field2": "Issue URL"
            }
          ]
        },
        "outputDataFrom": "input1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "47672a86-2826-4007-86dd-2ff9e5f38529",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "notes": "Filter out data not found in the Google Spreadsheet but is found in GitHub Search HTTP Request node results",
      "position": [
        752,
        320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f84a90c2-eaad-4639-aca2-582068d58f71",
              "operator": {
                "type": "array",
                "operation": "notContains",
                "rightType": "any"
              },
              "leftValue": "={{ $('Get row(s) in sheet').all().map(item => item.json['Issue Name']) }}",
              "rightValue": "={{ $json.title }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "04f3c770-187c-4de6-9bcb-39b56946fb1f",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Add data not found in 'Get row(s) in sheet' node but found in 'GitHub Search HTTP Request' node result",
      "position": [
        992,
        320
      ],
      "parameters": {
        "columns": {
          "value": {
            "Issue URL": "={{ $('Filter').item.json.html_url }}",
            "Issue Name": "={{ $('Filter').item.json.title }}",
            "Issue state": "={{ $('Filter').item.json.state }}",
            "Issue Number": "={{ $('Filter').item.json.number }}",
            "Issue Repo URL": "={{ $('Filter').item.json.repository_url.replace('https://api.github.com/repos', 'https://github.com') }}",
            "Issue Updated Date": "={{ $('Filter').item.json.updated_at }}",
            "Issue Creation Date": "={{ $('Filter').item.json.created_at }}"
          },
          "schema": [
            {
              "id": "Issue Number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue state",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue state",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Repo URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue Repo URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Creation Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue Creation Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Updated Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue Updated Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rSTq5uhAdMNmfDTfACHZ10tYkqh8eBkOgXuYFKBsc78/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "ff7c1a81-ca00-48d6-b02b-4815c9dd1452",
      "name": "Send message",
      "type": "n8n-nodes-base.whatsApp",
      "disabled": true,
      "position": [
        1456,
        320
      ],
      "parameters": {
        "textBody": "=New Bounty Alert!\nIssue: {{ $('Split Out').item.json.title }}\nNumber: #{{ $('Split Out').item.json.number }}\nStatus: {{ $('Split Out').item.json.state }}\nCreated: {{ $json.created_at }}\nRepository: {{ $('Split Out').item.json.repository_url }}\nView it here: {{ $('Split Out').item.json.html_url }}",
        "operation": "send",
        "phoneNumberId": "763560806846407",
        "additionalFields": {},
        "recipientPhoneNumber": "+1234567890"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "60441549-f604-4d40-9f9f-20d1c8490800",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1888,
        320
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "={{ $json.html }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "New Bounty Alert!"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 2.1
    },
    {
      "id": "e71ab937-246a-4486-b624-9cb9bb429275",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        1664,
        320
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <style>\n    body {\n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n      background-color: #f6f8fa;\n      padding: 20px;\n    }\n    .container {\n      max-width: 600px;\n      margin: 0 auto;\n      background-color: #ffffff;\n      border-radius: 6px;\n      border: 1px solid #e1e4e8;\n      box-shadow: 0 1px 3px rgba(27,31,35,.04);\n      padding: 24px;\n    }\n    .header {\n      border-bottom: 1px solid #e1e4e8;\n      padding-bottom: 16px;\n      margin-bottom: 16px;\n    }\n    .header h1 {\n      color: #0366d6;\n      font-size: 24px;\n      margin: 0;\n    }\n    .issue-title {\n      font-size: 18px;\n      font-weight: 600;\n      color: #24292e;\n      margin-bottom: 8px;\n    }\n    .detail-row {\n      font-size: 14px;\n      margin-bottom: 8px;\n    }\n    .label {\n      font-weight: 600;\n      color: #586069;\n    }\n    .status-open {\n      color: #2cbe4e;\n    }\n    .status-closed {\n      color: #cb2431;\n    }\n    .link-button {\n      display: inline-block;\n      padding: 10px 16px;\n      margin-top: 16px;\n      font-size: 14px;\n      font-weight: 600;\n      color: #ffffff;\n      background-color: #0366d6;\n      border-radius: 4px;\n      text-decoration: none;\n    }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>New GitHub Bounty Issue Alert!</h1>\n    </div>\n    \n    <p class=\"issue-title\">Issue: {{ $('Filter').item.json.title }}</p>\n    \n    <div class=\"detail-row\">\n      <span class=\"label\">Number:</span> #{{ $('Filter').item.json.number }}\n    </div>\n    <div class=\"detail-row\">\n      <span class=\"label\">Status:</span> <span class=\"{{ $json.state === 'open' ? 'status-open' : 'status-closed' }}\">{{ $('Filter').item.json.state }}</span>\n    </div>\n    <div class=\"detail-row\">\n      <span class=\"label\">Bounty Amount:{{ $('Filter').item.json.labels.find(label => label.name.includes('$'))?.name || 'No bounty specified' }} </span>\n    </div>\n        <div class=\"detail-row\">\n      <span class=\"label\">Comments on Issue:</span> {{ $('Filter').item.json.comments }}\n    </div>\n    <div class=\"detail-row\">\n      <span class=\"label\">Bounty Issue Created on:</span> {{ $('Filter').item.json.created_at }}\n    </div>\n    <div class=\"detail-row\">\n      <span class=\"label\">Repository:</span> <a href=\"{{ $('Filter').item.json.repository_url.replace('https://api.github.com/repos', 'https://github.com') }}\">{{ $('Filter').item.json.repository_url.split('/').pop() }}</a>\n    </div>\n    \n    <a href=\"{{ $('Filter').item.json.html_url }}\" class=\"link-button\">View Issue on GitHub</a>\n  </div>\n</body>\n</html>"
      },
      "typeVersion": 1.2
    },
    {
      "id": "1e114fe5-dc07-4918-ac82-78fa32b4d484",
      "name": "Filter1",
      "type": "n8n-nodes-base.filter",
      "position": [
        1200,
        320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6aba82f7-8d0c-4862-87cc-5e8e3b4cce8e",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ new Date($json['Issue Creation Date']).getTime() }}",
              "rightValue": "={{ new Date().getTime() - (5 * 24 * 60 * 60 * 1000) }}"
            },
            {
              "id": "19e79a04-9152-4261-b31d-62b46526d8df",
              "operator": {
                "type": "array",
                "operation": "notContains",
                "rightType": "any"
              },
              "leftValue": "={{ $('Get row(s) in sheet2').all().map(item => item.json['Issue URL']) }}",
              "rightValue": "={{ $json['Issue URL'] }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "697e1a3d-85fe-4842-8e3e-9459f0fc6612",
      "name": "Get row(s) in sheet2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1153061999,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=1153061999",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2e31b037-addd-493a-a256-f572c6785d6f",
      "name": "Append row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2064,
        320
      ],
      "parameters": {
        "columns": {
          "value": {
            "Issue URL": "={{ $('Filter1').item.json['Issue URL'] }}",
            "Issue Name": "={{ $('Filter1').item.json['Issue Name'] }}",
            "Issue state": "={{ $('Filter1').item.json['Issue state'] }}",
            "Issue Number": "={{ $('Filter1').item.json['Issue Number'] }}",
            "Bounty Amount": "={{ $('Filter').item.json.labels.find(label => label.name.includes('$'))?.name || 'No bounty specified' }}",
            "Issue Repo URL": "={{ $('Filter').item.json.repository_url.replace('https://api.github.com/repos', 'https://github.com') }}",
            "Number of Issue Comments": "={{ $('Filter').item.json.comments }}",
            "Issue Bounty Creation Date": "={{ $('Filter1').item.json['Issue Creation Date'] }}"
          },
          "schema": [
            {
              "id": "Issue Number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Number of Issue Comments",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Number of Issue Comments",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue state",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue state",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Repo URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Repo URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Bounty Creation Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Bounty Creation Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Bounty Amount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Bounty Amount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1153061999,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=1153061999",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e9aedc57-f573-462f-ac91-16797534b5ba",
      "name": "Get row(s) in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1504,
        928
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1153061999,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=1153061999",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "d07e43e6-8b2d-41d4-b395-ae2b572db7a5",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1264,
        1088
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f7ccca48-0af4-4dea-b9c1-0e097b99e708",
      "name": "GitHub Search HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1696,
        928
      ],
      "parameters": {
        "url": "={{ $json['Issue Repo URL'].replace('https://github.com/', 'https://api.github.com/repos/') + '/issues/' + $json['Issue Number'] }}",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "queryParameters": {
          "parameters": [
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/vnd.github+json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.2
    },
    {
      "id": "88559c0c-827a-4875-953a-f45208a1d2af",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2096,
        928
      ],
      "parameters": {
        "columns": {
          "value": {
            "row_number": "={{ $('Get row(s) in sheet1').item.json.row_number }}",
            "Issue state": "={{ $('GitHub Search HTTP Request1').item.json.state }}",
            "Number of Issue Comments": "={{ $('GitHub Search HTTP Request1').item.json.comments }}"
          },
          "schema": [
            {
              "id": "Issue Number",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Number of Issue Comments",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Number of Issue Comments",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue state",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue state",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Repo URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Repo URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Bounty Creation Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Bounty Creation Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Bounty Amount",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Bounty Amount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1153061999,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=1153061999",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "4c8af570-7c05-4630-8a28-75b69e755655",
      "name": "Filter2",
      "type": "n8n-nodes-base.filter",
      "position": [
        1888,
        928
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "d63efe45-fc1f-405e-896e-55a848492aa7",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.state }}",
              "rightValue": "={{ $('Get row(s) in sheet1').item.json['Issue state'] }}"
            },
            {
              "id": "7c85599e-1a40-4f4b-9b54-c2341bec3ba3",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $('Get row(s) in sheet1').item.json['Number of Issue Comments'] }}",
              "rightValue": "={{ $json.comments }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "51cf5ea7-8305-4f86-98bf-7adcd4b46110",
      "name": "Get row(s) in sheet3",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1488,
        1248
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "3e70d163-c24b-4efc-9577-75acd23e69d5",
      "name": "GitHub Search HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1696,
        1248
      ],
      "parameters": {
        "url": "={{ $json['Issue Repo URL'].replace('https://github.com/', 'https://api.github.com/repos/') + '/issues/' + $json['Issue Number'] }}",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "queryParameters": {
          "parameters": [
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/vnd.github+json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.2
    },
    {
      "id": "1fd9c5b7-e86c-4691-ab66-3610ef251deb",
      "name": "Update row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2096,
        1248
      ],
      "parameters": {
        "columns": {
          "value": {
            "row_number": "={{ $('Get row(s) in sheet3').item.json.row_number }}",
            "Issue state": "={{ $('GitHub Search HTTP Request2').item.json.state }}",
            "Issue Updated Date": "={{ $('GitHub Search HTTP Request2').item.json.updated_at }}"
          },
          "schema": [
            {
              "id": "Issue Number",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue state",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue state",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Repo URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Repo URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Creation Date",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Issue Creation Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Updated Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Issue Updated Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LoZk5q8DzKSCgsYF5UMEbEnIs09QZQ73k4MoOhhoKnI/edit?usp=drivesdk",
          "cachedResultName": "public-open-source-bounty"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "58f71599-9a6d-4333-a219-90f8049863a3",
      "name": "Filter3",
      "type": "n8n-nodes-base.filter",
      "position": [
        1888,
        1248
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "d63efe45-fc1f-405e-896e-55a848492aa7",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.state }}",
              "rightValue": "={{ $('Get row(s) in sheet3').item.json['Issue state'] }}"
            },
            {
              "id": "341603a8-808e-42db-a311-e572e031eb19",
              "operator": {
                "type": "dateTime",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.updated_at }}",
              "rightValue": "={{ $('Get row(s) in sheet3').item.json['Issue Updated Date'] }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "fb0e2868-6b8d-4420-a6b0-780ea049fe02",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        192
      ],
      "parameters": {
        "width": 384,
        "height": 352,
        "content": "## Fetch & Split Bounties\n- Fetches all open GitHub issues with bounty label\n- Pagination enabled (100 per page)\n- Split Out converts array into individual items"
      },
      "typeVersion": 1
    },
    {
      "id": "9d34238d-0ed2-4762-9497-aebcdf63b03b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        96
      ],
      "parameters": {
        "content": "## Main Workflow Trigger\nRuns every hour to check for new GitHub bounty issues with the '\ud83d\udc8e Bounty' label"
      },
      "typeVersion": 1
    },
    {
      "id": "b04d57bf-4438-4959-9217-2c3a9beebe7a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        80
      ],
      "parameters": {
        "content": "## Compare with Existing Data\nMerges GitHub results with Sheet1 to identify which bounties are already tracked"
      },
      "typeVersion": 1
    },
    {
      "id": "e2c2bacc-42c4-4ff0-970c-41ecb43c1996",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        80
      ],
      "parameters": {
        "content": "## Filter New Bounties Only\nKeeps only issues where title is NOT found in Sheet1's \"Issue Name\" column"
      },
      "typeVersion": 1
    },
    {
      "id": "36779d4d-9ae1-4e22-bcc8-b15d2707e747",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        80
      ],
      "parameters": {
        "width": 352,
        "height": 176,
        "content": "## Filter for Notifications\nAfter adding to Sheet1, checks if bounty should trigger notification:\n- Created within last 5 days\n- Not already sent (not in Sheet2)"
      },
      "typeVersion": 1
    },
    {
      "id": "c8f48c13-8555-46b2-8780-514b5dc79f74",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        96
      ],
      "parameters": {
        "content": "## Format Email Template\nConverts bounty data into styled HTML email with GitHub-themed design"
      },
      "typeVersion": 1
    },
    {
      "id": "5e321034-d3f9-411b-ae8b-1f562140889f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        928
      ],
      "parameters": {
        "content": "## Update Workflow Trigger\nRuns every 6 hours to update existing bounty statuses"
      },
      "typeVersion": 1
    },
    {
      "id": "c58e44e0-1631-40be-bde2-5314a3522f99",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        1408
      ],
      "parameters": {
        "width": 288,
        "content": "## Update Sheet2 Status\nFetches fresh data from GitHub API for each bounty in Sheet2 to detect changes"
      },
      "typeVersion": 1
    },
    {
      "id": "23b9875b-77f2-456e-8756-14e7a7411900",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        640
      ],
      "parameters": {
        "width": 176,
        "height": 272,
        "content": "## Detect Changes (Sheet2)\nUpdates only if:\n- Issue state changed (open/closed)\n- Comment count changed"
      },
      "typeVersion": 1
    },
    {
      "id": "976fbf52-7895-4588-a883-6674c497f0a0",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        752
      ],
      "parameters": {
        "width": 320,
        "content": "## Update Sheet1 Status\nChecks Sheet1 bounties for state or timestamp changes"
      },
      "typeVersion": 1
    },
    {
      "id": "9127139a-f58a-4ae4-8477-8932f40088cd",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        1392
      ],
      "parameters": {
        "width": 176,
        "height": 272,
        "content": "## Detect Changes (Sheet1)\nUpdates only if:\n- Issue state changed\n- Updated timestamp changed"
      },
      "typeVersion": 1
    },
    {
      "id": "43001701-8171-45ca-9275-e62455bd3b01",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        64
      ],
      "parameters": {
        "width": 224,
        "height": 208,
        "content": "## WhatsApp Notification (Disabled)\nCurrently using Gmail instead - enable if needed"
      },
      "typeVersion": 1
    },
    {
      "id": "a9bf6a49-e7c7-498f-81f4-b053eb25523f",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        560
      ],
      "parameters": {
        "width": 560,
        "height": 592,
        "content": "# GitHub Bounty Tracker\n\n## Two Workflows:\n1. **New Bounties** (hourly): Find & notify about new bounties\n2. **Status Updates** (6 hours): Update existing bounty states\n\n## Two Sheets:\n- **Sheet1**: All bounties (comprehensive list)\n- **Sheet2**: Recent bounties for notifications (5-day window)"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "HTML": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter2": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter3": {
      "main": [
        [
          {
            "node": "Update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Append row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "GitHub Search HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get row(s) in sheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get row(s) in sheet3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "GitHub Search HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet2": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet3": {
      "main": [
        [
          {
            "node": "GitHub Search HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub Search HTTP Request": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub Search HTTP Request1": {
      "main": [
        [
          {
            "node": "Filter2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub Search HTTP Request2": {
      "main": [
        [
          {
            "node": "Filter3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}