{
    "name": "Enhance Product Photos on Shopify with Picsart’s Background Remover",
    "flow": [
        {
            "id": 1,
            "module": "shopify:WatchProducts",
            "version": 2,
            "parameters": {
                "limit": 2,
                "title": "",
                "handle": "",
                "status": "",
                "vendor": "",
                "product_type": "",
                "published_status": ""
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": -236,
                    "y": 4
                },
                "restore": {
                    "parameters": {
                        "status": {
                            "label": "Empty"
                        },
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "shopify"
                            },
                            "label": "My Shopify connection (picsartdemo.myshopify.com)"
                        },
                        "published_status": {
                            "label": "Empty"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:shopify,shopify4",
                        "label": "Connection",
                        "required": true
                    },
                    {
                        "name": "title",
                        "type": "text",
                        "label": "Title"
                    },
                    {
                        "name": "vendor",
                        "type": "text",
                        "label": "Vendor"
                    },
                    {
                        "name": "handle",
                        "type": "text",
                        "label": "Handle"
                    },
                    {
                        "name": "product_type",
                        "type": "text",
                        "label": "Product type"
                    },
                    {
                        "name": "status",
                        "type": "select",
                        "label": "Status",
                        "validate": {
                            "enum": [
                                "active",
                                "archived",
                                "draft"
                            ]
                        }
                    },
                    {
                        "name": "published_status",
                        "type": "select",
                        "label": "Status",
                        "validate": {
                            "enum": [
                                "published",
                                "unpublished"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "type": "uinteger",
                        "label": "Limit",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 5,
            "module": "shopify:ListProductImages",
            "version": 2,
            "parameters": {},
            "mapper": {
                "product_id": "{{1.id}}"
            },
            "metadata": {
                "designer": {
                    "x": 92,
                    "y": -2
                },
                "restore": {
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "shopify"
                            },
                            "label": "My Shopify connection (picsartdemo.myshopify.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:shopify,shopify4",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "product_id",
                        "type": "text",
                        "label": "Product ID",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "picsart:ChangeBackground",
            "version": 1,
            "parameters": {},
            "mapper": {
                "format": "jpg",
                "bg_color": "white",
                "imageType": "image_url",
                "image_url": "{{5.src}}",
                "background": "text"
            },
            "metadata": {
                "designer": {
                    "x": 434,
                    "y": 0,
                    "name": "Picsart - Remove Background"
                },
                "restore": {
                    "expect": {
                        "format": {
                            "label": "JPG"
                        },
                        "imageType": {
                            "label": "Image URL"
                        },
                        "background": {
                            "label": "Color"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "picsart"
                            },
                            "label": "My Picsart connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:picsart",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "imageType",
                        "type": "select",
                        "label": "Image URL/DATA",
                        "required": true,
                        "validate": {
                            "enum": [
                                "image_url",
                                "image"
                            ]
                        }
                    },
                    {
                        "name": "background",
                        "type": "select",
                        "label": "Background",
                        "required": true,
                        "validate": {
                            "enum": [
                                "transparent",
                                "text",
                                "bg_image_url",
                                "bg_image"
                            ]
                        }
                    },
                    {
                        "name": "format",
                        "type": "select",
                        "label": "Format",
                        "required": true,
                        "validate": {
                            "enum": [
                                "jpg",
                                "png",
                                "webp"
                            ]
                        }
                    },
                    {
                        "name": "image_url",
                        "type": "text",
                        "label": "URL",
                        "required": true
                    },
                    {
                        "name": "bg_color",
                        "type": "text",
                        "label": "Color"
                    }
                ]
            }
        },
        {
            "id": 7,
            "module": "http:ActionGetFile",
            "version": 3,
            "parameters": {
                "handleErrors": false
            },
            "mapper": {
                "url": "{{2.imageURL}}",
                "method": "get",
                "serializeUrl": false,
                "shareCookies": false
            },
            "metadata": {
                "designer": {
                    "x": 757,
                    "y": -6
                },
                "restore": {},
                "parameters": [
                    {
                        "name": "handleErrors",
                        "type": "boolean",
                        "label": "Evaluate all states as errors (except for 2xx and 3xx )",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "url",
                        "type": "url",
                        "label": "URL",
                        "required": true
                    },
                    {
                        "name": "serializeUrl",
                        "type": "boolean",
                        "label": "Serialize URL",
                        "required": true
                    },
                    {
                        "name": "method",
                        "type": "hidden",
                        "label": "Method"
                    },
                    {
                        "name": "shareCookies",
                        "type": "boolean",
                        "label": "Share cookies with other HTTP modules",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 6,
            "module": "shopify:UploadProductImage",
            "version": 2,
            "parameters": {},
            "mapper": {
                "data": "{{7.data}}",
                "product_id": "{{1.id}}"
            },
            "metadata": {
                "designer": {
                    "x": 1123,
                    "y": -8
                },
                "restore": {
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "shopify"
                            },
                            "label": "My Shopify connection (picsartdemo.myshopify.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:shopify,shopify4",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "product_id",
                        "type": "number",
                        "label": "Product ID",
                        "required": true
                    },
                    {
                        "name": "data",
                        "type": "buffer",
                        "label": "Data",
                        "required": true
                    },
                    {
                        "name": "alt",
                        "type": "text",
                        "label": "Alternate text"
                    },
                    {
                        "name": "position",
                        "type": "number",
                        "label": "Position"
                    }
                ]
            }
        },
        {
            "id": 8,
            "module": "shopify:DeleteProductImage",
            "version": 2,
            "parameters": {},
            "mapper": {
                "id": "{{5.id}}",
                "product_id": "{{1.id}}"
            },
            "metadata": {
                "designer": {
                    "x": 1467,
                    "y": -8
                },
                "restore": {
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "shopify"
                            },
                            "label": "My Shopify connection (picsartdemo.myshopify.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:shopify,shopify4",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "product_id",
                        "type": "number",
                        "label": "Product ID",
                        "required": true
                    },
                    {
                        "name": "id",
                        "type": "number",
                        "label": "Product Image ID",
                        "required": true
                    }
                ]
            }
        }
    ],
    "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": "eu2.make.com",
        "notes": [
            {
                "moduleIds": [
                    8
                ],
                "content": "<p>As the last step, we remove the original image with the original background so that the end user of the shop will see only the improved copy.</p>",
                "isFilterNote": false,
                "metadata": {
                    "color": "#9138FE"
                }
            },
            {
                "moduleIds": [
                    6
                ],
                "content": "<p>The result of the remove background is uploaded to Shopify.</p>",
                "isFilterNote": false,
                "metadata": {
                    "color": "#9138FE"
                }
            },
            {
                "moduleIds": [
                    2
                ],
                "content": "<p>Next, we will effortlessly remove the background from the primary image and replace it with a clean, white backdrop. You also have the flexibility to customize the background color to align with your store's unique style and theme, or even choose a fixed image as the perfect backdrop.</p>",
                "isFilterNote": false,
                "metadata": {
                    "color": "#9138FE"
                }
            },
            {
                "moduleIds": [
                    1
                ],
                "content": "<p>First, we will watch all product and list its images.</p>",
                "isFilterNote": false,
                "metadata": {
                    "color": "#9138FE"
                }
            }
        ]
    }
}