{
    "name": "Automatizar Presupuestos",
    "flow": [
        {
            "id": 3,
            "module": "gateway:CustomWebHook",
            "version": 1,
            "parameters": {
                "hook": 2606670,
                "maxResults": 1
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": -120,
                    "y": -48
                },
                "restore": {
                    "parameters": {
                        "hook": {
                            "data": {
                                "editable": "true"
                            },
                            "label": "Read AI alerta"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "hook",
                        "type": "hook:gateway-webhook",
                        "label": "Webhook",
                        "required": true
                    },
                    {
                        "name": "maxResults",
                        "type": "number",
                        "label": "Maximum number of results"
                    }
                ]
            }
        },
        {
            "id": 5,
            "module": "openai-gpt-3:messageAssistantAdvanced",
            "version": 1,
            "parameters": {
                "__IMTCONN__": 2826688
            },
            "mapper": {
                "role": "user",
                "message": "Extrae los datos necesarios para crear una propuesta de la siguiente transcripción:\n{{3.transcript}}",
                "assistantId": "asst_GDJx923Rm7pxc6VXqmJnlOd9"
            },
            "metadata": {
                "designer": {
                    "x": 191,
                    "y": -53,
                    "name": "Extraer información"
                },
                "restore": {
                    "expect": {
                        "role": {
                            "label": "User"
                        },
                        "model": {
                            "mode": "chose"
                        },
                        "tools": {
                            "mode": "chose"
                        },
                        "image_urls": {
                            "mode": "chose"
                        },
                        "assistantId": {
                            "mode": "chose",
                            "label": "Creador de propuestas (gpt-4o)",
                            "nested": []
                        },
                        "image_files": {
                            "mode": "chose"
                        },
                        "tool_choice": {
                            "mode": "chose",
                            "label": "Empty"
                        },
                        "response_format": {
                            "mode": "chose",
                            "label": "Empty"
                        },
                        "truncation_strategy": {
                            "mode": "chose",
                            "label": "Empty"
                        },
                        "file_search_resources": {
                            "mode": "chose"
                        },
                        "code_interpreter_resources": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "openai-gpt-3"
                            },
                            "label": "Vinculación SantiArtificial"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:openai-gpt-3",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "assistantId",
                        "type": "select",
                        "label": "Assistant",
                        "required": true
                    },
                    {
                        "name": "role",
                        "type": "select",
                        "label": "Role",
                        "required": true,
                        "validate": {
                            "enum": [
                                "user",
                                "assistant"
                            ]
                        }
                    },
                    {
                        "name": "threadId",
                        "type": "text",
                        "label": "Thread ID"
                    },
                    {
                        "name": "model",
                        "type": "select",
                        "label": "Model"
                    },
                    {
                        "name": "tools",
                        "type": "select",
                        "label": "Tools",
                        "multiple": true,
                        "validate": {
                            "enum": [
                                "file_search",
                                "code_interpreter"
                            ]
                        }
                    },
                    {
                        "name": "file_search_resources",
                        "type": "select",
                        "label": "File Search Resources"
                    },
                    {
                        "name": "code_interpreter_resources",
                        "type": "select",
                        "label": "Code Interpreter Resources",
                        "multiple": true,
                        "validate": {
                            "maxItems": 20
                        }
                    },
                    {
                        "name": "tool_choice",
                        "type": "select",
                        "label": "Tool Choice",
                        "validate": {
                            "enum": [
                                "none",
                                "auto",
                                "required",
                                "file_search",
                                "code_interpreter",
                                "function"
                            ]
                        }
                    },
                    {
                        "name": "instructions",
                        "type": "text",
                        "label": "Instructions"
                    },
                    {
                        "name": "max_prompt_tokens",
                        "type": "uinteger",
                        "label": "Max Prompt Tokens"
                    },
                    {
                        "name": "max_completion_tokens",
                        "type": "uinteger",
                        "label": "Max Completion Tokens"
                    },
                    {
                        "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": "response_format",
                        "type": "select",
                        "label": "Response Format",
                        "validate": {
                            "enum": [
                                "auto",
                                "json_object",
                                "text"
                            ]
                        }
                    },
                    {
                        "name": "truncation_strategy",
                        "type": "select",
                        "label": "Truncation Strategy",
                        "validate": {
                            "enum": [
                                "auto",
                                "last_messages"
                            ]
                        }
                    },
                    {
                        "name": "message",
                        "type": "text",
                        "label": "Message",
                        "required": true
                    },
                    {
                        "name": "image_files",
                        "type": "select",
                        "label": "Image Files",
                        "multiple": true
                    },
                    {
                        "name": "image_urls",
                        "spec": {
                            "name": "value",
                            "type": "url",
                            "label": "Image URL",
                            "required": true
                        },
                        "type": "array",
                        "label": "Image URLs"
                    }
                ]
            }
        },
        {
            "id": 7,
            "module": "util:SetVariable2",
            "version": 1,
            "parameters": {},
            "mapper": {
                "name": "datos",
                "scope": "roundtrip",
                "value": "{{split(5.result; \"|\")}}"
            },
            "metadata": {
                "designer": {
                    "x": 503,
                    "y": -48,
                    "name": "Separar los datos"
                },
                "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": "datos",
                        "type": "any",
                        "label": "datos"
                    }
                ]
            }
        },
        {
            "id": 9,
            "module": "util:FunctionIncrement",
            "version": 1,
            "parameters": {
                "reset": "scenario"
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 793,
                    "y": -52,
                    "name": "incremental"
                },
                "restore": {
                    "parameters": {
                        "reset": {
                            "label": "Never"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "reset",
                        "type": "select",
                        "label": "Reset a value",
                        "required": true,
                        "validate": {
                            "enum": [
                                "run",
                                "execution",
                                "scenario"
                            ]
                        }
                    }
                ]
            }
        },
        {
            "id": 10,
            "module": "google-sheets:addRow",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 2490798
            },
            "mapper": {
                "from": "drive",
                "mode": "select",
                "values": {
                    "0": "{{get(7.datos; 1)}}",
                    "1": "{{get(7.datos; 2)}}",
                    "2": "{{get(7.datos; 3)}}",
                    "3": "{{get(7.datos; 4)}}",
                    "4": "{{get(7.datos; 5)}}",
                    "5": "{{get(7.datos; 6)}}",
                    "6": "{{get(7.datos; 7)}}",
                    "7": "{{get(7.datos; 8)}}",
                    "8": "{{get(7.datos; 9)}}",
                    "9": "{{get(7.datos; 10)}}",
                    "10": "{{get(7.datos; 11)}}",
                    "11": "=I{{(9.i + 1)}}+J{{(9.i + 1)}}+K{{(9.i + 1)}}",
                    "12": "=L{{(9.i + 1)}}*0,21",
                    "13": "=L{{(9.i + 1)}}*0,15",
                    "14": "=L{{(9.i + 1)}}+M{{(9.i + 1)}}-N{{(9.i + 1)}}"
                },
                "sheetId": "Hoja 1",
                "spreadsheetId": "/1oFuImcOHegaZIdGsyLINha6Yjp9jenI8y0HtGONZ6-A",
                "includesHeaders": true,
                "insertDataOption": "INSERT_ROWS",
                "valueInputOption": "USER_ENTERED",
                "insertUnformatted": false
            },
            "metadata": {
                "designer": {
                    "x": 1103,
                    "y": -48,
                    "name": "Datos de propuesta"
                },
                "restore": {
                    "expect": {
                        "from": {
                            "label": "My Drive"
                        },
                        "mode": {
                            "label": "Search by path"
                        },
                        "sheetId": {
                            "label": "Hoja 1"
                        },
                        "spreadsheetId": {
                            "path": [
                                "PLANTILLA PROPUESTAS VIDEO YT"
                            ]
                        },
                        "includesHeaders": {
                            "label": "Yes",
                            "nested": [
                                {
                                    "name": "values",
                                    "spec": [
                                        {
                                            "name": "0",
                                            "type": "text",
                                            "label": "Nombrecliente (A)"
                                        },
                                        {
                                            "name": "1",
                                            "type": "text",
                                            "label": "Nombreempresa (B)"
                                        },
                                        {
                                            "name": "2",
                                            "type": "text",
                                            "label": "descripcionproblema (C)"
                                        },
                                        {
                                            "name": "3",
                                            "type": "text",
                                            "label": "solucion (D)"
                                        },
                                        {
                                            "name": "4",
                                            "type": "text",
                                            "label": "resultados\r (E)"
                                        },
                                        {
                                            "name": "5",
                                            "type": "text",
                                            "label": "automatizacion1 (F)"
                                        },
                                        {
                                            "name": "6",
                                            "type": "text",
                                            "label": "automatizacion2 (G)"
                                        },
                                        {
                                            "name": "7",
                                            "type": "text",
                                            "label": "automatizacion3 (H)"
                                        },
                                        {
                                            "name": "8",
                                            "type": "text",
                                            "label": "precio1 (I)"
                                        },
                                        {
                                            "name": "9",
                                            "type": "text",
                                            "label": "Precio 2 (J)"
                                        },
                                        {
                                            "name": "10",
                                            "type": "text",
                                            "label": "precio3 (K)"
                                        },
                                        {
                                            "name": "11",
                                            "type": "text",
                                            "label": "subtotal (L)"
                                        },
                                        {
                                            "name": "12",
                                            "type": "text",
                                            "label": "IVA (M)"
                                        },
                                        {
                                            "name": "13",
                                            "type": "text",
                                            "label": "IRPF (N)"
                                        },
                                        {
                                            "name": "14",
                                            "type": "text",
                                            "label": "TOTAL (O)"
                                        },
                                        {
                                            "name": "15",
                                            "type": "text",
                                            "label": "Email (P)"
                                        }
                                    ],
                                    "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": "My Google connection (santiwebs1994@gmail.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:google",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "mode",
                        "type": "select",
                        "label": "Search 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": "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": "Nombrecliente (A)"
                            },
                            {
                                "name": "1",
                                "type": "text",
                                "label": "Nombreempresa (B)"
                            },
                            {
                                "name": "2",
                                "type": "text",
                                "label": "descripcionproblema (C)"
                            },
                            {
                                "name": "3",
                                "type": "text",
                                "label": "solucion (D)"
                            },
                            {
                                "name": "4",
                                "type": "text",
                                "label": "resultados\r (E)"
                            },
                            {
                                "name": "5",
                                "type": "text",
                                "label": "automatizacion1 (F)"
                            },
                            {
                                "name": "6",
                                "type": "text",
                                "label": "automatizacion2 (G)"
                            },
                            {
                                "name": "7",
                                "type": "text",
                                "label": "automatizacion3 (H)"
                            },
                            {
                                "name": "8",
                                "type": "text",
                                "label": "precio1 (I)"
                            },
                            {
                                "name": "9",
                                "type": "text",
                                "label": "Precio 2 (J)"
                            },
                            {
                                "name": "10",
                                "type": "text",
                                "label": "precio3 (K)"
                            },
                            {
                                "name": "11",
                                "type": "text",
                                "label": "subtotal (L)"
                            },
                            {
                                "name": "12",
                                "type": "text",
                                "label": "IVA (M)"
                            },
                            {
                                "name": "13",
                                "type": "text",
                                "label": "IRPF (N)"
                            },
                            {
                                "name": "14",
                                "type": "text",
                                "label": "TOTAL (O)"
                            },
                            {
                                "name": "15",
                                "type": "text",
                                "label": "Email (P)"
                            }
                        ],
                        "type": "collection",
                        "label": "Values"
                    }
                ]
            }
        },
        {
            "id": 11,
            "module": "google-email:ActionSendEmail",
            "version": 2,
            "parameters": {
                "account": 4676927
            },
            "mapper": {
                "cc": [],
                "to": [
                    "info@santiartificial.com"
                ],
                "bcc": [],
                "from": "",
                "html": "Ya está el sheets para la propuesta terminado.\nhttps://docs.google.com/spreadsheets/d/1oFuImcOHegaZIdGsyLINha6Yjp9jenI8y0HtGONZ6-A/edit?gid=0#gid=0",
                "subject": "sheets de propuesta listo",
                "attachments": []
            },
            "metadata": {
                "designer": {
                    "x": 1398,
                    "y": -49,
                    "name": "Enviar aviso"
                },
                "restore": {
                    "expect": {
                        "cc": {
                            "mode": "chose"
                        },
                        "to": {
                            "mode": "chose",
                            "items": [
                                null
                            ]
                        },
                        "bcc": {
                            "mode": "chose"
                        },
                        "attachments": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "account": {
                            "data": {
                                "scoped": "true",
                                "connection": "google-restricted"
                            },
                            "label": "Google Workspace Info@santiartificial (info@santiartificial.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "account",
                        "type": "account:google-restricted",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "from",
                        "type": "text",
                        "label": "From"
                    },
                    {
                        "name": "to",
                        "spec": {
                            "name": "value",
                            "type": "email",
                            "label": "Email address",
                            "required": true
                        },
                        "type": "array",
                        "label": "To",
                        "required": true
                    },
                    {
                        "name": "subject",
                        "type": "text",
                        "label": "Subject"
                    },
                    {
                        "name": "html",
                        "type": "text",
                        "label": "Content"
                    },
                    {
                        "name": "attachments",
                        "spec": [
                            {
                                "name": "fileName",
                                "type": "filename",
                                "label": "File name",
                                "required": true,
                                "semantic": "file:name"
                            },
                            {
                                "name": "data",
                                "type": "buffer",
                                "label": "Data",
                                "required": true,
                                "semantic": "file:data"
                            },
                            {
                                "name": "cid",
                                "type": "text",
                                "label": "Content-ID"
                            }
                        ],
                        "type": "array",
                        "label": "Attachments"
                    },
                    {
                        "name": "cc",
                        "spec": {
                            "name": "value",
                            "type": "email",
                            "label": "Email address"
                        },
                        "type": "array",
                        "label": "Copy recipient"
                    },
                    {
                        "name": "bcc",
                        "spec": {
                            "name": "value",
                            "type": "email",
                            "label": "Email address"
                        },
                        "type": "array",
                        "label": "Blind copy recipient"
                    }
                ]
            }
        }
    ],
    "metadata": {
        "instant": true,
        "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": []
    }
}