{
    "name": "Jira Integration",
    "flow": [
        {
            "id": 1,
            "module": "gateway:CustomWebHook",
            "version": 1,
            "parameters": {
                "hook": 538937,
                "maxResults": 1
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "hook": {
                            "data": {
                                "editable": "true"
                            },
                            "label": "Jira Integration"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "hook",
                        "type": "hook:gateway-webhook",
                        "label": "Webhook",
                        "required": true
                    },
                    {
                        "name": "maxResults",
                        "type": "number",
                        "label": "Maximum number of results"
                    }
                ]
            }
        },
        {
            "id": 12,
            "module": "util:SetVariables",
            "version": 1,
            "parameters": {},
            "mapper": {
                "variables": [
                    {
                        "name": "testCaseName",
                        "value": "{{replace(replace(1.data.testCase.name; \"\"\"\"; \"\\\"\"\"); \"\\n\"; )}}"
                    },
                    {
                        "name": "testRunName",
                        "value": "{{replace(replace(1.data.testRun.name; \"\"\"\"; \"\\\"\"\"); \"\\n\"; )}}"
                    },
                    {
                        "name": "testResultComments",
                        "value": "{{if(length(trim(1.data.comments)) > 0; replace(1.data.comments; newline; space); space)}}"
                    }
                ],
                "scope": "execution"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "variables": {
                            "items": [
                                null,
                                null,
                                null
                            ]
                        },
                        "scope": {
                            "label": "One execution"
                        }
                    }
                },
                "expect": [
                    {
                        "name": "variables",
                        "type": "array",
                        "label": "Variables",
                        "spec": [
                            {
                                "name": "name",
                                "label": "Variable name",
                                "type": "text",
                                "required": true
                            },
                            {
                                "name": "value",
                                "label": "Variable value",
                                "type": "any"
                            }
                        ]
                    },
                    {
                        "name": "scope",
                        "type": "select",
                        "label": "Variable lifetime",
                        "required": true,
                        "validate": {
                            "enum": [
                                "roundtrip",
                                "execution"
                            ]
                        }
                    }
                ],
                "interface": [
                    {
                        "name": "testCaseName",
                        "label": "testCaseName",
                        "type": "any"
                    },
                    {
                        "name": "testRunName",
                        "label": "testRunName",
                        "type": "any"
                    },
                    {
                        "name": "testResultComments",
                        "label": "testResultComments",
                        "type": "any"
                    }
                ]
            }
        },
        {
            "id": 11,
            "module": "jira:universal",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 1052630
            },
            "mapper": {
                "url": "/3/issue",
                "method": "POST",
                "headers": [
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "body": "{\n   \"fields\": {\n       \"project\":\n       {\n          \"key\": \"{{1.data.project.externalId}}\"\n       },\n       \"summary\": \"FAILED: {{12.testCaseName}}\",\n       \"description\": {\n  \"version\": 1,\n  \"type\": \"doc\",\n  \"content\": [\n    {\n      \"type\": \"panel\",\n      \"attrs\": {\n        \"panelType\": \"error\"\n      },\n      \"content\": [\n        {\n          \"type\": \"paragraph\",\n          \"content\": [\n            {\n              \"type\": \"text\",\n              \"text\": \"Tuskr Test Case Marked as Failed\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"type\": \"table\",\n      \"attrs\": {\n        \"isNumberColumnEnabled\": false,\n        \"layout\": \"default\",\n        \"localId\": \"be4f192e-7f8e-404e-aea4-988992780c03\"\n      },\n      \"content\": [\n        {\n          \"type\": \"tableRow\",\n          \"content\": [\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"Test Case Name\"\n                    }\n                  ]\n                }\n              ]\n            },\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"{{12.testCaseName}}\",\n                      \"marks\": [\n                        {\n                          \"type\": \"link\",\n                          \"attrs\": {\n                            \"href\": \"{{1.data.testCase.url}}\"\n                          }\n                        }\n                      ]\n                    }\n                  ]\n                }\n              ]\n            }\n          ]\n        },\n        {\n          \"type\": \"tableRow\",\n          \"content\": [\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"Test Run Name\"\n                    }\n                  ]\n                }\n              ]\n            },\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"{{12.testRunName}}\",\n                      \"marks\": [\n                        {\n                          \"type\": \"link\",\n                          \"attrs\": {\n                            \"href\": \"{{1.data.testRun.url}}\"\n                          }\n                        }\n                      ]\n                    }\n                  ]\n                }\n              ]\n            }\n          ]\n        },\n        {\n          \"type\": \"tableRow\",\n          \"content\": [\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"Created By\"\n                    }\n                  ]\n                }\n              ]\n            },\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"{{1.data.createdBy.fullName}}\"\n                    }\n                  ]\n                }\n              ]\n            }\n          ]\n        },\n        {\n          \"type\": \"tableRow\",\n          \"content\": [\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"Comments\"\n                    }\n                  ]\n                }\n              ]\n            },\n            {\n              \"type\": \"tableCell\",\n              \"attrs\": {},\n              \"content\": [\n                {\n                  \"type\": \"paragraph\",\n                  \"content\": [\n                    {\n                      \"type\": \"text\",\n                      \"text\": \"{{12.testResultComments}}\"\n                    }\n                  ]\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"type\": \"heading\",\n      \"attrs\": {\n        \"level\": 5\n      },\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"#DO_NOT_REMOVE: {{1.data.testCase.id}}: {{1.data.testRun.id}}#\",\n          \"marks\": [\n            {\n              \"type\": \"textColor\",\n              \"attrs\": {\n                \"color\": \"#97a0af\"\n              }\n            }\n          ]\n        }\n      ]\n    }\n  ]\n},\n\n       \"issuetype\": {\n          \"name\": \"Task\"\n         }  \n\n     }\n}"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "__IMTCONN__": {
                            "label": "My Jira Cloud Platform connection (Shubham Kakkad)",
                            "data": {
                                "scoped": "true",
                                "connection": "jira"
                            }
                        }
                    },
                    "expect": {
                        "method": {
                            "mode": "chose",
                            "label": "POST"
                        },
                        "headers": {
                            "mode": "chose",
                            "items": [
                                null
                            ]
                        },
                        "qs": {
                            "mode": "chose"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:jira",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "url",
                        "type": "text",
                        "label": "URL",
                        "required": true
                    },
                    {
                        "name": "method",
                        "type": "select",
                        "label": "Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "GET",
                                "POST",
                                "PUT",
                                "PATCH",
                                "DELETE"
                            ]
                        }
                    },
                    {
                        "name": "headers",
                        "type": "array",
                        "label": "Headers",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ]
                    },
                    {
                        "name": "qs",
                        "type": "array",
                        "label": "Query String",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ]
                    },
                    {
                        "name": "body",
                        "type": "any",
                        "label": "Body"
                    },
                    {
                        "name": "url",
                        "type": "text",
                        "label": "URL",
                        "required": true
                    },
                    {
                        "name": "method",
                        "type": "select",
                        "label": "Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "GET",
                                "POST",
                                "PUT",
                                "PATCH",
                                "DELETE"
                            ]
                        }
                    },
                    {
                        "name": "headers",
                        "type": "array",
                        "label": "Headers",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ]
                    },
                    {
                        "name": "qs",
                        "type": "array",
                        "label": "Query String",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ]
                    },
                    {
                        "name": "body",
                        "type": "any",
                        "label": "Body"
                    },
                    {
                        "name": "url",
                        "type": "text",
                        "label": "URL",
                        "required": true
                    },
                    {
                        "name": "method",
                        "type": "select",
                        "label": "Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "GET",
                                "POST",
                                "PUT",
                                "PATCH",
                                "DELETE"
                            ]
                        }
                    },
                    {
                        "name": "headers",
                        "type": "array",
                        "label": "Headers",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ]
                    },
                    {
                        "name": "qs",
                        "type": "array",
                        "label": "Query String",
                        "spec": [
                            {
                                "name": "key",
                                "type": "text",
                                "label": "Key"
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value"
                            }
                        ]
                    },
                    {
                        "name": "body",
                        "type": "any",
                        "label": "Body"
                    }
                ]
            }
        },
        {
            "id": 19,
            "module": "gateway:WebhookRespond",
            "version": 1,
            "parameters": {},
            "mapper": {
                "body": "{\"issueIds\":\"{{11.body.key}}\"}",
                "status": "{{11.statusCode}}",
                "headers": []
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "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
                        }
                    }
                ],
                "advanced": true
            }
        }
    ],
    "metadata": {
        "instant": true,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "eu1.make.com"
    }
}