{
  "openruna_format": "flow-graph-v1",
  "title": "Basic PDF Digital Sign Service",
  "slug": "basic-pdf-digital-sign-service",
  "source_filename": "1722_Webhook_Code_Automation_Webhook.json",
  "nodes": [
    {
      "id": "Validate Key Gen Params",
      "name": "Validate Key Gen Params",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Validate PDF Sign Params",
      "name": "Validate PDF Sign Params",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Validate PDF Upload",
      "name": "Validate PDF Upload",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Validate Key Upload",
      "name": "Validate Key Upload",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Generate Keys",
      "name": "Generate Keys",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Sign PDF",
      "name": "Sign PDF",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Prepare Success Response",
      "name": "Prepare Success Response",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Switch Operation",
      "name": "Switch Operation",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Switch Upload Type",
      "name": "Switch Upload Type",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Prepare input params",
      "name": "Prepare input params",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "set file path",
      "name": "set file path",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Convert PDF to File",
      "name": "Convert PDF to File",
      "integration": "convertToFile",
      "kind": "action"
    },
    {
      "id": "Write PDF File to Disk",
      "name": "Write PDF File to Disk",
      "integration": "readWriteFile",
      "kind": "action"
    },
    {
      "id": "Read PDF File from Disk",
      "name": "Read PDF File from Disk",
      "integration": "readWriteFile",
      "kind": "action"
    },
    {
      "id": "Convert PFX to File",
      "name": "Convert PFX to File",
      "integration": "convertToFile",
      "kind": "action"
    },
    {
      "id": "Write PFX File to Disk",
      "name": "Write PFX File to Disk",
      "integration": "readWriteFile",
      "kind": "action"
    },
    {
      "id": "Read PFX File from Disk",
      "name": "Read PFX File from Disk",
      "integration": "readWriteFile",
      "kind": "action"
    },
    {
      "id": "Check PDF file is OK",
      "name": "Check PDF file is OK",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Check PFX file is OK",
      "name": "Check PFX file is OK",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "check success",
      "name": "check success",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "set downlowd file info",
      "name": "set downlowd file info",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Read download file from Disk",
      "name": "Read download file from Disk",
      "integration": "readWriteFile",
      "kind": "action"
    },
    {
      "id": "API POST Endpoint",
      "name": "API POST Endpoint",
      "integration": "webhook",
      "kind": "trigger"
    },
    {
      "id": "API GET Endpoint",
      "name": "API GET Endpoint",
      "integration": "webhook",
      "kind": "trigger"
    },
    {
      "id": "POST Success Response",
      "name": "POST Success Response",
      "integration": "respondToWebhook",
      "kind": "action"
    },
    {
      "id": "POST Error Response",
      "name": "POST Error Response",
      "integration": "respondToWebhook",
      "kind": "action"
    },
    {
      "id": "GET Respond to Webhook",
      "name": "GET Respond to Webhook",
      "integration": "respondToWebhook",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "Sign PDF",
      "to": "check success"
    },
    {
      "from": "Generate Keys",
      "to": "check success"
    },
    {
      "from": "check success",
      "to": "Prepare Success Response"
    },
    {
      "from": "check success",
      "to": "POST Error Response"
    },
    {
      "from": "set file path",
      "to": "Switch Operation"
    },
    {
      "from": "API GET Endpoint",
      "to": "set file path"
    },
    {
      "from": "Switch Operation",
      "to": "Prepare input params"
    },
    {
      "from": "Switch Operation",
      "to": "Validate Key Gen Params"
    },
    {
      "from": "Switch Operation",
      "to": "Validate PDF Sign Params"
    },
    {
      "from": "Switch Operation",
      "to": "set downlowd file info"
    },
    {
      "from": "API POST Endpoint",
      "to": "set file path"
    },
    {
      "from": "Switch Upload Type",
      "to": "Validate PDF Upload"
    },
    {
      "from": "Switch Upload Type",
      "to": "Validate Key Upload"
    },
    {
      "from": "Convert PDF to File",
      "to": "Write PDF File to Disk"
    },
    {
      "from": "Convert PFX to File",
      "to": "Write PFX File to Disk"
    },
    {
      "from": "Validate Key Upload",
      "to": "Convert PFX to File"
    },
    {
      "from": "Validate PDF Upload",
      "to": "Convert PDF to File"
    },
    {
      "from": "Check PDF file is OK",
      "to": "check success"
    },
    {
      "from": "Check PFX file is OK",
      "to": "check success"
    },
    {
      "from": "Prepare input params",
      "to": "Switch Upload Type"
    },
    {
      "from": "Write PDF File to Disk",
      "to": "Read PDF File from Disk"
    },
    {
      "from": "Write PFX File to Disk",
      "to": "Read PFX File from Disk"
    },
    {
      "from": "set downlowd file info",
      "to": "Read download file from Disk"
    },
    {
      "from": "Read PDF File from Disk",
      "to": "Check PDF file is OK"
    },
    {
      "from": "Read PFX File from Disk",
      "to": "Check PFX file is OK"
    },
    {
      "from": "Validate Key Gen Params",
      "to": "Generate Keys"
    },
    {
      "from": "Prepare Success Response",
      "to": "POST Success Response"
    },
    {
      "from": "Validate PDF Sign Params",
      "to": "Sign PDF"
    },
    {
      "from": "Read download file from Disk",
      "to": "GET Respond to Webhook"
    }
  ]
}