{
    "name": "Detect text within new Slack images using Google Cloud Vision (OCR) and send it as a new message in Slack",
    "flow": [
        {
            "id": 17,
            "module": "slack:WatchFiles",
            "version": 3,
            "parameters": {
                "user": "",
                "limit": 2,
                "types": [],
                "channel": ""
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "user": {
                        "label": ""
                    },
                    "channel": {
                        "label": ""
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    },
                    {
                        "name": "types",
                        "type": "select",
                        "label": "Type",
                        "multiple": true,
                        "validate": {
                            "enum": [
                                "spaces",
                                "snippets",
                                "gdocs",
                                "images",
                                "zips",
                                "pdfs"
                            ]
                        }
                    },
                    {
                        "name": "channel",
                        "type": "select",
                        "label": "Channel"
                    },
                    {
                        "name": "user",
                        "type": "select",
                        "label": "Created by"
                    },
                    {
                        "name": "limit",
                        "type": "uinteger",
                        "label": "Limit",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 18,
            "module": "slack:DownloadFile",
            "version": 3,
            "parameters": {},
            "mapper": {
                "url": "{{17.url_private_download}}"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "restore": {},
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "url",
                        "type": "url",
                        "label": "Url private download",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 3,
            "module": "googlecloudvision:DetectText",
            "version": 1,
            "parameters": {},
            "mapper": {
                "data": "{{18.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
                    }
                ],
                "advanced": true
            }
        },
        {
            "id": 19,
            "module": "slack:CreateMessage",
            "version": 3,
            "parameters": {},
            "mapper": {
                "text": "{{3.fullTextAnnotation.text}}",
                "parse": false,
                "mrkdwn": true
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "parse": {
                        "mode": "chose"
                    },
                    "mrkdwn": {
                        "mode": "chose"
                    },
                    "as_user": {
                        "mode": "chose"
                    },
                    "link_names": {
                        "mode": "chose"
                    },
                    "attachments": {
                        "mode": "chose",
                        "items": []
                    },
                    "unfurl_links": {
                        "mode": "chose"
                    },
                    "unfurl_media": {
                        "mode": "chose"
                    },
                    "reply_broadcast": {
                        "mode": "chose"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "channel",
                        "type": "select",
                        "label": "Channel",
                        "required": true
                    },
                    {
                        "name": "text",
                        "type": "text",
                        "label": "Text",
                        "required": true,
                        "multiline": true
                    },
                    {
                        "name": "as_user",
                        "type": "boolean",
                        "label": "As user"
                    },
                    {
                        "name": "thread_ts",
                        "type": "text",
                        "label": "Thread message ID (time stamp)"
                    },
                    {
                        "name": "reply_broadcast",
                        "type": "boolean",
                        "label": "Reply broadcast"
                    },
                    {
                        "name": "attachments",
                        "spec": [
                            {
                                "name": "fallback",
                                "type": "text",
                                "label": "Fallback",
                                "required": true
                            },
                            {
                                "name": "color",
                                "type": "text",
                                "label": "Color"
                            },
                            {
                                "name": "pretext",
                                "type": "text",
                                "label": "Pretext"
                            },
                            {
                                "name": "author_name",
                                "type": "text",
                                "label": "Author name"
                            },
                            {
                                "name": "author_link",
                                "type": "url",
                                "label": "Author link"
                            },
                            {
                                "name": "author_icon",
                                "type": "url",
                                "label": "Author icon (URL)"
                            },
                            {
                                "name": "title",
                                "type": "text",
                                "label": "Title"
                            },
                            {
                                "name": "title_link",
                                "type": "url",
                                "label": "Title link"
                            },
                            {
                                "name": "text",
                                "type": "text",
                                "label": "Text"
                            },
                            {
                                "name": "image_url",
                                "type": "text",
                                "label": "Image (URL)"
                            },
                            {
                                "name": "thumb_url",
                                "type": "url",
                                "label": "Thumbnail (URL)"
                            },
                            {
                                "name": "footer",
                                "type": "text",
                                "label": "Footer"
                            },
                            {
                                "name": "footer_icon",
                                "type": "url",
                                "label": "Footer icon (URL)"
                            },
                            {
                                "name": "ts",
                                "type": "number",
                                "label": "Time stamp"
                            },
                            {
                                "name": "fields",
                                "spec": [
                                    {
                                        "name": "title",
                                        "type": "text",
                                        "label": "Title",
                                        "required": true
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value",
                                        "required": true
                                    },
                                    {
                                        "name": "short",
                                        "type": "boolean",
                                        "label": "Display side-by-side with other values",
                                        "required": true
                                    }
                                ],
                                "type": "array",
                                "label": "Fields inside message attachments"
                            }
                        ],
                        "type": "array",
                        "label": "Attachments"
                    },
                    {
                        "name": "icon_emoji",
                        "type": "text",
                        "label": "Icon emoji"
                    },
                    {
                        "name": "icon_url",
                        "type": "url",
                        "label": "Icon url"
                    },
                    {
                        "name": "link_names",
                        "type": "boolean",
                        "label": "Link names"
                    },
                    {
                        "name": "parse",
                        "type": "boolean",
                        "label": "Parse message text"
                    },
                    {
                        "name": "mrkdwn",
                        "type": "boolean",
                        "label": "Use markdown"
                    },
                    {
                        "name": "unfurl_links",
                        "type": "boolean",
                        "label": "Unfurl primarily text-based content"
                    },
                    {
                        "name": "unfurl_media",
                        "type": "boolean",
                        "label": "Unfurl media content"
                    },
                    {
                        "name": "username",
                        "type": "text",
                        "label": "User name"
                    }
                ]
            }
        }
    ],
    "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": []
    }
}