{
  "name": "Phonio narudžba → Google Sheet",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": { "hook": null, "maxResults": 1 },
      "mapper": {},
      "metadata": {
        "designer": { "x": 0, "y": 0 },
        "restore": {},
        "parameters": [
          { "name": "hook", "type": "hook:gateway-webhook", "label": "Webhook", "required": true }
        ],
        "interface": [
          { "name": "event_id", "type": "text" },
          { "name": "dogadjaj", "type": "text" },
          { "name": "firma", "type": "text" },
          { "name": "vrijeme", "type": "text" },
          { "name": "podaci", "type": "collection", "spec": [
            { "name": "broj_narudzbe", "type": "number" },
            { "name": "ime", "type": "text" },
            { "name": "telefon", "type": "text" },
            { "name": "nacin", "type": "text" },
            { "name": "adresa", "type": "text" },
            { "name": "stavke", "type": "array" },
            { "name": "iznos", "type": "number" },
            { "name": "placanje", "type": "text" },
            { "name": "zeljeno_vrijeme", "type": "text" },
            { "name": "napomena", "type": "text" }
          ] }
        ]
      }
    },
    {
      "id": 2,
      "module": "google-sheets:addRow",
      "version": 2,
      "parameters": { "__IMTCONN__": null },
      "mapper": {
        "from": "drive",
        "insertDataOption": "INSERT_ROWS",
        "valueInputOption": "USER_ENTERED",
        "includesHeaders": true,
        "values": {
          "0": "{{1.vrijeme}}",
          "1": "{{1.podaci.broj_narudzbe}}",
          "2": "{{1.podaci.ime}}",
          "3": "{{1.podaci.telefon}}",
          "4": "{{1.podaci.nacin}}",
          "5": "{{1.podaci.adresa}}",
          "6": "{{join(map(1.podaci.stavke; naziv); \", \")}}",
          "7": "{{1.podaci.iznos}}",
          "8": "{{1.podaci.placanje}}",
          "9": "{{1.podaci.zeljeno_vrijeme}}",
          "10": "{{1.podaci.napomena}}"
        }
      },
      "metadata": {
        "designer": { "x": 300, "y": 0 },
        "restore": {},
        "parameters": [
          { "name": "__IMTCONN__", "type": "account:google", "label": "Connection", "required": true }
        ]
      }
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "sequential": false,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": { "orphans": [] },
    "zone": "eu2.make.com"
  }
}
