{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "3EF3FBA2-45C1-4460-AEF9-634F791855A5",
    "name": "Dovetail: customer quotes on feature requests"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -70,
        "y": 0,
        "zoom": 1
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When an issue in Linear is created with the feature-request label, or gets that label later, the flow searches the Dovetail workspace for highlights matching the issue's title, asks Dovetail to summarize up to ten of them with citations, and adds the summary to the issue as a comment. Each citation names the quote and the project it came from and links to it in Dovetail. An issue with no matching highlights gets no comment.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a new Linear issue carries the feature-request label, searches the Dovetail workspace for matching highlights, asks Dovetail to summarize them with citations, and adds the cited summary as a comment on the issue.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 863,
            "y": 219
          }
        },
        "flowElementId": "3E4732DD-09C0-4E4A-BF93-B80A509E202E",
        "groupId": null,
        "id": "0DC713A9-6F67-4FBC-AB2E-EBDBCA667DB7",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "d17ebb94-180a-458e-9dbe-3d1def176d16",
                "nestedOperation": null,
                "operation": ">",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Picked highlights",
                      "subPathSegments": [
                        {
                          "key": "count",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "8AB03A2B-C99B-4311-85FA-638F8D64D2C1"
                    }
                  ],
                  "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": [
              "d17ebb94-180a-458e-9dbe-3d1def176d16"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Any highlights",
          "storeResult": false,
          "thenComponent": {
            "componentId": "60642DA6-5734-4279-8F21-E0AFA7907CBE",
            "componentType": "ELEMENT"
          }
        },
        "name": "Any highlights?",
        "nextElementIds": [
          "60642DA6-5734-4279-8F21-E0AFA7907CBE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Fires when a chosen Linear resource changes. Choose a resource type (Issues, Comments, Projects, or Issue Labels) and optionally scope to a single team. Linear registers a webhook and this trigger runs your flow on each create, update, or remove event.",
          "elementId": "EXTENSION:::SHARED:::default:::linear:::onLinearEvent",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::linear:::onLinearEvent",
          "legacyElementId": "JS###v1###Linear###onLinearEvent",
          "methodName": "onLinearEvent",
          "position": {
            "x": 125,
            "y": 40
          }
        },
        "flowElementId": "ADA060ED-4A56-4CCB-9A31-0D048BFE345D",
        "groupId": null,
        "id": "D895F3AC-568D-471C-9B40-902C355932B7",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onLinearEvent",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Linear event",
          "scope": "SINGLE_APP",
          "serviceId": "linear",
          "slaConditions": [],
          "staticData": {
            "resource": "Issue"
          },
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "New Linear issue event",
        "nextElementIds": [
          "9E228F87-5A1B-47A9-9995-93B68CF2B16C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the comment Result"
          },
          "position": {
            "x": 134,
            "y": 219
          }
        },
        "flowElementId": "CE4D58E1-00F2-4B79-B82C-EE6BA4425F87",
        "groupId": null,
        "id": "CF62C905-CA35-422E-9850-3612F0B14735",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "summary",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Dovetail summary",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "60642DA6-5734-4279-8F21-E0AFA7907CBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "citations",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Dovetail summary",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "citations",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "60642DA6-5734-4279-8F21-E0AFA7907CBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "highlights",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Picked highlights",
                    "subPathSegments": [
                      {
                        "key": "highlights",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8AB03A2B-C99B-4311-85FA-638F8D64D2C1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "searchUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Workspace search",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7C37973C-1E7D-47BD-8C17-10FDC0D3E612"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(highlights) ? highlights : [];\nconst byId = Object.fromEntries(list.map(h => [h.id, h]));\nconst cites = Array.isArray(citations) ? citations : [];\nconst lines = ['**What customers said in Dovetail**', '', String(summary || '').trim(), ''];\nconst refs = cites.map(c => {\n  const h = byId[c.id];\n  const quote = h && h.preview_text ? `\"${String(h.preview_text).trim()}\"` : `${c.type || 'source'} ${c.id}`;\n  const where = h && h.project_title ? ` (${h.project_title})` : '';\n  const link = h && h.url ? ` - [open in Dovetail](${h.url})` : '';\n  return `[${c.citation_id}] ${quote}${where}${link}`;\n});\nif (refs.length) {\n  lines.push('Sources:', ...refs, '');\n}\nif (searchUrl) {\n  lines.push(`[All matching highlights in Dovetail](${searchUrl})`);\n}\nreturn { body: lines.join('\\n') };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Issue comment",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the comment",
        "nextElementIds": [
          "4DBEFF0B-87BE-4F81-93A3-8E4E5238ED10"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 859,
            "y": 49
          }
        },
        "flowElementId": "BCD3B674-961A-492D-B379-5B18268D7CE4",
        "groupId": null,
        "id": "4BA87E01-650B-4DFF-9F9B-F25DE17E72AF",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "37769686-b0d6-4098-81be-bbdddd01f99f",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Issue check",
                      "subPathSegments": [
                        {
                          "key": "featureRequest",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "9E228F87-5A1B-47A9-9995-93B68CF2B16C"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "37769686-b0d6-4098-81be-bbdddd01f99f"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "New feature request",
          "storeResult": false,
          "thenComponent": {
            "componentId": "7C37973C-1E7D-47BD-8C17-10FDC0D3E612",
            "componentType": "ELEMENT"
          }
        },
        "name": "New feature request?",
        "nextElementIds": [
          "7C37973C-1E7D-47BD-8C17-10FDC0D3E612"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check for the feature-request label Result"
          },
          "position": {
            "x": 458,
            "y": 49
          }
        },
        "flowElementId": "35B4EB74-E13E-4289-8400-87F613098536",
        "groupId": null,
        "id": "9E228F87-5A1B-47A9-9995-93B68CF2B16C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "action",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Linear event",
                    "subPathSegments": [
                      {
                        "key": "action",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D895F3AC-568D-471C-9B40-902C355932B7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "labels",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Linear event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "labels",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D895F3AC-568D-471C-9B40-902C355932B7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "updatedFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Linear event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "updatedFrom",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D895F3AC-568D-471C-9B40-902C355932B7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "title",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Linear event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "title",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D895F3AC-568D-471C-9B40-902C355932B7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "labelName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Feature request label",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Feature request label"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const wanted = String(labelName || 'Feature request').trim().toLowerCase();\nconst list = Array.isArray(labels) ? labels : [];\nconst match = list.find(l => String((l && l.name) || l || '').trim().toLowerCase() === wanted);\nconst hasLabel = Boolean(match);\nlet featureRequest = false;\nif (hasLabel && action === 'create') {\n  featureRequest = true;\n} else if (hasLabel && action === 'update' && updatedFrom && Array.isArray(updatedFrom.labelIds)) {\n  // The label was added to an existing issue: comment once, when it arrives.\n  featureRequest = !updatedFrom.labelIds.includes(match.id);\n}\nreturn {\n  featureRequest,\n  query: String(title || '').trim().slice(0, 512),\n  labels: list.map(l => (l && l.name) || l),\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Issue check",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Check for the feature-request label",
        "nextElementIds": [
          "4BA87E01-650B-4DFF-9F9B-F25DE17E72AF"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Writes an AI summary of the chosen highlights, data, insights, themes and tags, with citations back to each source unless they are left out. Give at least one source.",
          "elementId": "EXTENSION:::SHARED:::default:::dovetail:::summarize",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Summarize the highlights Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dovetail:::summarize",
          "legacyElementId": null,
          "methodName": "summarize",
          "position": {
            "x": 492,
            "y": 210
          }
        },
        "flowElementId": "C74B6F4B-C4A9-4F0A-842C-F4E78058EDB9",
        "groupId": null,
        "id": "60642DA6-5734-4279-8F21-E0AFA7907CBE",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "projectId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "highlightIds",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Picked highlights",
                    "subPathSegments": [
                      {
                        "key": "ids",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8AB03A2B-C99B-4311-85FA-638F8D64D2C1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "insightIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "themeIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "leaveOutCitations",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "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": "summarize",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Dovetail summary",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dovetail",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Summarize the highlights",
        "nextElementIds": [
          "CF62C905-CA35-422E-9850-3612F0B14735"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Adds a comment to a Linear issue. The comment body supports Markdown. Returns the created comment with its ID and URL.",
          "elementId": "EXTENSION:::SHARED:::default:::linear:::createComment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add the quotes to the issue Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::linear:::createComment",
          "legacyElementId": "JS###v1###Linear###createComment",
          "methodName": "createComment",
          "position": {
            "x": 110,
            "y": 380
          }
        },
        "flowElementId": "97742471-765F-47F8-B839-4453C95FDD1F",
        "groupId": null,
        "id": "4DBEFF0B-87BE-4F81-93A3-8E4E5238ED10",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "issueId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Linear event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "D895F3AC-568D-471C-9B40-902C355932B7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "body",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Issue comment",
                    "subPathSegments": [
                      {
                        "key": "body",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CF62C905-CA35-422E-9850-3612F0B14735"
                  }
                ],
                "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": "createComment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Linear comment",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "linear",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Add the quotes to the issue",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Searches the whole workspace (highlights, data, insights and docs, projects, tags, themes, channels, dashboards, folders, people and agents) by text and filters. Each content type comes back in its own list.",
          "elementId": "EXTENSION:::SHARED:::default:::dovetail:::searchWorkspace",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find what customers said Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dovetail:::searchWorkspace",
          "legacyElementId": null,
          "methodName": "searchWorkspace",
          "position": {
            "x": 1167,
            "y": 40
          }
        },
        "flowElementId": "87AB3AD0-603F-4E4E-AB67-97EAF1352CA9",
        "groupId": null,
        "id": "7C37973C-1E7D-47BD-8C17-10FDC0D3E612",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "query",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Issue check",
                    "subPathSegments": [
                      {
                        "key": "query",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "9E228F87-5A1B-47A9-9995-93B68CF2B16C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "types",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "HIGHLIGHT"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "locationMethod",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "LOCATED_IN"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateRange",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateField",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "CREATED"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeArchived",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortDirection",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "DESC"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 10
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "offset",
              "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": "searchWorkspace",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Workspace search",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dovetail",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find what customers said",
        "nextElementIds": [
          "8AB03A2B-C99B-4311-85FA-638F8D64D2C1"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the highlights to cite Result"
          },
          "position": {
            "x": 1168,
            "y": 219
          }
        },
        "flowElementId": "26DA6AB0-1481-443A-8423-6D604B6C6C96",
        "groupId": null,
        "id": "8AB03A2B-C99B-4311-85FA-638F8D64D2C1",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "highlights",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Workspace search",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "highlights",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7C37973C-1E7D-47BD-8C17-10FDC0D3E612"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(highlights) ? highlights : [];\nconst kept = list.filter(h => h && typeof h.id === 'string').slice(0, 10);\nreturn {\n  ids: kept.map(h => h.id),\n  count: kept.length,\n  highlights: kept,\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Picked highlights",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the highlights to cite",
        "nextElementIds": [
          "0DC713A9-6F67-4FBC-AB2E-EBDBCA667DB7"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "D895F3AC-568D-471C-9B40-902C355932B7",
    "groups": [],
    "id": "B0E9180C-E58E-4B2C-A6CB-4DD0123CD6A3",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "The Linear label that marks an issue as a feature request, spelled as in Linear.",
          "error": null,
          "name": "Feature request label",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-12-02T08:42:21.088Z"
}
