{
  "name": "bimetrics · PDF aus Google Drive mit nativer App übertragen (Einrichtung erforderlich)",
  "flow": [
    {
      "id": 6,
      "module": "google-drive:watchFilesInAFolder",
      "version": 4,
      "parameters": {
        "limit": 1,
        "select": "create",
        "folderId": "/REPLACE_WITH_DRIVE_FOLDER_ID",
        "mimeType": "all",
        "destination": "drive"
      },
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        }
      }
    },
    {
      "id": 3,
      "module": "google-drive:getAFile",
      "version": 4,
      "parameters": {},
      "mapper": {
        "file": "{{6.id}}",
        "select": "map",
        "formatDrawings": "image/jpeg",
        "formatDocuments": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        "formatSpreadsheets": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        "formatPresentations": "application/vnd.openxmlformats-officedocument.presentationml.presentation"
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0
        }
      }
    },
    {
      "id": 4,
      "module": "app#bimetrics-2runzh:uploadReceipt",
      "version": 1,
      "parameters": {},
      "mapper": {
        "fileName": "{{3.name}}",
        "data": "{{3.data}}",
        "uploadRequestId": "make-drive-{{6.id}}"
      },
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:app#bimetrics-2runzh",
            "label": "Connection",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "fileName",
            "type": "filename",
            "label": "File name",
            "required": true,
            "semantic": "file:name",
            "validate": {
              "max": 255
            },
            "help": "Use the unchanged source filename, including its extension."
          },
          {
            "name": "data",
            "type": "buffer",
            "label": "Data",
            "required": true,
            "semantic": "file:data",
            "help": "Map one PDF, PNG, JPEG or XML e-invoice as binary data from a file or attachment download. Maximum 30 MiB."
          },
          {
            "name": "uploadRequestId",
            "type": "text",
            "label": "Upload request ID",
            "required": true,
            "validate": {
              "pattern": "^[!-~]{1,128}$"
            },
            "help": "Stable ASCII identifier for this source file/version, e.g. drive:<file-id>:<revision>. Keep the ID, bytes and filename unchanged on retries. Do not use now or a new random value. A changed file needs a new version ID."
          }
        ]
      }
    },
    {
      "id": 5,
      "module": "app#bimetrics-2runzh:getDocument",
      "version": 1,
      "parameters": {},
      "mapper": {
        "documentId": "{{4.id}}"
      },
      "metadata": {
        "designer": {
          "x": 900,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:app#bimetrics-2runzh",
            "label": "Connection",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "documentId",
            "type": "text",
            "label": "Document ID",
            "required": true,
            "validate": {
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
            },
            "help": "The bimetrics document ID, not the uploaded file or blob ID."
          }
        ]
      }
    }
  ],
  "metadata": {
    "instant": false,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "slots": null,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    }
  }
}
