{
  "schemaVersion": "2026.11",
  "publisher": "Zetaleap Power Platform Cloud APIs (https://zetaleap.com)",
  "templateSlug": "mt940-camt053-daily-bank-reconciliation",
  "displayName": "SWIFT MT940 & ISO 20022 CAMT.053 Bank Statement to Reconciled Excel & ERP",
  "category": "Finance & E-Invoice",
  "estimatedSetupMinutes": 4,
  "quickstart": {
    "step1_getFreeApiKey": "https://zetaleap.com/login",
    "step2_generateBearerToken": "https://zetaleap.com/profile",
    "step3_optionalCustomConnectorSwagger": "https://zetaleap.com/connectors",
    "step4_pasteHttpActionInPowerAutomate": "Open make.powerautomate.com -> Add an action -> HTTP (or import Zetaleap Custom Connector) -> Paste definition.actions.Zetaleap_Cloud_Action below."
  },
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "contentVersion": "1.0.0.0",
    "triggers": {
      "When_Business_Event_Occurs": {
        "type": "Metadata",
        "description": "Scheduled SFTP / Email Bank Statement Arrival (07:30 AM Daily)"
      }
    },
    "actions": {
      "Zetaleap_Cloud_Action": {
        "type": "Http",
        "inputs": {
          "method": "POST",
          "uri": "https://zetaleap.com/api/hub/bank-statement",
          "headers": {
            "Authorization": "Bearer zl_YOUR_API_KEY",
            "Content-Type": "application/json"
          },
          "body": {
            "statementText": "@{outputs('Get_SFTP_Statement_Text')?['body']}",
            "generateExcel": true
          }
        }
      }
    },
    "expectedDynamicOutputs": [
      "format",
      "accountIban",
      "openingBalance",
      "closingBalance",
      "isReconciled",
      "transactions[]",
      "excelBase64"
    ]
  }
}