{ "name": "Ben AI Clone", "flow": [ { "id": 1, "module": "whatsapp-business-cloud:watchEvents", "version": 1, "parameters": { "__IMTHOOK__": 1916561 }, "mapper": {}, "metadata": { "designer": { "x": 0, "y": 150 }, "restore": { "parameters": { "__IMTHOOK__": { "data": { "editable": "false" }, "label": "Ben AI" } } }, "parameters": [ { "name": "__IMTHOOK__", "type": "hook:whatsapp-business-cloud2", "label": "Webhook", "required": true } ], "interface": [ { "name": "id", "type": "text", "label": "WhatsApp Business Account ID" }, { "name": "time", "type": "date", "label": "Time" }, { "name": "field", "type": "text", "label": "Field" }, { "name": "messaging_product", "type": "text", "label": "Messaging Product" }, { "name": "metadata", "spec": [ { "name": "display_phone_number", "type": "text", "label": "Display Phone Number" }, { "name": "phone_number_id", "type": "text", "label": "Phone Number ID" } ], "type": "collection", "label": "Metadata" }, { "name": "contacts", "spec": { "spec": [ { "name": "profile", "spec": [ { "name": "name", "type": "text", "label": "Name" } ], "type": "collection", "label": "Profile" }, { "name": "wa_id", "type": "text", "label": "WhatsApp ID" } ], "type": "collection" }, "type": "array", "label": "Contacts" }, { "name": "messages", "spec": { "spec": [ { "name": "from", "type": "text", "label": "Sender" }, { "name": "id", "type": "text", "label": "Message ID" }, { "name": "timestamp", "type": "date", "label": "Timestamp" }, { "name": "text", "spec": [ { "name": "body", "type": "text", "label": "Body" } ], "type": "collection", "label": "Text" }, { "name": "type", "type": "text", "label": "Type" }, { "name": "image", "spec": [ { "name": "caption", "type": "text", "label": "Caption" }, { "name": "mime_type", "type": "text", "label": "MIME Type" }, { "name": "sha256", "type": "text", "label": "SHA256" }, { "name": "id", "type": "text", "label": "Media ID" } ], "type": "collection", "label": "Image" }, { "name": "audio", "spec": [ { "name": "mime_type", "type": "text", "label": "MIME Type" }, { "name": "sha256", "type": "text", "label": "SHA256" }, { "name": "id", "type": "text", "label": "Media ID" }, { "name": "voice", "type": "boolean", "label": "Voice" } ], "type": "collection", "label": "Audio" }, { "name": "video", "spec": [ { "name": "caption", "type": "text", "label": "Caption" }, { "name": "mime_type", "type": "text", "label": "MIME Type" }, { "name": "sha256", "type": "text", "label": "SHA256" }, { "name": "id", "type": "text", "label": "Media ID" } ], "type": "collection", "label": "Video" }, { "name": "document", "spec": [ { "name": "caption", "type": "text", "label": "Caption" }, { "name": "filename", "type": "text", "label": "File Name" }, { "name": "mime_type", "type": "text", "label": "MIME Type" }, { "name": "sha256", "type": "text", "label": "SHA256" }, { "name": "id", "type": "text", "label": "Media ID" } ], "type": "collection", "label": "Document" }, { "name": "contacts", "spec": { "spec": [ { "name": "name", "spec": [ { "name": "formatted_name", "type": "text", "label": "Formatted Name" }, { "name": "first_name", "type": "text", "label": "First Name" }, { "name": "last_name", "type": "text", "label": "Last Name" }, { "name": "middle_name", "type": "text", "label": "Middle Name" }, { "name": "suffix", "type": "text", "label": "Name Suffix" }, { "name": "prefix", "type": "text", "label": "Name Prefix" } ], "type": "collection", "label": "Name" }, { "name": "phones", "spec": [ { "name": "phone", "type": "text", "label": "Phone" }, { "name": "type", "type": "text", "label": "Type" } ], "type": "array", "label": "Phones" }, { "name": "emails", "spec": [ { "name": "email", "type": "email", "label": "Email" }, { "name": "type", "type": "text", "label": "Type" } ], "type": "array", "label": "Emails" }, { "name": "org", "spec": [ { "name": "company", "type": "text", "label": "Company" }, { "name": "department", "type": "text", "label": "Department" }, { "name": "title", "type": "text", "label": "Title" } ], "type": "collection", "label": "Organization" }, { "name": "urls", "spec": [ { "name": "type", "type": "text", "label": "Type" }, { "name": "url", "type": "url", "label": "URL" } ], "type": "array", "label": "URLs" }, { "name": "addresses", "spec": [ { "name": "type", "type": "text", "label": "Type" }, { "name": "street", "type": "text", "label": "Street" }, { "name": "city", "type": "text", "label": "City" }, { "name": "zip", "type": "text", "label": "ZIP" }, { "name": "country", "type": "text", "label": "Country" }, { "name": "country_code", "type": "text", "label": "Country Code" } ], "type": "array", "label": "Addresses" }, { "name": "birthday", "type": "text", "label": "Birthday" } ], "type": "collection" }, "type": "array", "label": "Contacts" }, { "name": "sticker", "spec": [ { "name": "mime_type", "type": "text", "label": "MIME Type" }, { "name": "sha256", "type": "text", "label": "SHA256" }, { "name": "id", "type": "text", "label": "Media ID" } ], "type": "collection", "label": "Sticker" }, { "name": "location", "spec": [ { "name": "latitude", "type": "number", "label": "Latitude" }, { "name": "longitude", "type": "number", "label": "Longitude" }, { "name": "name", "type": "text", "label": "Name" }, { "name": "address", "type": "text", "label": "Address" } ], "type": "collection", "label": "Location" }, { "name": "context", "spec": [ { "name": "from", "type": "text", "label": "From" }, { "name": "id", "type": "text", "label": "Context ID" } ], "type": "collection", "label": "Context" }, { "name": "button", "spec": [ { "name": "payload", "type": "text", "label": "Payload" }, { "name": "text", "type": "text", "label": "Text" } ], "type": "collection", "label": "Button" }, { "name": "interactive", "spec": [ { "name": "type", "type": "text", "label": "Type" }, { "name": "list_reply", "spec": [ { "name": "id", "type": "number", "label": "ID" }, { "name": "title", "type": "text", "label": "Title" }, { "name": "description", "type": "text", "label": "Description" } ], "type": "collection", "label": "List Reply" }, { "name": "button_reply", "spec": [ { "name": "id", "type": "number", "label": "ID" }, { "name": "title", "type": "text", "label": "Title" } ], "type": "collection", "label": "Button Reply" } ], "type": "collection", "label": "Interactive" } ], "type": "collection" }, "type": "array", "label": "Messages" } ] } }, { "id": 6, "module": "builtin:BasicRouter", "version": 1, "mapper": null, "metadata": { "designer": { "x": 300, "y": 150 } }, "routes": [ { "flow": [ { "id": 2, "module": "openai-gpt-3:messageAssistantAdvanced", "version": 1, "parameters": { "__IMTCONN__": 2882820 }, "filter": { "name": "", "conditions": [ [ { "a": "{{1.messages[].type}}", "b": "text", "o": "text:equal" } ] ] }, "mapper": { "role": "user", "message": "{{1.messages[].text.body}}", "assistantId": "asst_qy8RinToeffHqSNJCjKH8d1L" }, "metadata": { "designer": { "x": 600, "y": 0, "name": "Ben AI Agent" }, "restore": { "expect": { "role": { "label": "User" }, "model": { "mode": "chose" }, "tools": { "mode": "chose" }, "image_urls": { "mode": "chose" }, "assistantId": { "mode": "chose", "label": "Ben AI (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": "My OpenAI connection" } } }, "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" } ], "advanced": true } }, { "id": 20, "module": "openai-gpt-3:CreateCompletion", "version": 1, "parameters": { "__IMTCONN__": 2882820 }, "mapper": { "model": "gpt-4o", "top_p": "1", "select": "chat", "messages": [ { "role": "user", "content": "You are an expert answer improver. Please look at the message below. This is a response to a user query. You have 1 main job:\n1. You will ALWAYS take out all the mentions of sources\n\nYou will ONLY output the transformed message without the sources below the message header, nothing else, no explanation.\n\n**Message:**\n{{2.result}}", "imageDetail": "auto" } ], "max_tokens": "2048", "temperature": "1", "n_completions": "1", "response_format": "text" }, "metadata": { "designer": { "x": 900, "y": 0 }, "restore": { "expect": { "stop": { "mode": "chose" }, "model": { "mode": "chose", "label": "gpt-4o (system)" }, "select": { "label": "Create a Chat Completion (GPT and o1 models)" }, "messages": { "mode": "chose", "items": [ { "role": { "mode": "chose", "label": "User" }, "imageDetail": { "mode": "chose", "label": "Auto" }, "imageInputType": { "mode": "chose", "label": "Empty" } } ] }, "logit_bias": { "mode": "chose" }, "response_format": { "mode": "chose", "label": "Text" }, "additionalParameters": { "mode": "chose" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "openai-gpt-3" }, "label": "My OpenAI connection" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:openai-gpt-3", "label": "Connection", "required": true } ], "expect": [ { "name": "select", "type": "select", "label": "Select Method", "required": true, "validate": { "enum": [ "chat", "prompt" ] } }, { "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": "n_completions", "type": "number", "label": "Number" }, { "name": "frequency_penalty", "type": "number", "label": "Frequency Penalty", "validate": { "max": 2, "min": -2 } }, { "name": "presence_penalty", "type": "number", "label": "Presence Penalty", "validate": { "max": 2, "min": -2 } }, { "name": "logit_bias", "spec": { "name": "value", "spec": [ { "name": "token", "type": "text", "label": "Token ID", "required": true }, { "name": "probability", "type": "number", "label": "Probability", "required": true, "validate": { "max": 100, "min": -100 } } ], "type": "collection", "label": "Token Probability" }, "type": "array", "label": "Token Probability" }, { "name": "seed", "type": "integer", "label": "Seed" }, { "name": "stop", "spec": { "name": "value", "type": "text", "label": "Stop Sequence" }, "type": "array", "label": "Stop Sequences", "validate": { "maxItems": 4 } }, { "name": "additionalParameters", "spec": { "name": "value", "spec": [ { "name": "key", "type": "text", "label": "Parameter Name", "required": true }, { "name": "type", "type": "select", "label": "Input Type", "options": [ { "label": "Text", "value": "text", "nested": [ { "name": "value", "type": "text", "label": "Parameter Value" } ], "default": true }, { "label": "Number", "value": "number", "nested": [ { "name": "value", "type": "number", "label": "Parameter Value" } ] }, { "label": "Boolean", "value": "boolean", "nested": [ { "name": "value", "type": "boolean", "label": "Parameter Value" } ] }, { "label": "Date", "value": "date", "nested": [ { "name": "value", "type": "date", "label": "Parameter Value" } ] }, { "label": "Any", "value": "any", "nested": [ { "name": "value", "type": "any", "label": "Parameter Value" } ] } ] } ], "type": "collection", "label": "Input Parameter" }, "type": "array", "label": "Other Input Parameters" }, { "name": "model", "type": "select", "label": "Model", "required": true }, { "name": "max_tokens", "type": "uinteger", "label": "Max Completion Tokens" }, { "name": "messages", "spec": { "name": "value", "spec": [ { "name": "role", "type": "select", "label": "Role", "options": { "store": [ { "label": "System", "value": "system", "nested": [ { "help": "Text content of the message on behalf of the selected __Role__.", "name": "content", "type": "text", "label": "Text Content" } ] }, { "label": "User", "value": "user", "nested": [ { "help": "Text content of the message on behalf of the selected __Role__.", "name": "content", "type": "text", "label": "Text Content" }, { "name": "imageInputType", "type": "select", "label": "Image Input Type", "options": [ { "label": "URL", "value": "url", "nested": [ { "help": "Make sure to use a publically accessible URL.\nYou can test if your image is publically accessible by opening the link in an incognito tab.", "name": "imageUrl", "type": "url", "label": "Image URL" } ] }, { "label": "Image File", "value": "file", "nested": [ { "name": "imageFile", "spec": [ { "help": "Accepted extensions: `.jpg`, `.jpeg`, `.png`, `.webp` and `.gif`.", "name": "imageFilename", "type": "filename", "label": "Image Filename", "semantic": "file:name", "extension": [ "jpg", "jpeg", "png", "webp", "gif" ] }, { "name": "imageData", "type": "buffer", "label": "Image Data", "semantic": "file:data" } ], "type": "collection", "label": "Image" } ] } ], "mappable": false }, { "name": "imageDetail", "type": "select", "label": "Image Detail", "options": [ { "label": "Auto", "value": "auto", "default": true }, { "label": "High", "value": "high" }, { "label": "Low", "value": "low" } ], "advanced": true } ] }, { "label": "Assistant", "value": "assistant", "nested": [ { "help": "Text content of the message on behalf of the selected __Role__.", "name": "content", "type": "text", "label": "Text Content" } ] } ] }, "required": true } ], "type": "collection", "label": "Message" }, "type": "array", "label": "Messages", "required": true }, { "name": "response_format", "type": "select", "label": "Response Format", "validate": { "enum": [ "text", "json_object" ] } } ], "interface": [ { "name": "result", "type": "any", "label": "Result" }, { "name": "id", "type": "text", "label": "ID" }, { "name": "object", "type": "text", "label": "Object" }, { "name": "created", "type": "date", "label": "Created" }, { "name": "model", "type": "text", "label": "Model" }, { "name": "choices", "spec": { "spec": [ { "name": "text", "type": "text", "label": "Text" }, { "name": "index", "type": "number", "label": "Index" }, { "name": "logprobs", "type": "text", "label": "Log Probs" }, { "name": "finish_reason", "type": "text", "label": "Finish Reason" }, { "name": "message", "spec": [ { "name": "role", "type": "text", "label": "Role" }, { "name": "content", "type": "text", "label": "Content" }, { "name": "refusal", "type": "text", "label": "Refusal" } ], "type": "collection", "label": "Message" } ], "type": "collection" }, "type": "array", "label": "Choices" }, { "name": "usage", "spec": [ { "name": "prompt_tokens", "type": "number", "label": "Prompt Tokens" }, { "name": "completion_tokens", "type": "text", "label": "Completion Tokens" }, { "name": "total_tokens", "type": "number", "label": "Total Tokens" }, { "name": "prompt_tokens_details", "spec": [ { "name": "cached_tokens", "type": "uinteger", "label": "Cached Tokens" }, { "name": "text_tokens", "type": "uinteger", "label": "Text Tokens" }, { "name": "image_tokens", "type": "uinteger", "label": "Image Tokens" }, { "name": "audio_tokens", "type": "uinteger", "label": "Audio Tokens" } ], "type": "collection", "label": "Prompt Tokens Details" }, { "name": "completion_tokens_details", "spec": [ { "name": "reasoning_tokens", "type": "uinteger", "label": "Reasoning Tokens" }, { "name": "text_tokens", "type": "uinteger", "label": "Text Tokens" }, { "name": "audio_tokens", "type": "uinteger", "label": "Audio Tokens" } ], "type": "collection", "label": "Completion Tokens Details" } ], "type": "collection", "label": "Usage" }, { "name": "system_fingerprint", "type": "text", "label": "System Fingerprint" } ] } }, { "id": 3, "module": "elevenlabs:createTextToSpeech", "version": 1, "parameters": { "__IMTCONN__": 3705067 }, "mapper": { "text": "{{20.result}}", "model_id": "eleven_multilingual_v2", "voice_id": "kdikibstKceOhzZ8HRSW", "voice_settings": {} }, "metadata": { "designer": { "x": 1200, "y": 0 }, "restore": { "expect": { "model_id": { "mode": "chose", "label": "Eleven Multilingual v2 (eleven_multilingual_v2)" }, "voice_id": { "mode": "chose", "label": "professional/Ben van Sprundel" }, "optimize_streaming_latency": { "mode": "chose", "label": "Empty" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "elevenlabs" }, "label": "My ElevenLabs connection" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:elevenlabs", "label": "Connection", "required": true } ], "expect": [ { "name": "voice_id", "type": "select", "label": "Voice", "required": true }, { "name": "model_id", "type": "select", "label": "Model", "required": true }, { "name": "text", "type": "text", "label": "Text", "required": true }, { "name": "voice_settings", "spec": [ { "name": "stability", "type": "number", "label": "Stability", "validate": { "max": 1, "min": 0 } }, { "name": "similarity_boost", "type": "number", "label": "Similarity Boost", "validate": { "max": 1, "min": 0 } } ], "type": "collection", "label": "Voice Settings" }, { "name": "optimize_streaming_latency", "type": "select", "label": "Optimize Streaming Latency", "validate": { "enum": [ "0", "1", "2", "3", "4" ] } } ] } }, { "id": 5, "module": "whatsapp-business-cloud:uploadMedia", "version": 1, "parameters": { "__IMTCONN__": 3362228 }, "mapper": { "data": "{{3.data}}", "fromId": "278982118641623", "filename": "{{3.fileName}}" }, "metadata": { "designer": { "x": 1500, "y": 0 }, "restore": { "expect": { "fromId": { "mode": "chose", "label": "Ben Erik Van S Ltda (+55 11 91195-7545)" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "whatsapp-business-cloud2" }, "label": "My WhatsApp Business Cloud connection (Ben)" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:whatsapp-business-cloud2", "label": "Connection", "required": true } ], "expect": [ { "mode": "edit", "name": "fromId", "type": "select", "label": "Sender ID", "required": true }, { "name": "filename", "type": "filename", "label": "File name", "required": true }, { "name": "data", "type": "buffer", "label": "Data", "required": true } ] } }, { "id": 4, "module": "whatsapp-business-cloud:sendMessage", "version": 1, "parameters": { "__IMTCONN__": 2882568 }, "mapper": { "to": "{{1.messages[].from}}", "type": "audio", "audio": { "id": "{{5.id}}" }, "fromId": "278982118641623" }, "metadata": { "designer": { "x": 1800, "y": 0 }, "restore": { "expect": { "type": { "label": "Audio" }, "fromId": { "mode": "chose", "label": "Ben Erik Van S Ltda (+55 11 91195-7545)" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "whatsapp-business-cloud2" }, "label": "API 2 (Ben)" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:whatsapp-business-cloud2", "label": "Connection", "required": true } ], "expect": [ { "type": "hidden" }, { "name": "fromId", "type": "select", "label": "Sender ID", "required": true }, { "name": "to", "type": "text", "label": "Receiver", "required": true }, { "name": "type", "type": "select", "label": "Message Type", "required": true, "validate": { "enum": [ "text", "image", "audio", "video", "document", "sticker", "location", "contacts", "interactive" ] } }, { "name": "audio", "spec": [ { "name": "id", "type": "text", "label": "Media ID" }, { "name": "link", "type": "url", "label": "Media URL" } ], "type": "collection", "label": "Audio" } ] } } ] }, { "flow": [ { "id": 7, "module": "whatsapp-business-cloud:getMedia", "version": 1, "parameters": { "__IMTCONN__": 2882568 }, "filter": { "name": "", "conditions": [ [ { "a": "{{1.messages[].type}}", "b": "audio", "o": "text:equal" } ] ] }, "mapper": { "mediaId": "{{1.messages[].audio.id}}" }, "metadata": { "designer": { "x": 600, "y": 300 }, "restore": { "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "whatsapp-business-cloud2" }, "label": "API 2 (Ben)" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:whatsapp-business-cloud2", "label": "Connection", "required": true } ], "expect": [ { "name": "mediaId", "type": "text", "label": "Media ID", "required": true } ] } }, { "id": 18, "module": "openai-gpt-3:CreateTranslation", "version": 1, "parameters": { "__IMTCONN__": 2882820 }, "filter": { "name": "", "conditions": [ [ { "a": "{{1.messages[].type}}", "b": "audio", "o": "text:equal" } ] ] }, "mapper": { "model": "whisper-1", "fileData": "{{7.mediaData}}", "fileName": "{{7.mediaName}}", "response_format": "text" }, "metadata": { "designer": { "x": 900, "y": 300, "name": "Speech to text" }, "restore": { "expect": { "model": { "mode": "chose", "label": "Whisper-1" }, "response_format": { "mode": "chose", "label": "Text" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "openai-gpt-3" }, "label": "My OpenAI connection" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:openai-gpt-3", "label": "Connection", "required": true } ], "expect": [ { "name": "fileName", "type": "filename", "label": "File Name", "required": true }, { "name": "fileData", "type": "buffer", "label": "File Data", "required": true }, { "name": "model", "type": "select", "label": "Model", "required": true }, { "name": "prompt", "type": "text", "label": "Prompt" }, { "name": "response_format", "type": "select", "label": "Response Format", "validate": { "enum": [ "json", "text", "srt", "verbose_json", "vtt" ] } }, { "name": "temperature", "type": "number", "label": "Temperature", "validate": { "max": 1, "min": 0 } } ], "interface": [ { "name": "text", "type": "text", "label": "Text" } ] } }, { "id": 9, "module": "openai-gpt-3:messageAssistantAdvanced", "version": 1, "parameters": { "__IMTCONN__": 2882820 }, "mapper": { "role": "user", "message": "{{18.text}}", "assistantId": "asst_qy8RinToeffHqSNJCjKH8d1L" }, "metadata": { "designer": { "x": 1200, "y": 300, "name": "Ben AI Agent" }, "restore": { "expect": { "role": { "label": "User" }, "model": { "mode": "chose" }, "tools": { "mode": "chose" }, "image_urls": { "mode": "chose" }, "assistantId": { "mode": "chose", "label": "Ben AI (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": "My OpenAI connection" } } }, "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": 19, "module": "openai-gpt-3:CreateCompletion", "version": 1, "parameters": { "__IMTCONN__": 2882820 }, "mapper": { "model": "gpt-4o", "top_p": "1", "select": "chat", "messages": [ { "role": "user", "content": "You are an expert answer improver. Please look at the message below. This is a response to a user query. You have 1 main job:\n1. You will ALWAYS take out all the mentions of sources\n\nYou will ONLY output the transformed message without the sources below the message header, nothing else, no explanation.\n\n**Message:**\n{{9.result}}", "imageDetail": "auto" } ], "max_tokens": "2048", "temperature": "1", "n_completions": "1", "response_format": "text" }, "metadata": { "designer": { "x": 1500, "y": 300 }, "restore": { "expect": { "stop": { "mode": "chose" }, "model": { "mode": "chose", "label": "gpt-4o (system)" }, "select": { "label": "Create a Chat Completion (GPT and o1 models)" }, "messages": { "mode": "chose", "items": [ { "role": { "mode": "chose", "label": "User" }, "imageDetail": { "mode": "chose", "label": "Auto" }, "imageInputType": { "mode": "chose", "label": "Empty" } } ] }, "logit_bias": { "mode": "chose" }, "response_format": { "mode": "chose", "label": "Text" }, "additionalParameters": { "mode": "chose" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "openai-gpt-3" }, "label": "My OpenAI connection" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:openai-gpt-3", "label": "Connection", "required": true } ], "expect": [ { "name": "select", "type": "select", "label": "Select Method", "required": true, "validate": { "enum": [ "chat", "prompt" ] } }, { "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": "n_completions", "type": "number", "label": "Number" }, { "name": "frequency_penalty", "type": "number", "label": "Frequency Penalty", "validate": { "max": 2, "min": -2 } }, { "name": "presence_penalty", "type": "number", "label": "Presence Penalty", "validate": { "max": 2, "min": -2 } }, { "name": "logit_bias", "spec": { "name": "value", "spec": [ { "name": "token", "type": "text", "label": "Token ID", "required": true }, { "name": "probability", "type": "number", "label": "Probability", "required": true, "validate": { "max": 100, "min": -100 } } ], "type": "collection", "label": "Token Probability" }, "type": "array", "label": "Token Probability" }, { "name": "seed", "type": "integer", "label": "Seed" }, { "name": "stop", "spec": { "name": "value", "type": "text", "label": "Stop Sequence" }, "type": "array", "label": "Stop Sequences", "validate": { "maxItems": 4 } }, { "name": "additionalParameters", "spec": { "name": "value", "spec": [ { "name": "key", "type": "text", "label": "Parameter Name", "required": true }, { "name": "type", "type": "select", "label": "Input Type", "options": [ { "label": "Text", "value": "text", "nested": [ { "name": "value", "type": "text", "label": "Parameter Value" } ], "default": true }, { "label": "Number", "value": "number", "nested": [ { "name": "value", "type": "number", "label": "Parameter Value" } ] }, { "label": "Boolean", "value": "boolean", "nested": [ { "name": "value", "type": "boolean", "label": "Parameter Value" } ] }, { "label": "Date", "value": "date", "nested": [ { "name": "value", "type": "date", "label": "Parameter Value" } ] }, { "label": "Any", "value": "any", "nested": [ { "name": "value", "type": "any", "label": "Parameter Value" } ] } ] } ], "type": "collection", "label": "Input Parameter" }, "type": "array", "label": "Other Input Parameters" }, { "name": "model", "type": "select", "label": "Model", "required": true }, { "name": "max_tokens", "type": "uinteger", "label": "Max Completion Tokens" }, { "name": "messages", "spec": { "name": "value", "spec": [ { "name": "role", "type": "select", "label": "Role", "options": { "store": [ { "label": "System", "value": "system", "nested": [ { "help": "Text content of the message on behalf of the selected __Role__.", "name": "content", "type": "text", "label": "Text Content" } ] }, { "label": "User", "value": "user", "nested": [ { "help": "Text content of the message on behalf of the selected __Role__.", "name": "content", "type": "text", "label": "Text Content" }, { "name": "imageInputType", "type": "select", "label": "Image Input Type", "options": [ { "label": "URL", "value": "url", "nested": [ { "help": "Make sure to use a publically accessible URL.\nYou can test if your image is publically accessible by opening the link in an incognito tab.", "name": "imageUrl", "type": "url", "label": "Image URL" } ] }, { "label": "Image File", "value": "file", "nested": [ { "name": "imageFile", "spec": [ { "help": "Accepted extensions: `.jpg`, `.jpeg`, `.png`, `.webp` and `.gif`.", "name": "imageFilename", "type": "filename", "label": "Image Filename", "semantic": "file:name", "extension": [ "jpg", "jpeg", "png", "webp", "gif" ] }, { "name": "imageData", "type": "buffer", "label": "Image Data", "semantic": "file:data" } ], "type": "collection", "label": "Image" } ] } ], "mappable": false }, { "name": "imageDetail", "type": "select", "label": "Image Detail", "options": [ { "label": "Auto", "value": "auto", "default": true }, { "label": "High", "value": "high" }, { "label": "Low", "value": "low" } ], "advanced": true } ] }, { "label": "Assistant", "value": "assistant", "nested": [ { "help": "Text content of the message on behalf of the selected __Role__.", "name": "content", "type": "text", "label": "Text Content" } ] } ] }, "required": true } ], "type": "collection", "label": "Message" }, "type": "array", "label": "Messages", "required": true }, { "name": "response_format", "type": "select", "label": "Response Format", "validate": { "enum": [ "text", "json_object" ] } } ], "interface": [ { "name": "result", "type": "any", "label": "Result" }, { "name": "id", "type": "text", "label": "ID" }, { "name": "object", "type": "text", "label": "Object" }, { "name": "created", "type": "date", "label": "Created" }, { "name": "model", "type": "text", "label": "Model" }, { "name": "choices", "spec": { "spec": [ { "name": "text", "type": "text", "label": "Text" }, { "name": "index", "type": "number", "label": "Index" }, { "name": "logprobs", "type": "text", "label": "Log Probs" }, { "name": "finish_reason", "type": "text", "label": "Finish Reason" }, { "name": "message", "spec": [ { "name": "role", "type": "text", "label": "Role" }, { "name": "content", "type": "text", "label": "Content" }, { "name": "refusal", "type": "text", "label": "Refusal" } ], "type": "collection", "label": "Message" } ], "type": "collection" }, "type": "array", "label": "Choices" }, { "name": "usage", "spec": [ { "name": "prompt_tokens", "type": "number", "label": "Prompt Tokens" }, { "name": "completion_tokens", "type": "text", "label": "Completion Tokens" }, { "name": "total_tokens", "type": "number", "label": "Total Tokens" }, { "name": "prompt_tokens_details", "spec": [ { "name": "cached_tokens", "type": "uinteger", "label": "Cached Tokens" }, { "name": "text_tokens", "type": "uinteger", "label": "Text Tokens" }, { "name": "image_tokens", "type": "uinteger", "label": "Image Tokens" }, { "name": "audio_tokens", "type": "uinteger", "label": "Audio Tokens" } ], "type": "collection", "label": "Prompt Tokens Details" }, { "name": "completion_tokens_details", "spec": [ { "name": "reasoning_tokens", "type": "uinteger", "label": "Reasoning Tokens" }, { "name": "text_tokens", "type": "uinteger", "label": "Text Tokens" }, { "name": "audio_tokens", "type": "uinteger", "label": "Audio Tokens" } ], "type": "collection", "label": "Completion Tokens Details" } ], "type": "collection", "label": "Usage" }, { "name": "system_fingerprint", "type": "text", "label": "System Fingerprint" } ] } }, { "id": 10, "module": "elevenlabs:createTextToSpeech", "version": 1, "parameters": { "__IMTCONN__": 3705067 }, "mapper": { "text": "{{19.result}}", "model_id": "eleven_multilingual_v2", "voice_id": "kdikibstKceOhzZ8HRSW", "voice_settings": {} }, "metadata": { "designer": { "x": 1800, "y": 300 }, "restore": { "expect": { "model_id": { "mode": "chose", "label": "Eleven Multilingual v2 (eleven_multilingual_v2)" }, "voice_id": { "mode": "chose", "label": "professional/Ben van Sprundel" }, "optimize_streaming_latency": { "mode": "chose", "label": "Empty" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "elevenlabs" }, "label": "My ElevenLabs connection" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:elevenlabs", "label": "Connection", "required": true } ], "expect": [ { "name": "voice_id", "type": "select", "label": "Voice", "required": true }, { "name": "model_id", "type": "select", "label": "Model", "required": true }, { "name": "text", "type": "text", "label": "Text", "required": true }, { "name": "voice_settings", "spec": [ { "name": "stability", "type": "number", "label": "Stability", "validate": { "max": 1, "min": 0 } }, { "name": "similarity_boost", "type": "number", "label": "Similarity Boost", "validate": { "max": 1, "min": 0 } } ], "type": "collection", "label": "Voice Settings" }, { "name": "optimize_streaming_latency", "type": "select", "label": "Optimize Streaming Latency", "validate": { "enum": [ "0", "1", "2", "3", "4" ] } } ] } }, { "id": 11, "module": "whatsapp-business-cloud:uploadMedia", "version": 1, "parameters": { "__IMTCONN__": 3362228 }, "mapper": { "data": "{{10.data}}", "fromId": "278982118641623", "filename": "{{10.fileName}}" }, "metadata": { "designer": { "x": 2100, "y": 300 }, "restore": { "expect": { "fromId": { "mode": "chose", "label": "Ben Erik Van S Ltda (+55 11 91195-7545)" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "whatsapp-business-cloud2" }, "label": "My WhatsApp Business Cloud connection (Ben)" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:whatsapp-business-cloud2", "label": "Connection", "required": true } ], "expect": [ { "mode": "edit", "name": "fromId", "type": "select", "label": "Sender ID", "required": true }, { "name": "filename", "type": "filename", "label": "File name", "required": true }, { "name": "data", "type": "buffer", "label": "Data", "required": true } ] } }, { "id": 12, "module": "whatsapp-business-cloud:sendMessage", "version": 1, "parameters": { "__IMTCONN__": 2882568 }, "mapper": { "to": "{{1.messages[].from}}", "type": "audio", "audio": { "id": "{{11.id}}" }, "fromId": "278982118641623" }, "metadata": { "designer": { "x": 2400, "y": 300 }, "restore": { "expect": { "type": { "label": "Audio" }, "fromId": { "mode": "chose", "label": "Ben Erik Van S Ltda (+55 11 91195-7545)" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "whatsapp-business-cloud2" }, "label": "API 2 (Ben)" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:whatsapp-business-cloud2", "label": "Connection", "required": true } ], "expect": [ { "type": "hidden" }, { "name": "fromId", "type": "select", "label": "Sender ID", "required": true }, { "name": "to", "type": "text", "label": "Receiver", "required": true }, { "name": "type", "type": "select", "label": "Message Type", "required": true, "validate": { "enum": [ "text", "image", "audio", "video", "document", "sticker", "location", "contacts", "interactive" ] } }, { "name": "audio", "spec": [ { "name": "id", "type": "text", "label": "Media ID" }, { "name": "link", "type": "url", "label": "Media URL" } ], "type": "collection", "label": "Audio" } ] } } ] } ] } ], "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": "us1.make.com" } }