{
  "name": "Supabase-plugin",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "4b643ef8-228a-4860-952c-bc297161cdb0",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -624,
        0
      ],
      "id": "72eed22e-f6eb-472e-8778-bfaf39c0ba74",
      "name": "Webhook"
    },
    {
      "parameters": {
        "url": "https://api.getresponse.com/v3/contacts",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "query[email]",
              "value": "={{ $json.body.data.member.email }}"
            },
            {
              "name": "limit",
              "value": "1"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Auth-Token",
              "value": "api-key omls8xh5bwjsa01zch9yjy4yfb465fb3"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {}
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        32,
        0
      ],
      "id": "56c51212-b399-4e39-a4bd-bba6f101c820",
      "name": "HTTP Request",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "operation": "update",
        "contactId": "={{ $json.contactId }}",
        "updateFields": {
          "tags": [
            "pmC6T"
          ]
        }
      },
      "type": "n8n-nodes-base.getResponse",
      "typeVersion": 1,
      "position": [
        576,
        -112
      ],
      "id": "c6a92451-ee01-4060-b432-f084ae40ad4e",
      "name": "Update a contact",
      "credentials": {
        "getResponseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "email": "={{ $('Webhook').item.json.body.data.member.email }}",
        "campaignId": "GDPGC",
        "additionalFields": {
          "tags": [
            "pmC6T"
          ]
        }
      },
      "type": "n8n-nodes-base.getResponse",
      "typeVersion": 1,
      "position": [
        640,
        192
      ],
      "id": "f98a591f-6299-4fac-a4cc-e1bf2de4746b",
      "name": "Create a contact",
      "credentials": {
        "getResponseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c2abc441-076e-4e66-b768-40d44c6c0b7e",
              "leftValue": "={{ $json.contactId }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        272,
        208
      ],
      "id": "38dca840-3f47-4be8-b4a2-39d82cc710dc",
      "name": "\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c2abc441-076e-4e66-b768-40d44c6c0b7e",
              "leftValue": "={{ $json.contactId }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        272,
        -96
      ],
      "id": "484c4cf2-8166-4ad2-befd-ede8f7ff4a1b",
      "name": "\u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0430\u043a\u0442"
    },
    {
      "parameters": {
        "url": "https://api.getresponse.com/v3/contacts",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "query[email]",
              "value": "={{ $json.body.data.member.email }}"
            },
            {
              "name": "limit",
              "value": "1"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Auth-Token",
              "value": "api-key omls8xh5bwjsa01zch9yjy4yfb465fb3"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {}
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        16,
        -608
      ],
      "id": "d589e7c2-4553-4ab2-8f8f-8871093c63b0",
      "name": "HTTP Request1",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "operation": "update",
        "contactId": "={{ $json.contactId }}",
        "updateFields": {
          "campaignId": "CXmyi",
          "tags": [
            "TN6JI"
          ]
        }
      },
      "type": "n8n-nodes-base.getResponse",
      "typeVersion": 1,
      "position": [
        560,
        -720
      ],
      "id": "0de588f7-48c5-4f19-87e4-1c64955735be",
      "name": "Update a contact1",
      "credentials": {
        "getResponseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "email": "={{ $('Webhook').item.json.body.data.member.email }}",
        "campaignId": "CXmyi",
        "additionalFields": {
          "tags": [
            "TN6JI"
          ]
        }
      },
      "type": "n8n-nodes-base.getResponse",
      "typeVersion": 1,
      "position": [
        560,
        -416
      ],
      "id": "300e6eef-aaef-485b-be7c-f62370da047f",
      "name": "Create a contact1",
      "credentials": {
        "getResponseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c2abc441-076e-4e66-b768-40d44c6c0b7e",
              "leftValue": "={{ $json.contactId }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        256,
        -704
      ],
      "id": "74005183-6885-49bd-9247-46584e2c9fc3",
      "name": "\u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0430\u043a\u04421"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c2abc441-076e-4e66-b768-40d44c6c0b7e",
              "leftValue": "={{ $json.body.data.membership.id }}",
              "rightValue": 157990,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -320,
        -384
      ],
      "id": "816529c6-7a72-4d5a-a89b-c2f056831e69",
      "name": "157990 Vibe"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c2abc441-076e-4e66-b768-40d44c6c0b7e",
              "leftValue": "={{ $json.contactId }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        256,
        -400
      ],
      "id": "e62c0959-8b88-430c-bb69-54dfdbd23770",
      "name": "\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u04302"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c2abc441-076e-4e66-b768-40d44c6c0b7e",
              "leftValue": "={{ $json.body.data.membership.id }}",
              "rightValue": 143102,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -304,
        16
      ],
      "id": "a1611684-2978-4738-ae8f-3380fdf568d3",
      "name": "143102 chatGPT"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "157990 Vibe",
            "type": "main",
            "index": 0
          },
          {
            "node": "143102 chatGPT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "\u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0430\u043a\u0442",
            "type": "main",
            "index": 0
          },
          {
            "node": "\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a contact": {
      "main": [
        []
      ]
    },
    "\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430": {
      "main": [
        [
          {
            "node": "Create a contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0430\u043a\u0442": {
      "main": [
        [
          {
            "node": "Update a contact",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "\u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0430\u043a\u04421",
            "type": "main",
            "index": 0
          },
          {
            "node": "\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u04302",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0430\u043a\u04421": {
      "main": [
        [
          {
            "node": "Update a contact1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u041d\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u04302": {
      "main": [
        [
          {
            "node": "Create a contact1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "157990 Vibe": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "143102 chatGPT": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "9029f3f9-471d-4a87-956c-b1a1ef24981c",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "0fjM4yphIjNNpu8M",
  "tags": []
}