{
  "version": "1.0.0",
  "exported_at": "2025-08-22T00:17:42.544377100+00:00",
  "project": {
    "name": "Playstore Reviews",
    "description": null,
    "color": "bg-gray-500",
    "template_id": null
  },
  "blocks": [
    {
      "block_id": "navigate-1755815135892",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 429.5,
      "position_y": 199.5,
      "config": {
        "color": "bg-purple-500",
        "url": "https://example.com"
      }
    },
    {
      "block_id": "click-1755815160323",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 1146.5,
      "position_y": 37.5,
      "config": {
        "color": "bg-orange-500",
        "selector": "//span[text()=\"See all reviews\"]",
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-1755815164618",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 754.5,
      "position_y": 201.5,
      "config": {
        "color": "bg-yellow-500",
        "duration": 10
      }
    },
    {
      "block_id": "structured-export-1755815278056",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1476.5,
      "position_y": 193.5,
      "config": {
        "color": "bg-gray-500",
        "fileName": "playstore-reviews.csv",
        "columns": [
          {
            "name": "ID",
            "selector": "ROW?.querySelector('header[data-review-id]')?.getAttribute('data-review-id') || ''",
            "attribute": "data-*",
            "isJs": true
          },
          {
            "name": "USER",
            "selector": "div.X5PpBb",
            "attribute": "text"
          },
          {
            "name": "RATING",
            "selector": "document.querySelector('div[role=\"img\"][aria-label*=\"Rated\"]').getAttribute('aria-label').match(/Rated (\\d+)/)[1]",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "DATE",
            "selector": "span.bp9Aid",
            "attribute": "text"
          },
          {
            "name": "REVIEW",
            "selector": "div.h3YV2d",
            "attribute": "text"
          }
        ],
        "rowSelector": ".RHo1pe",
        "saveLocation": "",
        "includeHeaders": true,
        "fileMode": "append"
      }
    },
    {
      "block_id": "sleep-1755815516877",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1231.5,
      "position_y": 392.5,
      "config": {
        "color": "bg-yellow-500",
        "duration": 10
      }
    },
    {
      "block_id": "inject-javascript-1755815844882",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript code",
      "position_x": 1778.5,
      "position_y": 389.5,
      "config": {
        "color": "bg-pink-500",
        "jsCode": "// Get all elements with .RHo1pe class\nconst reviewElements = document.querySelectorAll('.RHo1pe');\n\nif (reviewElements.length > 0) {\n    reviewElements.forEach(element => {\n        element.classList.remove('RHo1pe');\n        element.classList.add('review-hidden');\n        element.classList.add('ep1oHR'); // Also add reversed version\n        element.setAttribute('data-original-class', 'RHo1pe'); // Keep track of original\n    });\n    \n    console.log(`✅ Modified ${reviewElements.length} elements:`);\n    console.log('   - Removed: .RHo1pe');\n    console.log('   - Added: .review-hidden .ep1oHR');\n    console.log('   - Added data-original-class attribute');\n} else {\n    console.log('❌ No elements with .RHo1pe class found');\n}",
        "waitForCompletion": true,
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-1755816100944",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2462.5,
      "position_y": 381.5,
      "config": {
        "color": "bg-yellow-500",
        "duration": 8
      }
    },
    {
      "block_id": "element-exists-1755816145144",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1925.5,
      "position_y": -13.5,
      "config": {
        "color": "bg-pink-500",
        "selector": ".RHo1pe"
      }
    },
    {
      "block_id": "end-1755816178477",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 2424.5,
      "position_y": -15.5,
      "config": {
        "color": "bg-red-500"
      }
    },
    {
      "block_id": "scroll-1755817084386",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll page or element",
      "position_x": 905.9861111111112,
      "position_y": 437.2916666666666,
      "config": {
        "color": "bg-orange-500",
        "selector": "//span[text()=\"See all reviews\"]"
      }
    },
    {
      "block_id": "inject-javascript-1755818743961",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript code",
      "position_x": 2140.986111111111,
      "position_y": 312.0416666666666,
      "config": {
        "color": "bg-gray-500",
        "jsCode": "const targetElement = document.querySelector('div[jscontroller=\"SOuOGb\"].odk6He');\n\nif (targetElement) {\n    targetElement.setAttribute('tabindex', '-1');\n    targetElement.scrollIntoView({ \n        behavior: 'smooth', \n        block: 'center' \n    });\n    \n    setTimeout(() => {\n        targetElement.focus();\n        console.log('✅ Focused on element');\n        \n        // Simple auto-scroll to bottom\n        autoScrollToBottom();\n    }, 500);\n} else {\n    console.log('❌ Element not found');\n}\n\nfunction autoScrollToBottom() {\n    const modalScrollArea = document.querySelector('div[jscontroller=\"SOuOGb\"].odk6He');\n    \n    let scrollInterval = setInterval(() => {\n        const currentScroll = modalScrollArea.scrollTop;\n        const maxScroll = modalScrollArea.scrollHeight - modalScrollArea.clientHeight;\n        const reviewCount = document.querySelectorAll('div[role=\"dialog\"] .ep1oHR').length; // Changed from .RHo1pe to .ep1oHR\n        \n        console.log(`📜 Scrolling... Position: ${currentScroll}/${maxScroll}, Reviews: ${reviewCount}`);\n        \n        // Check if we've reached the bottom\n        if (currentScroll >= maxScroll - 20) {\n            clearInterval(scrollInterval);\n            console.log('✅ Reached bottom');\n            console.log(`📊 Total reviews loaded: ${reviewCount}`);\n            \n            // Final scroll to last review\n            const lastReview = document.querySelector('div[role=\"dialog\"] .ep1oHR:last-child'); // Changed from .RHo1pe to .ep1oHR\n            if (lastReview) {\n                lastReview.scrollIntoView({ behavior: 'smooth', block: 'center' });\n                console.log('🎯 Scrolled to last review');\n            }\n            return;\n        }\n        \n        // Scroll down\n        modalScrollArea.scrollTop += 300;\n        \n    }, 1000);\n    \n    // Safety stop after 2 minutes\n    setTimeout(() => {\n        clearInterval(scrollInterval);\n        console.log('🛑 Auto-scroll stopped (timeout)');\n    }, 120000);\n}",
        "waitForCompletion": true,
        "timeout": 10
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "navigate-1755815135892",
      "from_connector_id": "right",
      "to_block_id": "sleep-1755815164618",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1755815160323",
      "from_connector_id": "right",
      "to_block_id": "sleep-1755815516877",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1755815516877",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1755815278056",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1755816145144",
      "from_connector_id": "true",
      "to_block_id": "structured-export-1755815278056",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1755816145144",
      "from_connector_id": "false",
      "to_block_id": "end-1755816178477",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1755815164618",
      "from_connector_id": "right",
      "to_block_id": "scroll-1755817084386",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-1755817084386",
      "from_connector_id": "right",
      "to_block_id": "click-1755815160323",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1755816100944",
      "from_connector_id": "right",
      "to_block_id": "element-exists-1755816145144",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1755815278056",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-1755815844882",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-1755815844882",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-1755818743961",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-1755818743961",
      "from_connector_id": "right",
      "to_block_id": "sleep-1755816100944",
      "to_connector_id": "left"
    }
  ]
}