{ "name": "OneClick demo", "flow": [ { "id": 3, "module": "gateway:CustomWebHook", "version": 1, "parameters": { "hook": 587694, "maxResults": 1 }, "mapper": {}, "metadata": { "designer": { "x": 0, "y": 450 }, "restore": { "parameters": { "hook": { "data": { "editable": "true" }, "label": "OneClick example" } } }, "parameters": [ { "name": "hook", "type": "hook:gateway-webhook", "label": "Webhook", "required": true }, { "name": "maxResults", "type": "number", "label": "Maximum number of results" } ], "interface": [ { "name": "resource", "type": "text" }, { "name": "view", "type": "text" }, { "name": "userId", "type": "text" }, { "name": "companyId", "type": "text" }, { "name": "selectedIds", "type": "text" }, { "name": "identifier", "type": "text" }, { "name": "__IMTHEADERS__", "spec": [ { "name": "name", "type": "text", "label": "Name" }, { "name": "value", "type": "text", "label": "Value" } ], "type": "array", "label": "Headers" } ] } }, { "id": 16, "module": "builtin:BasicRouter", "version": 1, "parameters": { "else": 0 }, "mapper": null, "metadata": { "designer": { "x": 300, "y": 450 } }, "routes": [ { "flow": [ { "id": 18, "module": "gateway:WebhookRespond", "version": 1, "parameters": {}, "filter": { "name": "Error", "conditions": [] }, "mapper": { "body": "Please check your credentials!", "status": "401", "headers": [] }, "metadata": { "designer": { "x": 600, "y": 0 }, "restore": { "expect": { "headers": { "mode": "chose" } } }, "expect": [ { "name": "status", "type": "uinteger", "label": "Status", "required": true, "validate": { "min": 100 } }, { "name": "body", "type": "any", "label": "Body" }, { "name": "headers", "spec": [ { "name": "key", "type": "text", "label": "Key", "required": true, "validate": { "max": 256 } }, { "name": "value", "type": "text", "label": "Value", "required": true, "validate": { "max": 4096 } } ], "type": "array", "label": "Custom headers", "validate": { "maxItems": 16 } } ] } } ] }, { "flow": [ { "id": 17, "module": "gateway:WebhookRespond", "version": 1, "parameters": {}, "filter": { "name": "Authorisation", "conditions": [ [ { "a": "{{get(map(3.`__IMTHEADERS__`; \"value\"; \"name\"; \"authorisation\"); 1)}}", "b": "123456", "o": "text:equal" } ] ] }, "mapper": { "body": "{\n\"message_type\": \"info\",\n\"message\": \"Scenario started successfully\"\n}", "status": "200", "headers": [] }, "metadata": { "designer": { "x": 600, "y": 600 }, "restore": { "expect": { "headers": { "mode": "chose" } } }, "expect": [ { "name": "status", "type": "uinteger", "label": "Status", "required": true, "validate": { "min": 100 } }, { "name": "body", "type": "any", "label": "Body" }, { "name": "headers", "spec": [ { "name": "key", "type": "text", "label": "Key", "required": true, "validate": { "max": 256 } }, { "name": "value", "type": "text", "label": "Value", "required": true, "validate": { "max": 4096 } } ], "type": "array", "label": "Custom headers", "validate": { "maxItems": 16 } } ] } }, { "id": 6, "module": "pipedrive:CreateNote", "version": 2, "parameters": { "__IMTCONN__": 1058090 }, "mapper": { "content": "OneClick says Hello!", "deal_id": "{{3.selectedIds}}" }, "metadata": { "designer": { "x": 900, "y": 600 }, "restore": { "parameters": { "__IMTCONN__": { "label": "Demo Professional", "data": { "scoped": "true", "connection": "pipedrive-apikey" } } }, "expect": { "pinned_to_deal_flag": { "mode": "chose" }, "pinned_to_organization_flag": { "mode": "chose" }, "pinned_to_person_flag": { "mode": "chose" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:pipedrive-auth,pipedrive-apikey", "label": "Connection", "required": true } ], "expect": [ { "name": "content", "type": "text", "label": "Content", "required": true }, { "name": "deal_id", "type": "number", "label": "Deal ID" }, { "name": "person_id", "type": "number", "label": "Person" }, { "name": "org_id", "type": "number", "label": "Organization" }, { "name": "add_time", "type": "date", "label": "Add time" }, { "name": "pinned_to_deal_flag", "type": "boolean", "label": "Pinned to deal flag" }, { "name": "pinned_to_organization_flag", "type": "boolean", "label": "Pinned to organization flag" }, { "name": "pinned_to_person_flag", "type": "boolean", "label": "Pinned to person flag" } ] }, "onerror": [ { "id": 25, "module": "http:ActionSendData", "version": 3, "parameters": { "handleErrors": false, "useNewZLibDeCompress": true }, "mapper": { "url": "https://app.theoneclick.io/api/trigger-message", "serializeUrl": false, "method": "post", "headers": [], "qs": [], "bodyType": "raw", "parseResponse": false, "authUser": "", "authPass": "", "timeout": "", "shareCookies": false, "ca": "", "rejectUnauthorized": true, "followRedirect": true, "useQuerystring": false, "gzip": true, "useMtls": false, "contentType": "application/json", "data": "{\n\"message_type\": \"error\",\n\"message\": \"That didn't work\",\n\"event_id\": \"{{3.event_id}}\"\n}", "followAllRedirects": false }, "metadata": { "designer": { "x": 1200, "y": 900 }, "restore": { "expect": { "method": { "mode": "chose", "label": "POST" }, "headers": { "mode": "chose" }, "qs": { "mode": "chose" }, "bodyType": { "label": "Raw" }, "contentType": { "label": "JSON (application/json)" } } }, "parameters": [ { "name": "handleErrors", "type": "boolean", "label": "Evaluate all states as errors (except for 2xx and 3xx )", "required": true }, { "name": "useNewZLibDeCompress", "type": "hidden" } ], "expect": [ { "name": "url", "type": "url", "label": "URL", "required": true }, { "name": "serializeUrl", "type": "boolean", "label": "Serialize URL", "required": true }, { "name": "method", "type": "select", "label": "Method", "required": true, "validate": { "enum": [ "get", "head", "post", "put", "patch", "delete", "options" ] } }, { "name": "headers", "type": "array", "label": "Headers", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "qs", "type": "array", "label": "Query String", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "bodyType", "type": "select", "label": "Body type", "validate": { "enum": [ "raw", "x_www_form_urlencoded", "multipart_form_data" ] } }, { "name": "parseResponse", "type": "boolean", "label": "Parse response", "required": true }, { "name": "authUser", "type": "text", "label": "User name" }, { "name": "authPass", "type": "password", "label": "Password" }, { "name": "timeout", "type": "uinteger", "label": "Timeout", "validate": { "max": 300, "min": 1 } }, { "name": "shareCookies", "type": "boolean", "label": "Share cookies with other HTTP modules", "required": true }, { "name": "ca", "type": "cert", "label": "Self-signed certificate" }, { "name": "rejectUnauthorized", "type": "boolean", "label": "Reject connections that are using unverified (self-signed) certificates", "required": true }, { "name": "followRedirect", "type": "boolean", "label": "Follow redirect", "required": true }, { "name": "useQuerystring", "type": "boolean", "label": "Disable serialization of multiple same query string keys as arrays", "required": true }, { "name": "gzip", "type": "boolean", "label": "Request compressed content", "required": true }, { "name": "useMtls", "type": "boolean", "label": "Use Mutual TLS", "required": true }, { "name": "contentType", "type": "select", "label": "Content type", "validate": { "enum": [ "text/plain", "application/json", "application/xml", "text/xml", "text/html", "custom" ] } }, { "name": "data", "type": "buffer", "label": "Request content" }, { "name": "followAllRedirects", "type": "boolean", "label": "Follow all redirect", "required": true } ] } }, { "id": 24, "module": "builtin:Break", "version": 1, "parameters": {}, "mapper": { "retry": true, "count": "3", "interval": "15" }, "metadata": { "designer": { "x": 1500, "y": 900 }, "restore": { "expect": { "retry": { "mode": "chose" } } }, "expect": [ { "name": "retry", "type": "boolean", "label": "Automatically complete execution", "required": true }, { "name": "count", "type": "uinteger", "label": "Number of attempts", "validate": { "min": 1, "max": 10000 }, "required": true }, { "name": "interval", "type": "uinteger", "label": "Interval between attempts", "validate": { "min": 1, "max": 44640 }, "required": true } ] } } ] }, { "id": 20, "module": "http:ActionSendData", "version": 3, "parameters": { "handleErrors": false, "useNewZLibDeCompress": true }, "mapper": { "url": "https://app.theoneclick.io/api/trigger-message", "serializeUrl": false, "method": "post", "headers": [], "qs": [], "bodyType": "raw", "parseResponse": false, "authUser": "", "authPass": "", "timeout": "", "shareCookies": false, "ca": "", "rejectUnauthorized": true, "followRedirect": true, "useQuerystring": false, "gzip": true, "useMtls": false, "contentType": "application/json", "data": "{\n\"message_type\": \"info\",\n\"message\": \"Note created\",\n\"event_id\": \"{{3.event_id}}\"\n}", "followAllRedirects": false }, "metadata": { "designer": { "x": 1200, "y": 450 }, "restore": { "expect": { "method": { "mode": "chose", "label": "POST" }, "headers": { "mode": "chose" }, "qs": { "mode": "chose" }, "bodyType": { "label": "Raw" }, "contentType": { "label": "JSON (application/json)" } } }, "parameters": [ { "name": "handleErrors", "type": "boolean", "label": "Evaluate all states as errors (except for 2xx and 3xx )", "required": true }, { "name": "useNewZLibDeCompress", "type": "hidden" } ], "expect": [ { "name": "url", "type": "url", "label": "URL", "required": true }, { "name": "serializeUrl", "type": "boolean", "label": "Serialize URL", "required": true }, { "name": "method", "type": "select", "label": "Method", "required": true, "validate": { "enum": [ "get", "head", "post", "put", "patch", "delete", "options" ] } }, { "name": "headers", "type": "array", "label": "Headers", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "qs", "type": "array", "label": "Query String", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "bodyType", "type": "select", "label": "Body type", "validate": { "enum": [ "raw", "x_www_form_urlencoded", "multipart_form_data" ] } }, { "name": "parseResponse", "type": "boolean", "label": "Parse response", "required": true }, { "name": "authUser", "type": "text", "label": "User name" }, { "name": "authPass", "type": "password", "label": "Password" }, { "name": "timeout", "type": "uinteger", "label": "Timeout", "validate": { "max": 300, "min": 1 } }, { "name": "shareCookies", "type": "boolean", "label": "Share cookies with other HTTP modules", "required": true }, { "name": "ca", "type": "cert", "label": "Self-signed certificate" }, { "name": "rejectUnauthorized", "type": "boolean", "label": "Reject connections that are using unverified (self-signed) certificates", "required": true }, { "name": "followRedirect", "type": "boolean", "label": "Follow redirect", "required": true }, { "name": "useQuerystring", "type": "boolean", "label": "Disable serialization of multiple same query string keys as arrays", "required": true }, { "name": "gzip", "type": "boolean", "label": "Request compressed content", "required": true }, { "name": "useMtls", "type": "boolean", "label": "Use Mutual TLS", "required": true }, { "name": "contentType", "type": "select", "label": "Content type", "validate": { "enum": [ "text/plain", "application/json", "application/xml", "text/xml", "text/html", "custom" ] } }, { "name": "data", "type": "buffer", "label": "Request content" }, { "name": "followAllRedirects", "type": "boolean", "label": "Follow all redirect", "required": true } ] } }, { "id": 14, "module": "pipedrive:CreateActivity", "version": 2, "parameters": { "__IMTCONN__": 1058090 }, "mapper": { "type": "meeting", "deal_id": "{{3.selectedIds}}", "subject": "Remember to rate OneClick in Pipedrive Marketplace!" }, "metadata": { "designer": { "x": 1500, "y": 450 }, "restore": { "expect": { "done": { "mode": "chose" }, "type": { "mode": "chose", "label": "Meeting" }, "user_id": { "mode": "chose" }, "participants": { "mode": "chose" } }, "parameters": { "__IMTCONN__": { "data": { "scoped": "true", "connection": "pipedrive-apikey" }, "label": "Demo Professional" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:pipedrive-auth,pipedrive-apikey", "label": "Connection", "required": true } ], "expect": [ { "name": "subject", "type": "text", "label": "Subject", "required": true }, { "name": "done", "type": "boolean", "label": "Done" }, { "name": "type", "type": "select", "label": "Type", "required": true }, { "name": "due_d_t", "type": "date", "label": "Due date and time" }, { "name": "duration", "type": "time", "label": "Duration" }, { "name": "user_id", "type": "select", "label": "User" }, { "name": "deal_id", "type": "number", "label": "Deal" }, { "name": "location", "type": "text", "label": "Location" }, { "name": "person_id", "type": "number", "label": "Person" }, { "name": "org_id", "type": "number", "label": "Organization" }, { "name": "note", "type": "text", "label": "Note" }, { "name": "participants", "spec": [ { "name": "person_id", "type": "number", "label": "Person ID", "required": true }, { "name": "primary_flag", "type": "boolean", "label": "Primary" } ], "type": "array", "label": "Participants" } ] }, "onerror": [ { "id": 27, "module": "http:ActionSendData", "version": 3, "parameters": { "handleErrors": false, "useNewZLibDeCompress": true }, "mapper": { "url": "https://app.theoneclick.io/api/trigger-message", "serializeUrl": false, "method": "post", "headers": [], "qs": [], "bodyType": "raw", "parseResponse": false, "authUser": "", "authPass": "", "timeout": "", "shareCookies": false, "ca": "", "rejectUnauthorized": true, "followRedirect": true, "useQuerystring": false, "gzip": true, "useMtls": false, "contentType": "application/json", "data": "{\n\"message_type\": \"error\",\n\"message\": \"That didn't work\",\n\"event_id\": \"{{3.event_id}}\"\n}", "followAllRedirects": false }, "metadata": { "designer": { "x": 1800, "y": 600 }, "restore": { "expect": { "method": { "mode": "chose", "label": "POST" }, "headers": { "mode": "chose" }, "qs": { "mode": "chose" }, "bodyType": { "label": "Raw" }, "contentType": { "label": "JSON (application/json)" } } }, "parameters": [ { "name": "handleErrors", "type": "boolean", "label": "Evaluate all states as errors (except for 2xx and 3xx )", "required": true }, { "name": "useNewZLibDeCompress", "type": "hidden" } ], "expect": [ { "name": "url", "type": "url", "label": "URL", "required": true }, { "name": "serializeUrl", "type": "boolean", "label": "Serialize URL", "required": true }, { "name": "method", "type": "select", "label": "Method", "required": true, "validate": { "enum": [ "get", "head", "post", "put", "patch", "delete", "options" ] } }, { "name": "headers", "type": "array", "label": "Headers", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "qs", "type": "array", "label": "Query String", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "bodyType", "type": "select", "label": "Body type", "validate": { "enum": [ "raw", "x_www_form_urlencoded", "multipart_form_data" ] } }, { "name": "parseResponse", "type": "boolean", "label": "Parse response", "required": true }, { "name": "authUser", "type": "text", "label": "User name" }, { "name": "authPass", "type": "password", "label": "Password" }, { "name": "timeout", "type": "uinteger", "label": "Timeout", "validate": { "max": 300, "min": 1 } }, { "name": "shareCookies", "type": "boolean", "label": "Share cookies with other HTTP modules", "required": true }, { "name": "ca", "type": "cert", "label": "Self-signed certificate" }, { "name": "rejectUnauthorized", "type": "boolean", "label": "Reject connections that are using unverified (self-signed) certificates", "required": true }, { "name": "followRedirect", "type": "boolean", "label": "Follow redirect", "required": true }, { "name": "useQuerystring", "type": "boolean", "label": "Disable serialization of multiple same query string keys as arrays", "required": true }, { "name": "gzip", "type": "boolean", "label": "Request compressed content", "required": true }, { "name": "useMtls", "type": "boolean", "label": "Use Mutual TLS", "required": true }, { "name": "contentType", "type": "select", "label": "Content type", "validate": { "enum": [ "text/plain", "application/json", "application/xml", "text/xml", "text/html", "custom" ] } }, { "name": "data", "type": "buffer", "label": "Request content" }, { "name": "followAllRedirects", "type": "boolean", "label": "Follow all redirect", "required": true } ] } }, { "id": 26, "module": "builtin:Break", "version": 1, "parameters": {}, "mapper": { "retry": true, "count": "3", "interval": "15" }, "metadata": { "designer": { "x": 2100, "y": 600 }, "restore": { "expect": { "retry": { "mode": "chose" } } }, "expect": [ { "name": "retry", "type": "boolean", "label": "Automatically complete execution", "required": true }, { "name": "count", "type": "uinteger", "label": "Number of attempts", "validate": { "min": 1, "max": 10000 }, "required": true }, { "name": "interval", "type": "uinteger", "label": "Interval between attempts", "validate": { "min": 1, "max": 44640 }, "required": true } ] } } ] }, { "id": 21, "module": "http:ActionSendData", "version": 3, "parameters": { "handleErrors": false, "useNewZLibDeCompress": true }, "mapper": { "url": "https://app.theoneclick.io/api/trigger-message", "serializeUrl": false, "method": "post", "headers": [], "qs": [], "bodyType": "raw", "parseResponse": false, "authUser": "", "authPass": "", "timeout": "", "shareCookies": false, "ca": "", "rejectUnauthorized": true, "followRedirect": true, "useQuerystring": false, "gzip": true, "useMtls": false, "contentType": "application/json", "data": "{\n\"message_type\": \"success\",\n\"message\": \"Activity created, all done!\",\n\"event_id\": \"{{3.event_id}}\"\n}", "followAllRedirects": false }, "metadata": { "designer": { "x": 1800, "y": 300 }, "restore": { "expect": { "method": { "mode": "chose", "label": "POST" }, "headers": { "mode": "chose" }, "qs": { "mode": "chose" }, "bodyType": { "label": "Raw" }, "contentType": { "label": "JSON (application/json)" } } }, "parameters": [ { "name": "handleErrors", "type": "boolean", "label": "Evaluate all states as errors (except for 2xx and 3xx )", "required": true }, { "name": "useNewZLibDeCompress", "type": "hidden" } ], "expect": [ { "name": "url", "type": "url", "label": "URL", "required": true }, { "name": "serializeUrl", "type": "boolean", "label": "Serialize URL", "required": true }, { "name": "method", "type": "select", "label": "Method", "required": true, "validate": { "enum": [ "get", "head", "post", "put", "patch", "delete", "options" ] } }, { "name": "headers", "type": "array", "label": "Headers", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "qs", "type": "array", "label": "Query String", "spec": [ { "name": "name", "label": "Name", "type": "text", "required": true }, { "name": "value", "label": "Value", "type": "text" } ] }, { "name": "bodyType", "type": "select", "label": "Body type", "validate": { "enum": [ "raw", "x_www_form_urlencoded", "multipart_form_data" ] } }, { "name": "parseResponse", "type": "boolean", "label": "Parse response", "required": true }, { "name": "authUser", "type": "text", "label": "User name" }, { "name": "authPass", "type": "password", "label": "Password" }, { "name": "timeout", "type": "uinteger", "label": "Timeout", "validate": { "max": 300, "min": 1 } }, { "name": "shareCookies", "type": "boolean", "label": "Share cookies with other HTTP modules", "required": true }, { "name": "ca", "type": "cert", "label": "Self-signed certificate" }, { "name": "rejectUnauthorized", "type": "boolean", "label": "Reject connections that are using unverified (self-signed) certificates", "required": true }, { "name": "followRedirect", "type": "boolean", "label": "Follow redirect", "required": true }, { "name": "useQuerystring", "type": "boolean", "label": "Disable serialization of multiple same query string keys as arrays", "required": true }, { "name": "gzip", "type": "boolean", "label": "Request compressed content", "required": true }, { "name": "useMtls", "type": "boolean", "label": "Use Mutual TLS", "required": true }, { "name": "contentType", "type": "select", "label": "Content type", "validate": { "enum": [ "text/plain", "application/json", "application/xml", "text/xml", "text/html", "custom" ] } }, { "name": "data", "type": "buffer", "label": "Request content" }, { "name": "followAllRedirects", "type": "boolean", "label": "Follow all redirect", "required": true } ] } } ] } ] } ], "metadata": { "instant": true, "version": 1, "scenario": { "roundtrips": 1, "maxErrors": 3, "autoCommit": true, "autoCommitTriggerLast": true, "sequential": false, "confidential": false, "dataloss": false, "dlq": true, "freshVariables": false }, "designer": { "orphans": [] }, "zone": "eu1.make.com" } }