{
    "name": "Solution - Report Creation dlex-layout (DlexPath)",
    "flow": [
        {
            "id": 2,
            "module": "google-drive:watchFilesInAFolder",
            "version": 4,
            "parameters": {
                "__IMTCONN__": 6232055,
                "select": "create",
                "destination": "drive",
                "mimeType": "all",
                "limit": 10,
                "folderId": "/1l2TmztEB3Cdnyn1emhZZLEE64jLpr_Ao/1KGtWTolpkwRFuVmK3zY3N9_DcYrpEL1V"
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "__IMTCONN__": {
                            "label": "My Google Restricted connection (jamesabrannan@gmail.com)",
                            "data": {
                                "scoped": "true",
                                "connection": "google-restricted"
                            }
                        },
                        "select": {
                            "label": "By Created Time"
                        },
                        "destination": {
                            "label": "My Drive"
                        },
                        "mimeType": {
                            "label": "All"
                        },
                        "folderId": {
                            "path": [
                                "make_com_shared",
                                "invoice-automation"
                            ]
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:google-restricted",
                        "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": 5,
            "module": "google-drive:getAFile",
            "version": 4,
            "parameters": {
                "__IMTCONN__": 6232055
            },
            "mapper": {
                "file": "{{2.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": {
                    "expect": {
                        "select": {
                            "label": "Enter manually"
                        },
                        "formatDrawings": {
                            "label": "JPEG"
                        },
                        "formatDocuments": {
                            "label": "MS Word Document"
                        },
                        "formatSpreadsheets": {
                            "label": "MS Excel"
                        },
                        "formatPresentations": {
                            "label": "MS PowerPoint"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "google-restricted"
                            },
                            "label": "My Google Restricted connection (jamesabrannan@gmail.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:google-restricted",
                        "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",
                                "text/markdown"
                            ]
                        }
                    },
                    {
                        "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",
                                "text/csv"
                            ]
                        }
                    },
                    {
                        "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": 4,
            "module": "app#dynamicpdf-api-final-8b7ssj:dlexLayoutPathOnly",
            "version": 1,
            "parameters": {},
            "mapper": {
                "apiKey": "DP.obPzRc4zXo1UkwuINdZXu80eUkBh4Qwh5Zw8tjXeXs5DRrjW9sePL6vA",
                "DlexPath": "make-automation-dlex/Invoice-SaaS.dlex",
                "file_name": "{{5.name}}",
                "LayoutData": "{{5.data}}"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "restore": {},
                "expect": [
                    {
                        "name": "apiKey",
                        "type": "text",
                        "label": "DynamicPDF API Key",
                        "required": true
                    },
                    {
                        "name": "DlexPath",
                        "type": "text",
                        "label": "DLEX Path",
                        "required": true
                    },
                    {
                        "name": "file_name",
                        "type": "text",
                        "label": "LayoutData File Name",
                        "required": true
                    },
                    {
                        "name": "LayoutData",
                        "type": "buffer",
                        "label": "Layout Data File (Data)",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 7,
            "module": "util:SetVariable2",
            "version": 1,
            "parameters": {},
            "mapper": {
                "name": "fileName",
                "scope": "roundtrip",
                "value": "{{replace(5.name; \"'.json'\"; \"''\")}}-output.pdf"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "scope": {
                            "label": "One cycle"
                        }
                    }
                },
                "expect": [
                    {
                        "name": "name",
                        "type": "text",
                        "label": "Variable name",
                        "required": true
                    },
                    {
                        "name": "scope",
                        "type": "select",
                        "label": "Variable lifetime",
                        "required": true,
                        "validate": {
                            "enum": [
                                "roundtrip",
                                "execution"
                            ]
                        }
                    },
                    {
                        "name": "value",
                        "type": "any",
                        "label": "Variable value"
                    }
                ],
                "interface": [
                    {
                        "name": "fileName",
                        "label": "fileName",
                        "type": "any"
                    }
                ]
            }
        },
        {
            "id": 6,
            "module": "google-drive:uploadAFile",
            "version": 4,
            "parameters": {
                "__IMTCONN__": 6232055
            },
            "mapper": {
                "select": "value",
                "filename": "{{7.fileName}}",
                "data": "{{4.data}}",
                "convert": false,
                "destination": "drive",
                "folderId": "/1l2TmztEB3Cdnyn1emhZZLEE64jLpr_Ao/1KGtWTolpkwRFuVmK3zY3N9_DcYrpEL1V/1yOmNkiKzpY9Btj2gj25Iwce6qtiTzR6H"
            },
            "metadata": {
                "designer": {
                    "x": 1200,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "__IMTCONN__": {
                            "label": "My Google Restricted connection (jamesabrannan@gmail.com)",
                            "data": {
                                "scoped": "true",
                                "connection": "google-restricted"
                            }
                        }
                    },
                    "expect": {
                        "select": {
                            "label": "Select from the list"
                        },
                        "destination": {
                            "label": "My Drive"
                        },
                        "folderId": {
                            "mode": "chose",
                            "path": [
                                "make_com_shared",
                                "invoice-automation",
                                "output"
                            ]
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:google-restricted",
                        "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"
                    },
                    {
                        "name": "filename",
                        "type": "text",
                        "label": "File Name",
                        "required": true
                    },
                    {
                        "name": "data",
                        "type": "buffer",
                        "label": "Data",
                        "required": true
                    },
                    {
                        "name": "convert",
                        "type": "boolean",
                        "label": "Convert a File",
                        "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": "us2.make.com",
        "notes": []
    }
}