{
  "name": "ezgpt-http-request-json-demo",
  "active": false,
  "nodes": [
    {
      "id": "8269c225-ef4d-4e00-b775-8ffa6169abde",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "c580e282-3a0f-401a-82e5-7b278bac0b63",
      "name": "Get Demo Post",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        260,
        0
      ],
      "parameters": {
        "url": "https://jsonplaceholder.typicode.com/posts/1",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "json"
            }
          },
          "timeout": 15000
        }
      }
    },
    {
      "id": "4ae5a707-b57d-4113-8a91-8bebca40713f",
      "name": "Check Post",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        520,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "c25ed7df-05cf-4571-abef-3dcf9382b917",
              "leftValue": "={{ $json.statusCode === 200 && $json.body?.id === 1 && $json.body?.userId === 1 && typeof $json.body?.title === 'string' && $json.body.title.trim().length > 0 && typeof $json.body?.body === 'string' && $json.body.body.trim().length > 0 }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "c4bb0bb1-43d1-4d89-b17a-305e3389034c",
      "name": "Build Result",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        780,
        -120
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "6e5543d9-0b6d-43ea-9264-a7f6c88e6e84",
              "name": "status",
              "value": "checked",
              "type": "string"
            },
            {
              "id": "0c42f7c7-3241-469d-af67-b2ac80f5865d",
              "name": "post_id",
              "value": "={{ $json.body.id }}",
              "type": "number"
            },
            {
              "id": "e202c583-a5ae-46ee-83bb-f47015919e35",
              "name": "title",
              "value": "={{ $json.body.title }}",
              "type": "string"
            },
            {
              "id": "662cbb48-1aba-44d3-bdd5-389c26be1b09",
              "name": "body_length",
              "value": "={{ $json.body.body.length }}",
              "type": "number"
            }
          ]
        },
        "includeOtherFields": false,
        "options": {}
      }
    },
    {
      "id": "449ced4c-141c-4d1a-b5df-168cfb2591ac",
      "name": "Reject Response",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        780,
        140
      ],
      "parameters": {
        "errorMessage": "Unexpected demo response: expected HTTP 200, post 1, user 1, nonempty title and body"
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Demo Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Demo Post": {
      "main": [
        [
          {
            "node": "Check Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Post": {
      "main": [
        [
          {
            "node": "Build Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reject Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
