{
    "name": "AI Web Scraping - simple structured data extraction - Scenario 1",
    "flow": [
        {
            "id": 1,
            "module": "scrapingbee:extractData",
            "version": 1,
            "parameters": {
                "__IMTCONN__": 2893450
            },
            "mapper": {
                "url": "https://www.amazon.com/s?k=la+pavoni",
                "optParam": {
                    "device": "desktop",
                    "timeout": "140000",
                    "block_ads": false,
                    "js_scroll": false,
                    "render_js": true,
                    "window_width": "1920",
                    "custom_google": false,
                    "premium_proxy": false,
                    "stealth_proxy": false,
                    "window_height": "1080",
                    "js_scroll_wait": "1000",
                    "block_resources": true,
                    "js_scroll_count": "1",
                    "return_page_source": false,
                    "forward_headers_pure": false,
                    "transparent_status_code": false
                },
                "extract_rules": "{\n\"text\":\"body\"\n}"
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "headers": {
                            "mode": "chose"
                        },
                        "optParam": {
                            "nested": {
                                "block_ads": {
                                    "mode": "chose"
                                },
                                "js_scroll": {
                                    "mode": "chose"
                                },
                                "render_js": {
                                    "mode": "chose"
                                },
                                "custom_google": {
                                    "mode": "chose"
                                },
                                "premium_proxy": {
                                    "mode": "chose"
                                },
                                "stealth_proxy": {
                                    "mode": "chose"
                                },
                                "block_resources": {
                                    "mode": "chose"
                                },
                                "return_page_source": {
                                    "mode": "chose"
                                },
                                "forward_headers_pure": {
                                    "mode": "chose"
                                },
                                "transparent_status_code": {
                                    "mode": "chose"
                                }
                            }
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "scrapingbee"
                            },
                            "label": "My ScrapingBee connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:scrapingbee",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "url",
                        "type": "url",
                        "label": "URL",
                        "required": true
                    },
                    {
                        "name": "extract_rules",
                        "type": "text",
                        "label": "Extract Rules (JSON)",
                        "required": true
                    },
                    {
                        "name": "headers",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ],
                        "type": "array",
                        "label": "Headers"
                    },
                    {
                        "name": "optParam",
                        "spec": [
                            {
                                "name": "block_ads",
                                "type": "boolean",
                                "label": "Block Ads"
                            },
                            {
                                "name": "block_resources",
                                "type": "boolean",
                                "label": "Block Resources"
                            },
                            {
                                "name": "cookies",
                                "type": "text",
                                "label": "Cookies"
                            },
                            {
                                "name": "country_code",
                                "type": "text",
                                "label": "Country Code"
                            },
                            {
                                "name": "custom_google",
                                "type": "boolean",
                                "label": "Custom Google"
                            },
                            {
                                "name": "device",
                                "type": "text",
                                "label": "Device"
                            },
                            {
                                "name": "forward_headers_pure",
                                "type": "boolean",
                                "label": "Forward Headers Pure"
                            },
                            {
                                "name": "js_scenario",
                                "type": "text",
                                "label": "JS Scenario (JSON)"
                            },
                            {
                                "name": "js_scroll",
                                "type": "boolean",
                                "label": "JS Scroll"
                            },
                            {
                                "name": "js_scroll_count",
                                "type": "number",
                                "label": "JS Scroll Count"
                            },
                            {
                                "name": "js_scroll_wait",
                                "type": "number",
                                "label": "JS Scroll Wait"
                            },
                            {
                                "name": "js_snippet",
                                "type": "text",
                                "label": "JS Snippet"
                            },
                            {
                                "name": "own_proxy",
                                "type": "text",
                                "label": "Own proxy"
                            },
                            {
                                "name": "premium_proxy",
                                "type": "boolean",
                                "label": "Premium Proxy"
                            },
                            {
                                "name": "render_js",
                                "type": "boolean",
                                "label": "Render JS"
                            },
                            {
                                "name": "return_page_source",
                                "type": "boolean",
                                "label": "Return Page Source"
                            },
                            {
                                "name": "session_id",
                                "type": "number",
                                "label": "Session"
                            },
                            {
                                "name": "stealth_proxy",
                                "type": "boolean",
                                "label": "Stealth Proxy (beta)"
                            },
                            {
                                "name": "timeout",
                                "type": "number",
                                "label": "Timeout in milliseconds"
                            },
                            {
                                "name": "transparent_status_code",
                                "type": "boolean",
                                "label": "Transparent Status Code"
                            },
                            {
                                "name": "wait",
                                "type": "number",
                                "label": "Wait"
                            },
                            {
                                "name": "wait_for",
                                "type": "text",
                                "label": "Wait For"
                            },
                            {
                                "name": "window_height",
                                "type": "number",
                                "label": "Window Height"
                            },
                            {
                                "name": "window_width",
                                "type": "number",
                                "label": "Window Width"
                            }
                        ],
                        "type": "collection",
                        "label": "Optional parameters"
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "openai-gpt-3:CreateCompletion",
            "version": 1,
            "parameters": {
                "__IMTCONN__": 595757
            },
            "mapper": {
                "model": "gpt-4o",
                "top_p": "1",
                "select": "chat",
                "messages": [
                    {
                        "role": "system",
                        "content": "You are online researcher parsing online content"
                    },
                    {
                        "role": "user",
                        "content": "Process the website output below and extract prices of product, their brand name and description. Make sure to use JSON.\n\nUse following example\n[\n{\n\"brand\": \"Gaggia\",\n\"description\": \"Milano Espresso automatic machine\",\n\"price\": 399\n...\n}\n]"
                    },
                    {
                        "role": "user",
                        "content": "here is the website to parse:\n{{1.data.text}}"
                    }
                ],
                "max_tokens": "0",
                "temperature": "1",
                "n_completions": "1",
                "response_format": "json_object"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "stop": {
                            "mode": "chose"
                        },
                        "model": {
                            "mode": "chose",
                            "label": "gpt-4o (system)"
                        },
                        "select": {
                            "label": "Create a Chat Completion (GPT Models)"
                        },
                        "messages": {
                            "mode": "chose",
                            "items": [
                                {
                                    "role": {
                                        "mode": "chose",
                                        "label": "System"
                                    }
                                },
                                {
                                    "role": {
                                        "mode": "chose",
                                        "label": "User"
                                    }
                                },
                                {
                                    "role": {
                                        "mode": "chose",
                                        "label": "User"
                                    }
                                }
                            ]
                        },
                        "logit_bias": {
                            "mode": "chose"
                        },
                        "response_format": {
                            "mode": "chose",
                            "label": "JSON Object"
                        },
                        "additionalParameters": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "openai-gpt-3"
                            },
                            "label": "My OpenAI connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:openai-gpt-3",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "select",
                        "type": "select",
                        "label": "Select Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "chat",
                                "prompt"
                            ]
                        }
                    },
                    {
                        "name": "max_tokens",
                        "type": "number",
                        "label": "Max Tokens",
                        "required": true
                    },
                    {
                        "name": "temperature",
                        "type": "number",
                        "label": "Temperature",
                        "validate": {
                            "max": 2,
                            "min": 0
                        }
                    },
                    {
                        "name": "top_p",
                        "type": "number",
                        "label": "Top P",
                        "validate": {
                            "max": 1,
                            "min": 0
                        }
                    },
                    {
                        "name": "n_completions",
                        "type": "number",
                        "label": "Number"
                    },
                    {
                        "name": "frequency_penalty",
                        "type": "number",
                        "label": "Frequency Penalty",
                        "validate": {
                            "max": 2,
                            "min": -2
                        }
                    },
                    {
                        "name": "presence_penalty",
                        "type": "number",
                        "label": "Presence Penalty",
                        "validate": {
                            "max": 2,
                            "min": -2
                        }
                    },
                    {
                        "name": "logit_bias",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "token",
                                    "type": "text",
                                    "label": "Token ID",
                                    "required": true
                                },
                                {
                                    "name": "probability",
                                    "type": "number",
                                    "label": "Probability",
                                    "required": true,
                                    "validate": {
                                        "max": 100,
                                        "min": -100
                                    }
                                }
                            ],
                            "type": "collection",
                            "label": "Token Probability"
                        },
                        "type": "array",
                        "label": "Token Probability"
                    },
                    {
                        "name": "response_format",
                        "type": "select",
                        "label": "Response Format",
                        "validate": {
                            "enum": [
                                "text",
                                "json_object"
                            ]
                        }
                    },
                    {
                        "name": "seed",
                        "type": "integer",
                        "label": "Seed"
                    },
                    {
                        "name": "stop",
                        "spec": {
                            "name": "value",
                            "type": "text",
                            "label": "Stop Sequence"
                        },
                        "type": "array",
                        "label": "Stop Sequences",
                        "validate": {
                            "maxItems": 4
                        }
                    },
                    {
                        "name": "additionalParameters",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "key",
                                    "type": "text",
                                    "label": "Parameter Name",
                                    "required": true
                                },
                                {
                                    "name": "type",
                                    "type": "select",
                                    "label": "Input Type",
                                    "options": [
                                        {
                                            "label": "Text",
                                            "value": "text",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "text",
                                                    "label": "Parameter Value"
                                                }
                                            ],
                                            "default": true
                                        },
                                        {
                                            "label": "Number",
                                            "value": "number",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "number",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        },
                                        {
                                            "label": "Boolean",
                                            "value": "boolean",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "boolean",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        },
                                        {
                                            "label": "Date",
                                            "value": "date",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "date",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        },
                                        {
                                            "label": "Any",
                                            "value": "any",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "any",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "type": "collection",
                            "label": "Input Parameter"
                        },
                        "type": "array",
                        "label": "Other Input Parameters"
                    },
                    {
                        "name": "model",
                        "type": "select",
                        "label": "Model",
                        "required": true
                    },
                    {
                        "name": "messages",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "role",
                                    "type": "select",
                                    "label": "Role",
                                    "options": [
                                        {
                                            "label": "System",
                                            "value": "system"
                                        },
                                        {
                                            "label": "User",
                                            "value": "user"
                                        },
                                        {
                                            "label": "Assistant",
                                            "value": "assistant"
                                        }
                                    ],
                                    "required": true
                                },
                                {
                                    "name": "content",
                                    "type": "text",
                                    "label": "Message Content"
                                }
                            ],
                            "type": "collection",
                            "label": "Message"
                        },
                        "type": "array",
                        "label": "Messages",
                        "required": true
                    }
                ],
                "advanced": true
            }
        },
        {
            "id": 3,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": ""
            },
            "mapper": {
                "json": "{{2.choices[].message.content}}"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Choose a data structure"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 4,
            "module": "builtin:BasicFeeder",
            "version": 1,
            "parameters": {},
            "mapper": {
                "array": "{{3.products}}"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "array": {
                            "mode": "edit"
                        }
                    }
                },
                "expect": [
                    {
                        "mode": "edit",
                        "name": "array",
                        "spec": [],
                        "type": "array",
                        "label": "Array"
                    }
                ]
            }
        },
        {
            "id": 5,
            "module": "google-sheets:addRow",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 2995205
            },
            "mapper": {
                "from": "drive",
                "mode": "select",
                "values": {
                    "0": "{{4.brand}}",
                    "1": "{{4.description}}",
                    "2": "{{4.price}}"
                },
                "sheetId": "Sheet1",
                "spreadsheetId": "/1-8I8iAg3MLiv2ZkME8MCEuNJFcq64u49/1s__7zonBllheHepgZf8609-AEAjk9gxZ/1fEuE5Rx_5Pf_SJFqYU1xmCI4qgKRj7OVHd9tvkwyVCw",
                "includesHeaders": true,
                "insertDataOption": "INSERT_ROWS",
                "valueInputOption": "USER_ENTERED",
                "insertUnformatted": false
            },
            "metadata": {
                "designer": {
                    "x": 1200,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "from": {
                            "label": "My Drive"
                        },
                        "mode": {
                            "label": "Select by path"
                        },
                        "sheetId": {
                            "label": "Sheet1"
                        },
                        "spreadsheetId": {
                            "path": [
                                "Content",
                                "AI No Code Scraping",
                                "Coffee machine search"
                            ]
                        },
                        "includesHeaders": {
                            "label": "Yes",
                            "nested": [
                                {
                                    "name": "values",
                                    "spec": [
                                        {
                                            "name": "0",
                                            "type": "text",
                                            "label": "Brand (A)"
                                        },
                                        {
                                            "name": "1",
                                            "type": "text",
                                            "label": "Description (B)"
                                        },
                                        {
                                            "name": "2",
                                            "type": "text",
                                            "label": "Price (C)"
                                        },
                                        {
                                            "name": "3",
                                            "type": "text",
                                            "label": "(D)"
                                        },
                                        {
                                            "name": "4",
                                            "type": "text",
                                            "label": "(E)"
                                        },
                                        {
                                            "name": "5",
                                            "type": "text",
                                            "label": "(F)"
                                        },
                                        {
                                            "name": "6",
                                            "type": "text",
                                            "label": "(G)"
                                        },
                                        {
                                            "name": "7",
                                            "type": "text",
                                            "label": "(H)"
                                        },
                                        {
                                            "name": "8",
                                            "type": "text",
                                            "label": "(I)"
                                        },
                                        {
                                            "name": "9",
                                            "type": "text",
                                            "label": "(J)"
                                        },
                                        {
                                            "name": "10",
                                            "type": "text",
                                            "label": "(K)"
                                        },
                                        {
                                            "name": "11",
                                            "type": "text",
                                            "label": "(L)"
                                        },
                                        {
                                            "name": "12",
                                            "type": "text",
                                            "label": "(M)"
                                        },
                                        {
                                            "name": "13",
                                            "type": "text",
                                            "label": "(N)"
                                        },
                                        {
                                            "name": "14",
                                            "type": "text",
                                            "label": "(O)"
                                        },
                                        {
                                            "name": "15",
                                            "type": "text",
                                            "label": "(P)"
                                        },
                                        {
                                            "name": "16",
                                            "type": "text",
                                            "label": "(Q)"
                                        },
                                        {
                                            "name": "17",
                                            "type": "text",
                                            "label": "(R)"
                                        },
                                        {
                                            "name": "18",
                                            "type": "text",
                                            "label": "(S)"
                                        },
                                        {
                                            "name": "19",
                                            "type": "text",
                                            "label": "(T)"
                                        },
                                        {
                                            "name": "20",
                                            "type": "text",
                                            "label": "(U)"
                                        },
                                        {
                                            "name": "21",
                                            "type": "text",
                                            "label": "(V)"
                                        },
                                        {
                                            "name": "22",
                                            "type": "text",
                                            "label": "(W)"
                                        },
                                        {
                                            "name": "23",
                                            "type": "text",
                                            "label": "(X)"
                                        },
                                        {
                                            "name": "24",
                                            "type": "text",
                                            "label": "(Y)"
                                        },
                                        {
                                            "name": "25",
                                            "type": "text",
                                            "label": "(Z)"
                                        }
                                    ],
                                    "type": "collection",
                                    "label": "Values"
                                }
                            ]
                        },
                        "insertDataOption": {
                            "mode": "chose",
                            "label": "Insert rows"
                        },
                        "valueInputOption": {
                            "mode": "chose",
                            "label": "User entered"
                        },
                        "insertUnformatted": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "google"
                            },
                            "label": "Greg @ Business Automated "
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:google",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "mode",
                        "type": "select",
                        "label": "Choose a Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "select",
                                "fromAll",
                                "map"
                            ]
                        }
                    },
                    {
                        "name": "insertUnformatted",
                        "type": "boolean",
                        "label": "Unformatted",
                        "required": true
                    },
                    {
                        "name": "valueInputOption",
                        "type": "select",
                        "label": "Value input option",
                        "validate": {
                            "enum": [
                                "USER_ENTERED",
                                "RAW"
                            ]
                        }
                    },
                    {
                        "name": "insertDataOption",
                        "type": "select",
                        "label": "Insert data option",
                        "validate": {
                            "enum": [
                                "INSERT_ROWS",
                                "OVERWRITE"
                            ]
                        }
                    },
                    {
                        "name": "from",
                        "type": "select",
                        "label": "Choose a Drive",
                        "required": true,
                        "validate": {
                            "enum": [
                                "drive",
                                "share",
                                "team"
                            ]
                        }
                    },
                    {
                        "name": "spreadsheetId",
                        "type": "file",
                        "label": "Spreadsheet ID",
                        "required": true
                    },
                    {
                        "name": "sheetId",
                        "type": "select",
                        "label": "Sheet Name",
                        "required": true
                    },
                    {
                        "name": "includesHeaders",
                        "type": "select",
                        "label": "Table contains headers",
                        "required": true,
                        "validate": {
                            "enum": [
                                true,
                                false
                            ]
                        }
                    },
                    {
                        "name": "values",
                        "spec": [
                            {
                                "name": "0",
                                "type": "text",
                                "label": "Brand (A)"
                            },
                            {
                                "name": "1",
                                "type": "text",
                                "label": "Description (B)"
                            },
                            {
                                "name": "2",
                                "type": "text",
                                "label": "Price (C)"
                            },
                            {
                                "name": "3",
                                "type": "text",
                                "label": "(D)"
                            },
                            {
                                "name": "4",
                                "type": "text",
                                "label": "(E)"
                            },
                            {
                                "name": "5",
                                "type": "text",
                                "label": "(F)"
                            },
                            {
                                "name": "6",
                                "type": "text",
                                "label": "(G)"
                            },
                            {
                                "name": "7",
                                "type": "text",
                                "label": "(H)"
                            },
                            {
                                "name": "8",
                                "type": "text",
                                "label": "(I)"
                            },
                            {
                                "name": "9",
                                "type": "text",
                                "label": "(J)"
                            },
                            {
                                "name": "10",
                                "type": "text",
                                "label": "(K)"
                            },
                            {
                                "name": "11",
                                "type": "text",
                                "label": "(L)"
                            },
                            {
                                "name": "12",
                                "type": "text",
                                "label": "(M)"
                            },
                            {
                                "name": "13",
                                "type": "text",
                                "label": "(N)"
                            },
                            {
                                "name": "14",
                                "type": "text",
                                "label": "(O)"
                            },
                            {
                                "name": "15",
                                "type": "text",
                                "label": "(P)"
                            },
                            {
                                "name": "16",
                                "type": "text",
                                "label": "(Q)"
                            },
                            {
                                "name": "17",
                                "type": "text",
                                "label": "(R)"
                            },
                            {
                                "name": "18",
                                "type": "text",
                                "label": "(S)"
                            },
                            {
                                "name": "19",
                                "type": "text",
                                "label": "(T)"
                            },
                            {
                                "name": "20",
                                "type": "text",
                                "label": "(U)"
                            },
                            {
                                "name": "21",
                                "type": "text",
                                "label": "(V)"
                            },
                            {
                                "name": "22",
                                "type": "text",
                                "label": "(W)"
                            },
                            {
                                "name": "23",
                                "type": "text",
                                "label": "(X)"
                            },
                            {
                                "name": "24",
                                "type": "text",
                                "label": "(Y)"
                            },
                            {
                                "name": "25",
                                "type": "text",
                                "label": "(Z)"
                            }
                        ],
                        "type": "collection",
                        "label": "Values"
                    }
                ]
            }
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "us1.make.com"
    }
}
