{
    "name": "Detect text within new Google Drive images using Google Cloud Vision (OCR) and save it to Google Drive as a new file",
    "flow": [
        {
            "id": 8,
            "module": "google-drive:watchFilesInAFolder",
            "version": 4,
            "parameters": {
                "limit": 2,
                "select": "create",
                "mimeType": "all"
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "select": {
                        "label": "By Created Time"
                    },
                    "mimeType": {
                        "label": "All"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    },
                    {
                        "name": "select",
                        "type": "select",
                        "label": "Watch Files",
                        "required": true,
                        "validate": {
                            "enum": [
                                "create",
                                "modify"
                            ]
                        }
                    },
                    {
                        "name": "destination",
                        "type": "select",
                        "label": "Choose a Drive",
                        "required": true,
                        "validate": {
                            "enum": [
                                "drive",
                                "share",
                                "team"
                            ]
                        }
                    },
                    {
                        "name": "mimeType",
                        "type": "select",
                        "label": "File Types to Watch",
                        "required": true,
                        "validate": {
                            "enum": [
                                "all",
                                "document",
                                "spreadsheet",
                                "slide",
                                "drawing"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "type": "uinteger",
                        "label": "Limit",
                        "required": true
                    },
                    {
                        "name": "folderId",
                        "type": "folder",
                        "label": "Select the Folder to be Watched",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 9,
            "module": "google-drive:getAFile",
            "version": 4,
            "parameters": {},
            "mapper": {
                "file": "{{8.id}}",
                "select": "map",
                "formatDrawings": "image/jpeg",
                "formatDocuments": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                "formatSpreadsheets": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                "formatPresentations": "application/vnd.openxmlformats-officedocument.presentationml.presentation"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "restore": {
                    "select": {
                        "label": "Enter manually"
                    },
                    "formatDrawings": {
                        "label": "JPEG"
                    },
                    "formatDocuments": {
                        "label": "MS Word Document"
                    },
                    "formatSpreadsheets": {
                        "label": "MS Excel"
                    },
                    "formatPresentations": {
                        "label": "MS PowerPoint"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "select",
                        "type": "select",
                        "label": "Enter a File ID",
                        "required": true,
                        "validate": {
                            "enum": [
                                "map",
                                "value"
                            ]
                        }
                    },
                    {
                        "name": "formatDocuments",
                        "type": "select",
                        "label": "Convert Google Documents Files to Format",
                        "required": true,
                        "validate": {
                            "enum": [
                                "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                                "application/pdf",
                                "application/vnd.oasis.opendocument.text",
                                "text/html",
                                "text/plain",
                                "application/rtf"
                            ]
                        }
                    },
                    {
                        "name": "formatSpreadsheets",
                        "type": "select",
                        "label": "Convert Google Spreadsheets Files to Format",
                        "required": true,
                        "validate": {
                            "enum": [
                                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                                "application/x-vnd.oasis.opendocument.spreadsheet",
                                "application/pdf"
                            ]
                        }
                    },
                    {
                        "name": "formatPresentations",
                        "type": "select",
                        "label": "Convert Google Slides Files to Format",
                        "required": true,
                        "validate": {
                            "enum": [
                                "application/vnd.openxmlformats-officedocument.presentationml.presentation",
                                "application/pdf"
                            ]
                        }
                    },
                    {
                        "name": "formatDrawings",
                        "type": "select",
                        "label": "Convert Google Drawings Files to Format",
                        "required": true,
                        "validate": {
                            "enum": [
                                "image/jpeg",
                                "image/png",
                                "image/svg+xml",
                                "application/pdf"
                            ]
                        }
                    },
                    {
                        "name": "file",
                        "type": "text",
                        "label": "File ID",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 3,
            "module": "googlecloudvision:DetectText",
            "version": 1,
            "parameters": {},
            "mapper": {
                "data": "{{9.data}}",
                "imageSendMethod": "send_type_data",
                "isToOptimizeDetection": false,
                "isToIncludeFullTextAnnotation": false
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "restore": {
                    "imageSendMethod": {
                        "label": "Data"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "imageSendMethod",
                        "type": "select",
                        "label": "Data/URL",
                        "required": true,
                        "validate": {
                            "enum": [
                                "send_type_data",
                                "send_type_url"
                            ]
                        }
                    },
                    {
                        "name": "isToOptimizeDetection",
                        "type": "boolean",
                        "label": "Optimize the Detection for Dense Text and Documents",
                        "required": true
                    },
                    {
                        "name": "isToIncludeFullTextAnnotation",
                        "type": "boolean",
                        "label": "Include Full Text Annotation",
                        "required": true
                    },
                    {
                        "mean": "data",
                        "name": "data",
                        "type": "buffer",
                        "label": "Data",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 7,
            "module": "google-drive:uploadAFile",
            "version": 4,
            "parameters": {},
            "mapper": {
                "data": "{{9.data}}",
                "select": "value",
                "filename": "{{9.name}}"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "select": {
                        "label": "Select from the list"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "select",
                        "type": "select",
                        "label": "Enter a Folder ID",
                        "required": true,
                        "validate": {
                            "enum": [
                                "map",
                                "value"
                            ]
                        }
                    },
                    {
                        "name": "title",
                        "type": "text",
                        "label": "New File Name"
                    },
                    {
                        "mean": "name",
                        "name": "filename",
                        "type": "filename",
                        "label": "File Name",
                        "required": true
                    },
                    {
                        "mean": "data",
                        "name": "data",
                        "type": "buffer",
                        "label": "Data",
                        "required": true
                    },
                    {
                        "name": "destination",
                        "type": "select",
                        "label": "New Drive Location",
                        "required": true,
                        "validate": {
                            "enum": [
                                "drive",
                                "share",
                                "team"
                            ]
                        }
                    },
                    {
                        "name": "folderId",
                        "type": "folder",
                        "label": "New Folder Location",
                        "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": []
    }
}