{
  "schemaVersion": "2026.11",
  "publisher": "Zetaleap Power Platform Cloud APIs (https://zetaleap.com)",
  "templateSlug": "ubl-peppol-einvoice-xml-to-erp",
  "displayName": "Turkish GİB UBL-TR 2.1 & EU PEPPOL BIS 3.0 E-Invoice XML to ERP & HTML PDF",
  "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": "When an E-Invoice .xml lands in Shared Mailbox, SFTP, or Zetaleap Drive"
      }
    },
    "actions": {
      "Zetaleap_Cloud_Action": {
        "type": "Http",
        "inputs": {
          "method": "POST",
          "uri": "https://zetaleap.com/api/automation/einvoice-xml",
          "headers": {
            "Authorization": "Bearer zl_YOUR_API_KEY",
            "Content-Type": "application/json"
          },
          "body": {
            "xml": "@{base64ToString(items('Apply_to_each')?['contentBytes'])}"
          }
        }
      }
    },
    "expectedDynamicOutputs": [
      "invoiceId",
      "issueDate",
      "supplier.taxId",
      "payableAmount",
      "lines[]",
      "htmlPreview"
    ]
  }
}