{
  "name": "Jira to SeaTable",
  "nodes": [
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "ReporterCombines",
              "value": "={{ $json[\"fields\"][\"reporter\"][\"displayName\"] }} - ({{ $json[\"fields\"][\"reporter\"][\"emailAddress\"] }})"
            },
            {
              "name": "CreatorCombined",
              "value": "={{ $json[\"fields\"][\"creator\"][\"displayName\"] }} - ({{ $json[\"fields\"][\"creator\"][\"emailAddress\"] }})"
            },
            {
              "name": "PriorityCombined",
              "value": "={{ $json[\"fields\"][\"priority\"][\"id\"] }} - {{ $json[\"fields\"][\"priority\"][\"name\"] }}"
            }
          ]
        },
        "options": {}
      },
      "id": "1fe40325-5f8a-42f6-9ea8-e0b88150da35",
      "name": "Modify values",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1400,
        40
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "id": "2023d90d-b907-4fd2-82fa-f6d8cf7f54fb",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        680,
        -200
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "tableName": "Issues",
        "filters": {},
        "options": {}
      },
      "id": "a9f533b1-12fa-4beb-aa36-cf2b79aaf3a7",
      "name": "SeaTable",
      "type": "n8n-nodes-base.seaTable",
      "typeVersion": 1,
      "position": [
        1160,
        -200
      ],
      "credentials": {
        "seaTableApi": {
          "id": "10",
          "name": "SeaTable account 2"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "options": {
          "jql": "={{ $json[\"Value\"] }}"
        }
      },
      "id": "03e068f3-3eb9-4fcc-878d-0604f8b8d26b",
      "name": "Jira",
      "type": "n8n-nodes-base.jira",
      "typeVersion": 1,
      "position": [
        1160,
        40
      ],
      "credentials": {
        "jiraSoftwareCloudApi": {
          "id": "9",
          "name": "Jira SW Cloud account"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "mergeByFields": {
          "values": [
            {
              "field1": "=Key",
              "field2": "=key"
            }
          ]
        },
        "joinMode": "keepNonMatches",
        "outputDataFrom": "input2",
        "options": {}
      },
      "id": "186fbf18-c1ed-479c-bfd3-09b611dd75fe",
      "name": "New issues",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 2,
      "position": [
        1660,
        40
      ]
    },
    {
      "parameters": {
        "mode": "combine",
        "mergeByFields": {
          "values": [
            {
              "field1": "=Key",
              "field2": "=key"
            }
          ]
        },
        "joinMode": "enrichInput1",
        "options": {
          "multipleMatches": "first"
        }
      },
      "id": "58ba640f-de58-48b2-98f4-f00520d214e1",
      "name": "Updated issues",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 2,
      "position": [
        1660,
        -200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"key\"] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "id": "b7df64ff-e482-4016-833e-484418a7e416",
      "name": "Key not empty",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1900,
        -200
      ]
    },
    {
      "parameters": {
        "tableName": "Issues",
        "columnsUi": {
          "columnValues": [
            {
              "columnName": "Summary",
              "columnValue": "={{ $json[\"fields\"][\"summary\"] }}"
            },
            {
              "columnName": "Issue type",
              "columnValue": "={{ $json[\"fields\"][\"issuetype\"][\"name\"] }}"
            },
            {
              "columnName": "Description",
              "columnValue": "={{ $json[\"fields\"][\"description\"] }}"
            },
            {
              "columnName": "Priority",
              "columnValue": "={{ $node[\"Modify values\"].json[\"PriorityCombined\"] }}"
            },
            {
              "columnName": "Status",
              "columnValue": "={{ $json[\"fields\"][\"status\"][\"name\"] }}"
            },
            {
              "columnName": "Key",
              "columnValue": "={{ $json[\"key\"] }}"
            }
          ]
        }
      },
      "id": "e4a868ab-821d-47a6-89b6-3478e1e3e6f8",
      "name": "Add new issues",
      "type": "n8n-nodes-base.seaTable",
      "typeVersion": 1,
      "position": [
        1900,
        40
      ],
      "credentials": {
        "seaTableApi": {
          "id": "10",
          "name": "SeaTable account 2"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"Summary\"] }}",
              "operation": "notEqual",
              "value2": "={{ $json[\"fields\"][\"summary\"] }}"
            },
            {
              "value1": "={{ $json[\"Issue type\"] }}",
              "operation": "notEqual",
              "value2": "={{ $json[\"fields\"][\"issuetype\"][\"name\"] }}"
            },
            {
              "value1": "={{ $json[\"Priority\"] }}",
              "operation": "notEqual",
              "value2": "={{ $node[\"Modify values\"].json[\"PriorityCombined\"] }}"
            },
            {
              "value1": "={{ $json[\"Status\"] }}",
              "operation": "notEqual",
              "value2": "={{ $json[\"fields\"][\"status\"][\"name\"] }}"
            },
            {
              "value1": "={{ $json[\"Description\"] }}",
              "operation": "notEqual",
              "value2": "={{ $json[\"fields\"][\"description\"] }}"
            }
          ]
        },
        "combineOperation": "any"
      },
      "id": "48559531-f849-4b02-a35b-5db427399d59",
      "name": "If any field is different",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        2160,
        -200
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "tableName": "Issues",
        "rowId": "={{ $json[\"_id\"] }}",
        "columnsUi": {
          "columnValues": [
            {
              "columnName": "Summary",
              "columnValue": "={{ $json[\"fields\"][\"summary\"] }}"
            },
            {
              "columnName": "Issue type",
              "columnValue": "={{ $json[\"fields\"][\"issuetype\"][\"name\"] }}"
            },
            {
              "columnName": "Description",
              "columnValue": "={{ $json[\"fields\"][\"description\"] }}"
            },
            {
              "columnName": "Priority",
              "columnValue": "={{ $node[\"Modify values\"].json[\"PriorityCombined\"] }}"
            },
            {
              "columnName": "Status",
              "columnValue": "={{ $json[\"fields\"][\"status\"][\"name\"] }}"
            }
          ]
        }
      },
      "id": "1b6ac6f8-cb56-485c-ae45-01f87f5d58f4",
      "name": "Update issues",
      "type": "n8n-nodes-base.seaTable",
      "typeVersion": 1,
      "position": [
        2420,
        -200
      ],
      "credentials": {
        "seaTableApi": {
          "id": "10",
          "name": "SeaTable account 2"
        }
      }
    },
    {
      "parameters": {
        "events": [
          "*"
        ],
        "additionalFields": {}
      },
      "id": "099ca301-10e4-4511-9b16-be86c4ba815f",
      "name": "Jira Trigger",
      "type": "n8n-nodes-base.jiraTrigger",
      "typeVersion": 1,
      "position": [
        920,
        -420
      ],
      "webhookId": "0237a89f-ffb9-4cf0-82b5-12aa1b38ffa9",
      "credentials": {
        "jiraSoftwareCloudApi": {
          "id": "9",
          "name": "Jira SW Cloud account"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "tableName": "Settings",
        "filters": {},
        "options": {}
      },
      "id": "090f8a89-6f83-403e-aea7-dddaaf93fffd",
      "name": "GetSettings",
      "type": "n8n-nodes-base.seaTable",
      "typeVersion": 1,
      "position": [
        680,
        40
      ],
      "credentials": {
        "seaTableApi": {
          "id": "10",
          "name": "SeaTable account 2"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"Key\"] }}",
              "value2": "searchJql"
            }
          ]
        }
      },
      "id": "759293dc-b38d-4c2e-a9a2-8bb46982c130",
      "name": "GetSearchJql",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        920,
        40
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Modify values": {
      "main": [
        [
          {
            "node": "New issues",
            "type": "main",
            "index": 1
          },
          {
            "node": "Updated issues",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "SeaTable",
            "type": "main",
            "index": 0
          },
          {
            "node": "GetSettings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SeaTable": {
      "main": [
        [
          {
            "node": "Updated issues",
            "type": "main",
            "index": 0
          },
          {
            "node": "New issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jira": {
      "main": [
        [
          {
            "node": "Modify values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New issues": {
      "main": [
        [
          {
            "node": "Add new issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Updated issues": {
      "main": [
        [
          {
            "node": "Key not empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Key not empty": {
      "main": [
        [
          {
            "node": "If any field is different",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If any field is different": {
      "main": [
        [
          {
            "node": "Update issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jira Trigger": {
      "main": [
        [
          {
            "node": "SeaTable",
            "type": "main",
            "index": 0
          },
          {
            "node": "Jira",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetSettings": {
      "main": [
        [
          {
            "node": "GetSearchJql",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetSearchJql": {
      "main": [
        [
          {
            "node": "Jira",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "callerPolicy": "any"
  },
  "id": 8,
  "meta": {
    "instanceId": "da63d734f8c6cfb6ef1810a6441768079f935b40c2897864fa2c3c13a5cc7431"
  },
  "tags": []
}