{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "9A9463A4-C7EE-48A8-B822-3857F8F20EFF",
    "name": "Jev review decisions"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": 393.63567524515037,
        "y": -87.06665313124512,
        "zoom": 0.7834971869493416
      },
      "autoSave": true,
      "descriptions": {
        "flow": "Runs when a reviewer clicks a button on a Jev review message in Slack (vaccination record, invoice fields, AI answer). Looks up the review in the \"Jev review log\" sheet, records the decision, who made it and when, and replies in the message's thread. A click on a review that is already decided is ignored.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Runs when a reviewer clicks a button on a Jev review message in Slack. Finds the review in the \"Jev review log\" sheet, records the decision, who made it and when, and replaces the buttons with the decision. A click on a review that is already decided gets a short reply in the thread.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Review not in the log Result"
          },
          "position": {
            "x": 372.1283498649122,
            "y": 550.837799819883
          }
        },
        "flowElementId": "DC4378F1-64B3-4AB4-8513-94ED46E97264",
        "groupId": null,
        "id": "937B0211-6EBE-4F74-A930-CC7D2297B842",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "notFound",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "Review not in the log",
        "nextElementIds": [
          "5983333C-AFA4-4E1B-8FED-F9F6AC2E0CA6"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": -27.921124001896445,
            "y": 689.4969392024645
          }
        },
        "flowElementId": "8A47EA9C-BBD1-4266-B659-730F1FD1EC1B",
        "groupId": null,
        "id": "8BED4DCB-3C80-490C-AFC2-A9D61CDD94FA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "8ee24653-ac6d-4ed9-b33e-e61859e30205",
                "nestedOperation": null,
                "operation": ">",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "check",
                      "subPathSegments": [
                        {
                          "key": "open",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "96392833-AFC8-4648-BAD0-F84E105F8C41"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "INT",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 0
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "8ee24653-ac6d-4ed9-b33e-e61859e30205"
            ]
          },
          "elseComponent": {
            "componentId": "BAF8D1E2-91B5-4011-834A-182C49323FE4",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "pending",
          "storeResult": false,
          "thenComponent": {
            "componentId": "ED82C922-10C0-450B-8A76-A10AAEB617DD",
            "componentType": "ELEMENT"
          }
        },
        "name": "Still pending?",
        "nextElementIds": [
          "ED82C922-10C0-450B-8A76-A10AAEB617DD",
          "BAF8D1E2-91B5-4011-834A-182C49323FE4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Record the decision in the log Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 184.64635308579466,
            "y": 856.4807144510759
          }
        },
        "flowElementId": "2CF9E0C3-1B64-4C6A-A987-E88001D4925A",
        "groupId": null,
        "id": "ED82C922-10C0-450B-8A76-A10AAEB617DD",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "check",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "96392833-AFC8-4648-BAD0-F84E105F8C41"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "check",
                    "subPathSegments": [
                      {
                        "key": "updated",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "96392833-AFC8-4648-BAD0-F84E105F8C41"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "record",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Record the decision in the log",
        "nextElementIds": [
          "B44E5C07-B59F-4BC9-9088-ADC555C45464"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Triggered when a user clicks a button or interacts with a Block Kit element in a Slack message. Use this to build approval flows, interactive forms, or any workflow that requires human input via Slack buttons. Outputs include the action ID, value, clicking user, channel, and original message timestamp.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::onBlockAction",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::onBlockAction",
          "legacyElementId": "JS###v1###Slack###onBlockAction",
          "methodName": "onBlockAction",
          "position": {
            "x": 127.86860276360534,
            "y": 128.72367123117107
          }
        },
        "flowElementId": "7BBD7A7C-4200-43C9-954A-4E1D463D78C0",
        "groupId": null,
        "id": "17F18912-79C6-4227-AE14-F64D1E90AD01",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onBlockAction",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "click",
          "scope": "ALL_APPS",
          "serviceId": "slack",
          "slaConditions": [],
          "staticData": {
            "blockId": "jev_review"
          },
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "Reviewer clicked a Jev review button",
        "nextElementIds": [
          "7FC14570-0781-4255-849F-5F5655C28D16"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Reply: review not found Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 651.5472497748536,
            "y": 539.3547249774854
          }
        },
        "flowElementId": "3899C040-C7ED-4EB2-981F-0ECC1D53B505",
        "groupId": null,
        "id": "5983333C-AFA4-4E1B-8FED-F9F6AC2E0CA6",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "channelId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "This review is not in the Jev review log, so nothing was recorded."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "messageTs",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "replyNotFound",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Reply: review not found",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Finds a specific row in a specified sheet within a spreadsheet based on a column and value.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::findSheetRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the review in the log Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::findSheetRow",
          "legacyElementId": "JS###v1###GoogleSheets###findSheetRow",
          "methodName": "findSheetRow",
          "position": {
            "x": 163.4492245271927,
            "y": 384
          }
        },
        "flowElementId": "8E7E2D26-3F8F-42AD-BDAD-D0C6570402C3",
        "groupId": null,
        "id": "D53793EC-25AB-4726-A07F-AF1C7ECF56D1",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "column",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Review ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "value",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "reviewId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "findSheetRow",
          "onFailElemId": "937B0211-6EBE-4F74-A930-CC7D2297B842",
          "packageId": "default",
          "resultAlias": "findReview",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the review in the log",
        "nextElementIds": [
          "96392833-AFC8-4648-BAD0-F84E105F8C41"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the click Result"
          },
          "position": {
            "x": 177.86860276360528,
            "y": 264.72367123117107
          }
        },
        "flowElementId": "690572EE-C8B5-4CF9-B403-EF1E709EFF7D",
        "groupId": null,
        "id": "7FC14570-0781-4255-849F-5F5655C28D16",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "click",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "click",
                    "subPathSegments": null,
                    "type": "TRIGGER_DATA",
                    "value": "17F18912-79C6-4227-AE14-F64D1E90AD01"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "// Which review, which button, who clicked. The button's value is the review id.\nlet c = click;\nif (typeof c === 'string') c = JSON.parse(c);\nconst DECISIONS = {\n  jev_vax_confirm: 'Record confirmed',\n  jev_vax_followup: 'Follow up with the traveller',\n  jev_inv_ok: 'Values are right',\n  jev_inv_sendback: 'Sent back for correction',\n  jev_ai_strong: \"Use the strong model's answer\",\n  jev_ai_cheap: \"Use the cheap model's answer\",\n  jev_ai_reject: 'Rejected both answers'\n};\nconst actionId = String(c.action_id || '');\nreturn {\n  reviewId: String(c.action_value || '').trim() || '__no_review_id__',\n  actionId,\n  decision: DECISIONS[actionId] || actionId,\n  userId: String(c.user_id || ''),\n  userName: String(c.user_display_name || c.user_name || c.user_id || ''),\n  channelId: String(c.channel_id || ''),\n  messageTs: String(c.message_ts || ''),\n  decidedAt: new Date().toISOString()\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "readClick",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Read the click",
        "nextElementIds": [
          "D53793EC-25AB-4726-A07F-AF1C7ECF56D1"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Is the review still pending? Result"
          },
          "position": {
            "x": -40,
            "y": 550
          }
        },
        "flowElementId": "1ED99CCD-2CFE-4636-86CE-7853846261C4",
        "groupId": null,
        "id": "96392833-AFC8-4648-BAD0-F84E105F8C41",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "found",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "findReview",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "D53793EC-25AB-4726-A07F-AF1C7ECF56D1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "c",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "// Clicks can arrive twice. Only a pending review takes a decision; later clicks get a short note in the thread.\nconst row = (found && found.rowData) || {};\nconst rowNumber = found && found.rowNumber;\nconst open = !!rowNumber && String(row['Status'] || '').toLowerCase() === 'pending';\nconst updated = Object.assign({}, row, {\n  'Status': 'decided',\n  'Decision': c.decision,\n  'Decided By': c.userName + (c.userId ? ' (' + c.userId + ')' : ''),\n  'Decided At': c.decidedAt\n});\nconst prevBy = String(row['Decided By'] || '').replace(/\\s*\\(.*\\)$/, '');\nconst prevAt = String(row['Decided At'] || '').replace('T', ' ').slice(0, 16);\nconst when = c.decidedAt.replace('T', ' ').slice(0, 16) + ' UTC';\n\n// After a decision the message itself changes: the buttons go, the decision shows.\nconst ICONS = {\n  jev_vax_confirm: ':white_check_mark:', jev_inv_ok: ':white_check_mark:',\n  jev_ai_strong: ':white_check_mark:', jev_ai_cheap: ':white_check_mark:',\n  jev_vax_followup: ':leftwards_arrow_with_hook:', jev_inv_sendback: ':leftwards_arrow_with_hook:',\n  jev_ai_reject: ':x:'\n};\nconst icon = ICONS[c.actionId] || ':white_check_mark:';\nconst summary = String(row['Summary'] || 'Jev review ' + c.reviewId);\nconst doneBlocks = [\n  { type: 'section', text: { type: 'mrkdwn', text: '*' + summary + '*' } },\n  { type: 'context', elements: [{ type: 'mrkdwn', text: icon + ' *' + c.decision + '* by <@' + c.userId + '>, ' + when + '. Logged in the Jev review log.' }] }\n];\nreturn {\n  open: open ? 1 : 0,\n  rowNumber: rowNumber || 0,\n  updated,\n  doneText: summary + ': ' + c.decision,\n  doneBlocks: JSON.stringify(doneBlocks),\n  alreadyReply: 'This review was already decided: *' + (row['Decision'] || 'unknown') + '*' + (prevBy ? ' by ' + prevBy : '') + (prevAt ? ' at ' + prevAt + ' UTC' : '') + '. Nothing changed.'\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "check",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Is the review still pending?",
        "nextElementIds": [
          "8BED4DCB-3C80-490C-AFC2-A9D61CDD94FA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Reply: already decided Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": -266.67783569479803,
            "y": 851.5889584134883
          }
        },
        "flowElementId": "64314FBA-A3E1-487F-BB80-E098D9BC3604",
        "groupId": null,
        "id": "BAF8D1E2-91B5-4011-834A-182C49323FE4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "channelId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "check",
                    "subPathSegments": [
                      {
                        "key": "alreadyReply",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "96392833-AFC8-4648-BAD0-F84E105F8C41"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "messageTs",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "alreadyDecided",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Reply: already decided",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates a specific message in a Slack channel. Supports plain text updates or replacing the entire message content with Block Kit JSON. Commonly used after a button click to swap interactive buttons with a confirmation message.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::updateMessageInChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Show the decision on the message Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::updateMessageInChannel",
          "legacyElementId": "JS###v1###Slack###updateMessageInChannel",
          "methodName": "updateMessageInChannel",
          "position": {
            "x": 583.9584106808809,
            "y": 851.7893698493683
          }
        },
        "flowElementId": "538373BB-6967-4B02-8D41-3EDB863E7232",
        "groupId": null,
        "id": "B44E5C07-B59F-4BC9-9088-ADC555C45464",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "channelId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "readClick",
                    "subPathSegments": [
                      {
                        "key": "messageTs",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7FC14570-0781-4255-849F-5F5655C28D16"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "check",
                    "subPathSegments": [
                      {
                        "key": "doneText",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "96392833-AFC8-4648-BAD0-F84E105F8C41"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "check",
                    "subPathSegments": [
                      {
                        "key": "doneBlocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "96392833-AFC8-4648-BAD0-F84E105F8C41"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateMessageInChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "showDecision",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Show the decision on the message",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "17F18912-79C6-4227-AE14-F64D1E90AD01",
    "groups": [],
    "id": "DD10FAA5-B9D2-4BA0-A6F0-771F1BFB80C4",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": true
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-11-13T02:28:18.022Z"
}
