{
  "name": "Vouli IQ — actions (create and update records through the API)",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "hook": null,
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        }
      }
    },
    {
      "id": 2,
      "module": "builtin:BasicRouter",
      "version": 1,
      "mapper": null,
      "metadata": {
        "designer": {
          "x": 150,
          "y": 0
        }
      },
      "routes": [
        {
          "flow": [
            {
              "id": 11,
              "module": "json:TransformToJSON",
              "version": 1,
              "parameters": {
                "space": ""
              },
              "filter": {
                "name": "action = create_risk and the relay token matches",
                "conditions": [
                  [
                    {
                      "a": "{{1.action}}",
                      "b": "create_risk",
                      "o": "text:equal"
                    },
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:equal"
                    }
                  ]
                ]
              },
              "mapper": {
                "object": "{{1.body}}"
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": -450
                }
              }
            },
            {
              "id": 12,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {
                "handleErrors": false,
                "useNewZLibDeCompress": true
              },
              "mapper": {
                "url": "https://www.vouliiq.com/api/v1/risks",
                "serializeUrl": false,
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer PASTE_YOUR_vk_live_API_KEY_HERE"
                  },
                  {
                    "name": "Vouli-Version",
                    "value": "2026-09-12"
                  },
                  {
                    "name": "Idempotency-Key",
                    "value": "make-create_risk-{{sha256(11.json + \"|\" + 1.id + \"|\" + 1.reference)}}"
                  },
                  {
                    "name": "Accept",
                    "value": "application/json"
                  }
                ],
                "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": "{{11.json}}",
                "followAllRedirects": false
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": -450
                }
              }
            },
            {
              "id": 13,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "mapper": {
                "status": "{{12.statusCode}}",
                "body": "{{12.data}}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": -450
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 21,
              "module": "json:TransformToJSON",
              "version": 1,
              "parameters": {
                "space": ""
              },
              "filter": {
                "name": "action = update_risk and the relay token matches",
                "conditions": [
                  [
                    {
                      "a": "{{1.action}}",
                      "b": "update_risk",
                      "o": "text:equal"
                    },
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:equal"
                    }
                  ]
                ]
              },
              "mapper": {
                "object": "{{1.body}}"
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": -300
                }
              }
            },
            {
              "id": 22,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {
                "handleErrors": false,
                "useNewZLibDeCompress": true
              },
              "mapper": {
                "url": "https://www.vouliiq.com/api/v1/risks/{{encodeURL(1.id)}}",
                "serializeUrl": false,
                "method": "patch",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer PASTE_YOUR_vk_live_API_KEY_HERE"
                  },
                  {
                    "name": "Vouli-Version",
                    "value": "2026-09-12"
                  },
                  {
                    "name": "Idempotency-Key",
                    "value": "make-update_risk-{{sha256(21.json + \"|\" + 1.id + \"|\" + 1.reference)}}"
                  },
                  {
                    "name": "Accept",
                    "value": "application/json"
                  }
                ],
                "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": "{{21.json}}",
                "followAllRedirects": false
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": -300
                }
              }
            },
            {
              "id": 23,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "mapper": {
                "status": "{{22.statusCode}}",
                "body": "{{22.data}}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": -300
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 31,
              "module": "json:TransformToJSON",
              "version": 1,
              "parameters": {
                "space": ""
              },
              "filter": {
                "name": "action = create_incident and the relay token matches",
                "conditions": [
                  [
                    {
                      "a": "{{1.action}}",
                      "b": "create_incident",
                      "o": "text:equal"
                    },
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:equal"
                    }
                  ]
                ]
              },
              "mapper": {
                "object": "{{1.body}}"
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": -150
                }
              }
            },
            {
              "id": 32,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {
                "handleErrors": false,
                "useNewZLibDeCompress": true
              },
              "mapper": {
                "url": "https://www.vouliiq.com/api/v1/incidents",
                "serializeUrl": false,
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer PASTE_YOUR_vk_live_API_KEY_HERE"
                  },
                  {
                    "name": "Vouli-Version",
                    "value": "2026-09-12"
                  },
                  {
                    "name": "Idempotency-Key",
                    "value": "make-create_incident-{{sha256(31.json + \"|\" + 1.id + \"|\" + 1.reference)}}"
                  },
                  {
                    "name": "Accept",
                    "value": "application/json"
                  }
                ],
                "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": "{{31.json}}",
                "followAllRedirects": false
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": -150
                }
              }
            },
            {
              "id": 33,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "mapper": {
                "status": "{{32.statusCode}}",
                "body": "{{32.data}}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": -150
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 41,
              "module": "json:TransformToJSON",
              "version": 1,
              "parameters": {
                "space": ""
              },
              "filter": {
                "name": "action = update_incident and the relay token matches",
                "conditions": [
                  [
                    {
                      "a": "{{1.action}}",
                      "b": "update_incident",
                      "o": "text:equal"
                    },
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:equal"
                    }
                  ]
                ]
              },
              "mapper": {
                "object": "{{1.body}}"
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": 0
                }
              }
            },
            {
              "id": 42,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {
                "handleErrors": false,
                "useNewZLibDeCompress": true
              },
              "mapper": {
                "url": "https://www.vouliiq.com/api/v1/incidents/{{encodeURL(1.id)}}",
                "serializeUrl": false,
                "method": "patch",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer PASTE_YOUR_vk_live_API_KEY_HERE"
                  },
                  {
                    "name": "Vouli-Version",
                    "value": "2026-09-12"
                  },
                  {
                    "name": "Idempotency-Key",
                    "value": "make-update_incident-{{sha256(41.json + \"|\" + 1.id + \"|\" + 1.reference)}}"
                  },
                  {
                    "name": "Accept",
                    "value": "application/json"
                  }
                ],
                "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": "{{41.json}}",
                "followAllRedirects": false
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": 0
                }
              }
            },
            {
              "id": 43,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "mapper": {
                "status": "{{42.statusCode}}",
                "body": "{{42.data}}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": 0
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 51,
              "module": "json:TransformToJSON",
              "version": 1,
              "parameters": {
                "space": ""
              },
              "filter": {
                "name": "action = add_vendor and the relay token matches",
                "conditions": [
                  [
                    {
                      "a": "{{1.action}}",
                      "b": "add_vendor",
                      "o": "text:equal"
                    },
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:equal"
                    }
                  ]
                ]
              },
              "mapper": {
                "object": "{{1.body}}"
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": 150
                }
              }
            },
            {
              "id": 52,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {
                "handleErrors": false,
                "useNewZLibDeCompress": true
              },
              "mapper": {
                "url": "https://www.vouliiq.com/api/v1/vendor/inventory",
                "serializeUrl": false,
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer PASTE_YOUR_vk_live_API_KEY_HERE"
                  },
                  {
                    "name": "Vouli-Version",
                    "value": "2026-09-12"
                  },
                  {
                    "name": "Idempotency-Key",
                    "value": "make-add_vendor-{{sha256(51.json + \"|\" + 1.id + \"|\" + 1.reference)}}"
                  },
                  {
                    "name": "Accept",
                    "value": "application/json"
                  }
                ],
                "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": "{{51.json}}",
                "followAllRedirects": false
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": 150
                }
              }
            },
            {
              "id": 53,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "mapper": {
                "status": "{{52.statusCode}}",
                "body": "{{52.data}}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": 150
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 61,
              "module": "json:TransformToJSON",
              "version": 1,
              "parameters": {
                "space": ""
              },
              "filter": {
                "name": "action = record_kpi_actual and the relay token matches",
                "conditions": [
                  [
                    {
                      "a": "{{1.action}}",
                      "b": "record_kpi_actual",
                      "o": "text:equal"
                    },
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:equal"
                    }
                  ]
                ]
              },
              "mapper": {
                "object": "{{1.body}}"
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": 300
                }
              }
            },
            {
              "id": 62,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {
                "handleErrors": false,
                "useNewZLibDeCompress": true
              },
              "mapper": {
                "url": "https://www.vouliiq.com/api/v1/kpis/checkins",
                "serializeUrl": false,
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer PASTE_YOUR_vk_live_API_KEY_HERE"
                  },
                  {
                    "name": "Vouli-Version",
                    "value": "2026-09-12"
                  },
                  {
                    "name": "Idempotency-Key",
                    "value": "make-record_kpi_actual-{{sha256(61.json + \"|\" + 1.id + \"|\" + 1.reference)}}"
                  },
                  {
                    "name": "Accept",
                    "value": "application/json"
                  }
                ],
                "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": "{\"checkins\":[{{61.json}}]}",
                "followAllRedirects": false
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": 300
                }
              }
            },
            {
              "id": 63,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "mapper": {
                "status": "{{62.statusCode}}",
                "body": "{{62.data}}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": 300
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 90,
              "module": "gateway:WebhookRespond",
              "version": 1,
              "parameters": {},
              "filter": {
                "name": "the relay token does not match",
                "conditions": [
                  [
                    {
                      "a": "{{get(map(1.`__IMTHEADERS__`; \"value\"; \"name\"; \"x-vouli-relay-token\"); 1)}}",
                      "b": "PASTE_A_LONG_RANDOM_RELAY_TOKEN_HERE",
                      "o": "text:notequal"
                    }
                  ]
                ]
              },
              "mapper": {
                "status": "401",
                "body": "{\"error\":\"invalid relay token\"}",
                "headers": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ]
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": 450
                }
              }
            }
          ]
        }
      ]
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "confidential": true,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "eu1.make.com"
  }
}
