{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "A4B93BAB-EAA8-4EB7-BDFC-6A0D8464F6B3",
    "name": "Fathom Analytics: weekly digest with milestones"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -62.94117647058823,
        "y": -334.331550802139,
        "zoom": 0.94
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Every Monday, pulls last week and the week before from Fathom Analytics, logs the totals in Google Sheets and posts a digest to Slack. When a page, referrer or campaign swings sharply, asks the marketing lead what ran and marks the answer as a milestone on the Fathom Analytics graph.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Every Monday, pulls last week and the week before from Fathom Analytics, logs the totals in Google Sheets and posts a digest to Slack. When a page, referrer or campaign swings sharply, asks the marketing lead what ran and marks the answer as a milestone on the Fathom Analytics graph.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Builds a custom report for one event of a site: conversions, unique conversions or value, as totals or grouped by date and by fields such as page, referrer or UTM campaign, filtered and sorted. Returns one object per row, with every number as text and value in cents.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getEventReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Signups the week before Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getEventReport",
          "legacyElementId": null,
          "methodName": "getEventReport",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "6CCC9F6A-4545-4441-8486-9876C074E95B",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "D5ECF503-D9F7-472E-BB6E-B95D706170C3",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "eventName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Signup event",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Signup event"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "conversions"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fieldGrouping",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "utm_campaign"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "conversions"
                  }
                ],
                "mode": "BASIC",
                "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": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Signups the week before', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getEventReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Signups before",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Signups the week before",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom traffic report for a site: pageviews, visits, unique visitors, average duration or bounce rate, as totals or grouped by date and by fields such as page, referrer, country or UTM campaign, filtered and sorted. Returns one object per row, with every number as text. Accurate on data from March 2021 onwards.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Last week's pages Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "legacyElementId": null,
          "methodName": "getPageviewReport",
          "position": {
            "x": 110,
            "y": 220
          }
        },
        "flowElementId": "6AD6A17D-EC69-4B45-AE8E-95DC16A40882",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "38136346-76ED-44E2-B0A5-33348FD7C966",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "pageviews"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fieldGrouping",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "pathname"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "pageviews"
                  }
                ],
                "mode": "BASIC",
                "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": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Last week's pages', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getPageviewReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Pages now",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Last week's pages",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": true,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Set last week and the week before Result"
          },
          "position": {
            "x": 110,
            "y": 409
          }
        },
        "flowElementId": "03E8EAA1-5190-46CC-AA1F-DC3C36414966",
        "groupId": null,
        "id": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const d = new Date();\nconst DAY = 86400000;\nconst today = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());\nconst monday = today - ((d.getUTCDay() + 6) % 7) * DAY;\nconst iso = t => new Date(t).toISOString().slice(0, 10);\nconst label = t => new Date(t).toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' });\nconst weekday = t => new Date(t).toLocaleDateString('en-US', { weekday: 'long', timeZone: 'UTC' });\nconst lastStart = monday - 7 * DAY, lastEnd = monday - DAY;\nconst prevStart = monday - 14 * DAY, prevEnd = monday - 8 * DAY;\nconst days = [];\nfor (let t = lastStart; t <= lastEnd; t += DAY) days.push(`${weekday(t)} ${iso(t)}`);\nreturn {\n  lastFrom: `${iso(lastStart)} 00:00:00`,\n  lastTo: `${iso(lastEnd)} 23:59:59`,\n  prevFrom: `${iso(prevStart)} 00:00:00`,\n  prevTo: `${iso(prevEnd)} 23:59:59`,\n  lastStartDate: iso(lastStart),\n  lastEndDate: iso(lastEnd),\n  lastLabel: `${label(lastStart)} to ${label(lastEnd)}`,\n  days: days.join(', '),\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Weeks",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Set last week and the week before",
        "nextElementIds": [],
        "nextGroupIds": [
          "381F7C24-F087-4E51-A863-67EB41EC02B6"
        ],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom traffic report for a site: pageviews, visits, unique visitors, average duration or bounce rate, as totals or grouped by date and by fields such as page, referrer, country or UTM campaign, filtered and sorted. Returns one object per row, with every number as text. Accurate on data from March 2021 onwards.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pages the week before Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "legacyElementId": null,
          "methodName": "getPageviewReport",
          "position": {
            "x": 110,
            "y": 580
          }
        },
        "flowElementId": "3AD30A1C-B06D-404A-A302-0AE84135D66C",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "8ED54368-D197-4858-86A2-0FFB481ACF79",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "pageviews"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fieldGrouping",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "pathname"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "pageviews"
                  }
                ],
                "mode": "BASIC",
                "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": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Pages the week before', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getPageviewReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Pages before",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Pages the week before",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom traffic report for a site: pageviews, visits, unique visitors, average duration or bounce rate, as totals or grouped by date and by fields such as page, referrer, country or UTM campaign, filtered and sorted. Returns one object per row, with every number as text. Accurate on data from March 2021 onwards.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Totals the week before Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "legacyElementId": null,
          "methodName": "getPageviewReport",
          "position": {
            "x": 110,
            "y": 760
          }
        },
        "flowElementId": "DB45C38A-9985-44DD-86FD-70A051BC82B9",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "9C6A81C6-14D7-45D7-8A2E-2126AA1B3A12",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "pageviews"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "visits"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "bounce_rate"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "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": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Totals the week before', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getPageviewReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Totals before",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Totals the week before",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom traffic report for a site: pageviews, visits, unique visitors, average duration or bounce rate, as totals or grouped by date and by fields such as page, referrer, country or UTM campaign, filtered and sorted. Returns one object per row, with every number as text. Accurate on data from March 2021 onwards.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Last week's referrers Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "legacyElementId": null,
          "methodName": "getPageviewReport",
          "position": {
            "x": 110,
            "y": 940
          }
        },
        "flowElementId": "43EEDC63-B5A0-4B2A-B1A1-75A2B1AD15BF",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "8A87615A-CDBD-4685-9C4A-76F47B37923B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "visits"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fieldGrouping",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "referrer_hostname"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "visits"
                  }
                ],
                "mode": "BASIC",
                "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": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Last week's referrers', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getPageviewReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Referrers now",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Last week's referrers",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom traffic report for a site: pageviews, visits, unique visitors, average duration or bounce rate, as totals or grouped by date and by fields such as page, referrer, country or UTM campaign, filtered and sorted. Returns one object per row, with every number as text. Accurate on data from March 2021 onwards.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Referrers the week before Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "legacyElementId": null,
          "methodName": "getPageviewReport",
          "position": {
            "x": 110,
            "y": 1120
          }
        },
        "flowElementId": "913A3D22-DC14-4C55-8F88-6A63AA32617F",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "73DC1DFA-5113-4B92-9AA9-4DE58551CB31",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "visits"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "prevTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fieldGrouping",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "referrer_hostname"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "visits"
                  }
                ],
                "mode": "BASIC",
                "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": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Referrers the week before', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getPageviewReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Referrers before",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Referrers the week before",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom traffic report for a site: pageviews, visits, unique visitors, average duration or bounce rate, as totals or grouped by date and by fields such as page, referrer, country or UTM campaign, filtered and sorted. Returns one object per row, with every number as text. Accurate on data from March 2021 onwards.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Last week's totals Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getPageviewReport",
          "legacyElementId": null,
          "methodName": "getPageviewReport",
          "position": {
            "x": 110,
            "y": 1300
          }
        },
        "flowElementId": "27CA775D-15B0-4847-BADE-8502254F5315",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "6ED9CFBF-B520-42E5-8C41-F5447E977D95",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "pageviews"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "visits"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "bounce_rate"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "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": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Last week's totals', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getPageviewReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Totals now",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Last week's totals",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Builds a custom report for one event of a site: conversions, unique conversions or value, as totals or grouped by date and by fields such as page, referrer or UTM campaign, filtered and sorted. Returns one object per row, with every number as text and value in cents.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getEventReport",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Last week's signups by campaign Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::getEventReport",
          "legacyElementId": null,
          "methodName": "getEventReport",
          "position": {
            "x": 110,
            "y": 1480
          }
        },
        "flowElementId": "3AA13A77-9014-4663-921A-E85A3F238A5C",
        "groupId": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "id": "B55E660E-652D-4BFF-BFD3-AF674D4F8FF2",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "eventName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Signup event",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Signup event"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "aggregates",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "conversions"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastFrom",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": [
                      {
                        "key": "lastTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateGrouping",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fieldGrouping",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "utm_campaign"
                    }
                  ],
                  "mode": "BASIC",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "conversions"
                  }
                ],
                "mode": "BASIC",
                "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": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Last week's signups by campaign', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getEventReport",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Signups now",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Last week's signups by campaign",
        "nextElementIds": [],
        "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": "Post the digest to Slack Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1280,
            "y": 570
          }
        },
        "flowElementId": "8117D6AA-1E36-4740-B2F7-58C790EAC1D9",
        "groupId": null,
        "id": "49D3CBB6-2E19-406E-85AD-6D5BAC69A67A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Comparison",
                    "subPathSegments": [
                      {
                        "key": "digest",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "04D84B82-0279-49F4-8494-51F4446985CD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "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": "Digest post",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Post the digest to Slack",
        "nextElementIds": [
          "E36E593B-8E9F-41B5-AC74-0C4873265D06"
        ],
        "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": "Ask the marketing lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 558,
            "y": 570
          }
        },
        "flowElementId": "19B37CAE-603C-4AD2-A60C-63D19F8F3BB4",
        "groupId": null,
        "id": "30D2299C-C7F1-4791-A3BD-7FDE3E883D20",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Comparison",
                    "subPathSegments": [
                      {
                        "key": "question",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "04D84B82-0279-49F4-8494-51F4446985CD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Digest post",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "49D3CBB6-2E19-406E-85AD-6D5BAC69A67A"
                  }
                ],
                "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": "Question post",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the marketing lead",
        "nextElementIds": [
          "9594FC40-E719-415F-AB83-5320F502C328"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Compare the two weeks Result"
          },
          "position": {
            "x": 929,
            "y": 409
          }
        },
        "flowElementId": "8C8BBF65-4F3C-476A-9AE8-5CECEE2230B3",
        "groupId": null,
        "id": "04D84B82-0279-49F4-8494-51F4446985CD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Compare the two weeks', Error: The placeholder \"Marketing lead\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "weeks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weeks",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "totalsNow",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Totals now",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "6ED9CFBF-B520-42E5-8C41-F5447E977D95"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "totalsBefore",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Totals before",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "9C6A81C6-14D7-45D7-8A2E-2126AA1B3A12"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pagesNow",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Pages now",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "38136346-76ED-44E2-B0A5-33348FD7C966"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pagesBefore",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Pages before",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "8ED54368-D197-4858-86A2-0FFB481ACF79"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "refsNow",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Referrers now",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "8A87615A-CDBD-4685-9C4A-76F47B37923B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "refsBefore",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Referrers before",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "73DC1DFA-5113-4B92-9AA9-4DE58551CB31"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "signupsNow",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Signups now",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "B55E660E-652D-4BFF-BFD3-AF674D4F8FF2"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "signupsBefore",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Signups before",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "D5ECF503-D9F7-472E-BB6E-B95D706170C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threshold",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Swing threshold %",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Swing threshold %"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minVisits",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Minimum visits for a swing",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Minimum visits for a swing"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minSignups",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Minimum signups for a swing",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Minimum signups for a swing"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "lead",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Marketing lead",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Marketing lead"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const num = v => { const n = Number(v); return Number.isFinite(n) ? n : 0; };\nconst fmt = n => Math.round(n).toLocaleString('en-US');\nconst change = (n, b) => {\n  if (b > 0) { const p = Math.round((n - b) / b * 100); return p >= 0 ? `+${p}%` : `${p}%`; }\n  return n > 0 ? 'new' : 'no change';\n};\nconst rows = r => Array.isArray(r) ? r : [];\nconst first = r => rows(r)[0] || {};\nconst byKey = (list, key, metric, blank) => {\n  const m = new Map();\n  for (const row of rows(list)) { const k = row[key] || blank; m.set(k, (m.get(k) || 0) + num(row[metric])); }\n  return m;\n};\nconst sum = m => [...m.values()].reduce((a, b) => a + b, 0);\n\nconst tNow = first(totalsNow), tBefore = first(totalsBefore);\nconst pvNow = num(tNow.pageviews), pvBefore = num(tBefore.pageviews);\nconst visNow = num(tNow.visits), visBefore = num(tBefore.visits);\nlet bounce = num(tNow.bounce_rate);\nif (bounce > 0 && bounce <= 1) bounce = bounce * 100;\n\nconst pages = [byKey(pagesNow, 'pathname', 'pageviews', '(no path)'), byKey(pagesBefore, 'pathname', 'pageviews', '(no path)')];\nconst refs = [byKey(refsNow, 'referrer_hostname', 'visits', 'Direct or unknown'), byKey(refsBefore, 'referrer_hostname', 'visits', 'Direct or unknown')];\nconst camps = [byKey(signupsNow, 'utm_campaign', 'conversions', 'No campaign'), byKey(signupsBefore, 'utm_campaign', 'conversions', 'No campaign')];\nconst suNow = sum(camps[0]), suBefore = sum(camps[1]);\n\nconst top = ([now, before], unit) => [...now.entries()]\n  .sort((a, b) => b[1] - a[1]).slice(0, 5)\n  .map(([k, v], i) => `${i + 1}. ${k}: ${fmt(v)} ${unit} (${change(v, before.get(k) || 0)})`);\n\nconst limit = Number(threshold) || 50;\nconst swingsOf = ([now, before], label, unit, min) => {\n  const out = [];\n  for (const k of new Set([...now.keys(), ...before.keys()])) {\n    const n = now.get(k) || 0, b = before.get(k) || 0;\n    if (Math.max(n, b) < (Number(min) || 0)) continue;\n    const p = b > 0 ? Math.abs(n - b) / b * 100 : Infinity;\n    if (p >= limit) out.push({ size: Math.abs(n - b), text: `${label} ${k}: ${fmt(b)} to ${fmt(n)} ${unit} (${change(n, b)})` });\n  }\n  return out;\n};\nconst swings = [\n  ...swingsOf(pages, 'Page', 'pageviews', minVisits),\n  ...swingsOf(refs, 'Visits from', 'visits', minVisits),\n  ...swingsOf(camps, 'Campaign', 'signups', minSignups),\n].sort((a, b) => b.size - a.size).slice(0, 6).map(s => s.text);\n\nconst lines = [\n  `*Fathom Analytics: week of ${weeks.lastLabel}*`,\n  `Pageviews ${fmt(pvNow)} (${change(pvNow, pvBefore)}), visitors ${fmt(visNow)} (${change(visNow, visBefore)}), bounce rate ${Math.round(bounce)}%, signups ${fmt(suNow)} (${change(suNow, suBefore)}). Changes are against the week before.`,\n  '', '*Top pages*', ...top(pages, 'pageviews'),\n  '', '*Top referrers*', ...top(refs, 'visits'),\n  '', '*Signups by campaign*', ...(camps[0].size ? top(camps, 'signups') : ['No signups last week.']),\n];\nif (swings.length) lines.push('', '*Big swings*', ...swings.map(s => `- ${s}`));\n\nconst mention = lead ? `<@${lead}> ` : '';\nconst question = `${mention}These moved a lot last week (${weeks.lastLabel}):\\n${swings.map(s => `- ${s}`).join('\\n')}\\nDid something run, like a launch, a campaign, an email or a post? Reply in this thread with what it was and the day it started, and the flow marks it as a milestone on the Fathom Analytics graph. Reply nothing if you don't know of anything.`;\n\nreturn {\n  digest: lines.join('\\n'),\n  hasSwings: swings.length > 0,\n  swings: swings.join('\\n'),\n  question,\n  row: {\n    'Week starting': weeks.lastStartDate,\n    'Week ending': weeks.lastEndDate,\n    'Pageviews': pvNow,\n    'Visitors': visNow,\n    'Bounce rate': `${Math.round(bounce)}%`,\n    'Signups': suNow,\n    'Pageviews vs week before': change(pvNow, pvBefore),\n    'Signups vs week before': change(suNow, suBefore),\n    'Flagged swings': swings.join('; '),\n  },\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Comparison",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Compare the two weeks",
        "nextElementIds": [
          "807A155B-62A5-49D7-8069-D91E1F9CC279"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Adds new data rows to Google Sheets for AI agents to store processed results, log user interactions, or collect data from automated workflows. Perfect for building databases, tracking metrics, saving form submissions, or creating data collection pipelines.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::addRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Log the week in Google Sheets Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::addRow",
          "legacyElementId": "JS###v1###GoogleSheets###addRow",
          "methodName": "addRow",
          "position": {
            "x": 1255,
            "y": 400
          }
        },
        "flowElementId": "7633B6D5-435C-4F6D-93FE-53FA9B1E6A6B",
        "groupId": null,
        "id": "807A155B-62A5-49D7-8069-D91E1F9CC279",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Traffic log sheet",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Traffic log sheet"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "row",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Comparison",
                    "subPathSegments": [
                      {
                        "key": "row",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "04D84B82-0279-49F4-8494-51F4446985CD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Log the week in Google Sheets', Error: The placeholder \"Traffic log sheet\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "addRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Logged week",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Log the week in Google Sheets",
        "nextElementIds": [
          "49D3CBB6-2E19-406E-85AD-6D5BAC69A67A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "reply": "50ea8baf-83bb-42ab-b63e-f5402d1f2065"
          },
          "position": {
            "x": 157,
            "y": 579
          }
        },
        "flowElementId": "CB9CBCF6-654C-4C10-BC03-C651049DD0DB",
        "groupId": null,
        "id": "9594FC40-E719-415F-AB83-5320F502C328",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "reply",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EMPTY_STRING",
                    "label": null,
                    "type": "KEYWORD",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "startwait",
          "storeResult": true
        },
        "name": "No reply yet",
        "nextElementIds": [],
        "nextGroupIds": [
          "410A3796-E494-441D-94A8-C62A1B3871A3"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 936,
            "y": 579
          }
        },
        "flowElementId": "DF1552E5-47AE-4A2A-B578-F7357E350420",
        "groupId": null,
        "id": "E36E593B-8E9F-41B5-AC74-0C4873265D06",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "ddec60a7-dae0-4124-b155-d1ff48a44ebc",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Comparison",
                      "subPathSegments": [
                        {
                          "key": "hasSwings",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "04D84B82-0279-49F4-8494-51F4446985CD"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "ddec60a7-dae0-4124-b155-d1ff48a44ebc"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Big swings",
          "storeResult": false,
          "thenComponent": {
            "componentId": "30D2299C-C7F1-4791-A3BD-7FDE3E883D20",
            "componentType": "ELEMENT"
          }
        },
        "name": "Big swings to explain?",
        "nextElementIds": [
          "30D2299C-C7F1-4791-A3BD-7FDE3E883D20"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves the latest 1000 messages from a specific thread in a Slack channel.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::getLatestThreadMessages",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::getLatestThreadMessages",
          "legacyElementId": "JS###v1###Slack###getLatestThreadMessages",
          "methodName": "getLatestThreadMessages",
          "position": {
            "x": 410,
            "y": 1660
          }
        },
        "flowElementId": "4DCD2D42-4BCE-42F1-9D98-E7AC422C7D50",
        "groupId": "410A3796-E494-441D-94A8-C62A1B3871A3",
        "id": "91D4AA55-D48D-4D8C-9371-157A33406FA1",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Digest post",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "49D3CBB6-2E19-406E-85AD-6D5BAC69A67A"
                  }
                ],
                "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": "getLatestThreadMessages",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Thread",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the thread",
        "nextElementIds": [
          "62C50951-634C-46E5-930C-8E602DEF3677"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the lead's answer Result"
          },
          "tools": {},
          "position": {
            "x": 933,
            "y": 749
          }
        },
        "flowElementId": "A24F3671-997D-43ED-B41E-97C923CD4FC8",
        "groupId": null,
        "id": "C84B3524-7B1D-4ACA-8168-A6031916D139",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Answer",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You turn a marketing lead's reply into a milestone on a Fathom Analytics graph. The lead was asked what caused big swings in last week's website traffic. Reply with JSON only, with these fields:\naddMilestone: true if the reply names something that happened (a launch, a campaign, an email, a post, an outage), false if the lead says nothing ran or does not know\nname: a short name for the milestone, at most 30 characters, in the lead's words (for example Webinar promo starts); empty text when addMilestone is false\ndate: the day it started, as YYYY-MM-DD. Use the dates of last week given below to turn a weekday into a date. If the reply gives no day, use the first day of last week. Empty text when addMilestone is false"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Last week ran from "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Weeks",
                "subPathSegments": [
                  {
                    "key": "lastStartDate",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": " to "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Weeks",
                "subPathSegments": [
                  {
                    "key": "lastEndDate",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ". Its days: "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Weeks",
                "subPathSegments": [
                  {
                    "key": "days",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nWhat moved:\n"
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Comparison",
                "subPathSegments": [
                  {
                    "key": "swings",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "04D84B82-0279-49F4-8494-51F4446985CD"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nThe lead's reply:\n"
              },
              {
                "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                "label": "Default - reply",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_PATH",
                "value": "executionContext.dataBuckets.Default.reply",
                "valueSegments": [
                  {
                    "key": "executionContext",
                    "optional": false
                  },
                  {
                    "key": "dataBuckets",
                    "optional": false
                  },
                  {
                    "key": "Default",
                    "optional": false
                  },
                  {
                    "key": "reply",
                    "optional": false
                  }
                ]
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the lead's answer",
        "nextElementIds": [
          "CCAC3B54-2081-41DF-BC00-DF2F81C5E10A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "wait",
          "isFirstElement": true,
          "blockDefinitionId": "wait",
          "mode": "SIMPLE",
          "position": {
            "x": 110,
            "y": 1669
          }
        },
        "flowElementId": "35D58EEE-FC36-4657-8A70-927B8C514065",
        "groupId": "410A3796-E494-441D-94A8-C62A1B3871A3",
        "id": "71EE783B-7CD5-4228-A4C4-F2B56BE87EBE",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "delay": {
            "expression": [
              {
                "id": "NUMBER",
                "label": null,
                "type": "INPUT",
                "value": 1800
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": "DOUBLE"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "w30",
          "storeResult": true
        },
        "name": "Wait 30 minutes",
        "nextElementIds": [
          "91D4AA55-D48D-4D8C-9371-157A33406FA1"
        ],
        "nextGroupIds": [],
        "type": "WAIT"
      },
      {
        "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": "Confirm in the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 939,
            "y": 910
          }
        },
        "flowElementId": "0C9A7D7E-7141-45D9-9A65-3E804CA22D38",
        "groupId": null,
        "id": "C1B10701-AB1D-4D7D-80A0-07ADFDD05755",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Thanks. Added the milestone "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Answer",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C84B3524-7B1D-4ACA-8168-A6031916D139"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " on "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Answer",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C84B3524-7B1D-4ACA-8168-A6031916D139"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " to the Fathom Analytics graph, so the jump has its reason next to it."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Digest post",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "49D3CBB6-2E19-406E-85AD-6D5BAC69A67A"
                  }
                ],
                "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": "Confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm in the thread",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the lead's reply Result"
          },
          "position": {
            "x": 710,
            "y": 1669
          }
        },
        "flowElementId": "0D084B54-3426-4BE9-AF9F-A16BC4C49838",
        "groupId": "410A3796-E494-441D-94A8-C62A1B3871A3",
        "id": "62C50951-634C-46E5-930C-8E602DEF3677",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "thread",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Thread",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "91D4AA55-D48D-4D8C-9371-157A33406FA1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "questionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question post",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "30D2299C-C7F1-4791-A3BD-7FDE3E883D20"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const asked = Number(questionId);\nconst replies = (Array.isArray(thread) ? thread : [])\n  .filter(m => Number(m.messageId) > asked && !m.botId && String(m.messageText || '').trim())\n  .sort((a, b) => Number(a.messageId) - Number(b.messageId));\nreturn { text: replies.length ? String(replies[0].messageText).trim() : '' };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Lead reply",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Find the lead's reply",
        "nextElementIds": [
          "18949574-292B-43B5-86BD-822C8D0BE00C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1291,
            "y": 749
          }
        },
        "flowElementId": "A8E18C8E-A2B3-4F86-9B99-076798E79675",
        "groupId": null,
        "id": "CCAC3B54-2081-41DF-BC00-DF2F81C5E10A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "ab443940-d4ec-4d43-8f9d-871277de1f24",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Answer",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "addMilestone",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "C84B3524-7B1D-4ACA-8168-A6031916D139"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "ab443940-d4ec-4d43-8f9d-871277de1f24"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Milestone to add",
          "storeResult": false,
          "thenComponent": {
            "componentId": "0566A733-5AC5-4029-843B-84405B208BEA",
            "componentType": "ELEMENT"
          }
        },
        "name": "Milestone to add?",
        "nextElementIds": [
          "0566A733-5AC5-4029-843B-84405B208BEA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "reply": "8146788f-e493-4930-a251-9c9709913b3b"
          },
          "position": {
            "x": 1010,
            "y": 1669
          }
        },
        "flowElementId": "5EAD8A12-2810-4BFC-B46B-580064BBC472",
        "groupId": "410A3796-E494-441D-94A8-C62A1B3871A3",
        "id": "18949574-292B-43B5-86BD-822C8D0BE00C",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "reply",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Lead reply",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "62C50951-634C-46E5-930C-8E602DEF3677"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "keep",
          "storeResult": true
        },
        "name": "Keep the reply",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 567,
            "y": 749
          }
        },
        "flowElementId": "76A25931-240F-4BA1-B2C9-4366CAD1D31D",
        "groupId": null,
        "id": "3E3658BD-18C0-4CD5-BA67-DDA346C8BF27",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "68f3b230-71f6-440e-b595-e81962840dfd",
                "nestedOperation": null,
                "operation": "isNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                      "label": "Default - reply",
                      "subPathSegments": null,
                      "type": "EXECUTION_CONTEXT_PATH",
                      "value": "executionContext.dataBuckets.Default.reply",
                      "valueSegments": [
                        {
                          "key": "executionContext",
                          "optional": false
                        },
                        {
                          "key": "dataBuckets",
                          "optional": false
                        },
                        {
                          "key": "Default",
                          "optional": false
                        },
                        {
                          "key": "reply",
                          "optional": false
                        }
                      ]
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": []
              }
            ],
            "grouping": [
              "68f3b230-71f6-440e-b595-e81962840dfd"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Replied",
          "storeResult": false,
          "thenComponent": {
            "componentId": "C84B3524-7B1D-4ACA-8168-A6031916D139",
            "componentType": "ELEMENT"
          }
        },
        "name": "Did the lead reply?",
        "nextElementIds": [
          "C84B3524-7B1D-4ACA-8168-A6031916D139"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Adds a milestone to a site, which marks an important date (a launch, a campaign) on its reports. Needs a token that can manage the site.",
          "elementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::createMilestone",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Mark the cause on the graph Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::fathom-analytics:::createMilestone",
          "legacyElementId": null,
          "methodName": "createMilestone",
          "position": {
            "x": 1263,
            "y": 910
          }
        },
        "flowElementId": "D2EE7AC0-BEF9-4362-A1FD-CDFBD3865978",
        "groupId": null,
        "id": "0566A733-5AC5-4029-843B-84405B208BEA",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "siteId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Site ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Site ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Answer",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C84B3524-7B1D-4ACA-8168-A6031916D139"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "milestoneDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Answer",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C84B3524-7B1D-4ACA-8168-A6031916D139"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Mark the cause on the graph', Error: The placeholder \"Site ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createMilestone",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Milestone",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "fathom-analytics",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Mark the cause on the graph",
        "nextElementIds": [
          "C1B10701-AB1D-4D7D-80A0-07ADFDD05755"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "E4089E76-4AB0-45EA-A18F-98D1540D9BC1",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "actions-group",
          "isFirstElement": false,
          "blockDefinitionId": "actions-group",
          "viewport": {
            "x": 0,
            "y": 0,
            "zoom": 0.8
          },
          "position": {
            "x": 504,
            "y": 409
          }
        },
        "flowElementId": "E3CC095E-4046-4459-B458-0CE00BC0CFBB",
        "groupId": null,
        "id": "381F7C24-F087-4E51-A863-67EB41EC02B6",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Pull both weeks from Fathom Analytics', Error: Children have error",
            "valid": false
          },
          "onFailElemId": null,
          "resultAlias": "reports",
          "storeResult": true,
          "transitionMode": "ON_COMPLETION"
        },
        "name": "Pull both weeks from Fathom Analytics",
        "nextElementIds": [
          "04D84B82-0279-49F4-8494-51F4446985CD"
        ],
        "nextGroupIds": [],
        "type": "ACTIONS"
      },
      {
        "clientMetadata": {
          "elementId": "repeat",
          "isFirstElement": false,
          "blockDefinitionId": "repeat",
          "viewport": {
            "x": -70,
            "y": -1620,
            "zoom": 1
          },
          "position": {
            "x": 157,
            "y": 749
          }
        },
        "flowElementId": "A441BBD5-E459-4858-BC8B-D830226AE2E9",
        "groupId": null,
        "id": "410A3796-E494-441D-94A8-C62A1B3871A3",
        "loopType": "REPEAT",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "18ecd805-dbde-4986-8565-9602e5875cea",
                "nestedOperation": null,
                "operation": "isEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                      "label": "Default - reply",
                      "subPathSegments": null,
                      "type": "EXECUTION_CONTEXT_PATH",
                      "value": "executionContext.dataBuckets.Default.reply",
                      "valueSegments": [
                        {
                          "key": "executionContext",
                          "optional": false
                        },
                        {
                          "key": "dataBuckets",
                          "optional": false
                        },
                        {
                          "key": "Default",
                          "optional": false
                        },
                        {
                          "key": "reply",
                          "optional": false
                        }
                      ]
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": []
              }
            ],
            "grouping": [
              "18ecd805-dbde-4986-8565-9602e5875cea"
            ]
          },
          "enabled": true,
          "firstElementId": "71EE783B-7CD5-4228-A4C4-F2B56BE87EBE",
          "maxIterations": 144,
          "onFailElemId": null,
          "resultAlias": "loop",
          "storeResult": true
        },
        "name": "Until the lead replies",
        "nextElementIds": [
          "3E3658BD-18C0-4CD5-BA67-DDA346C8BF27"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "4C0E0F14-4D7C-4183-8730-8E91D87B52C2",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Block 'Compare the two weeks' has an invalid configuration. Code Argument 'lead' has invalid value. Placeholder Data 'Marketing lead': value is required",
      "executionStaticData": [
        {
          "description": "The Fathom Analytics site to report on: its site ID, the same string as in its tracking code (for example CDBUGS).",
          "error": null,
          "name": "Site ID",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The name of your signup event in Fathom Analytics, exactly as it is tracked.",
          "error": null,
          "name": "Signup event",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "URL or ID of the Google Sheet that logs one row per week. Its first tab needs the headers Week starting, Week ending, Pageviews, Visitors, Bounce rate, Signups, Pageviews vs week before, Signups vs week before and Flagged swings.",
          "error": null,
          "name": "Traffic log sheet",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The Slack member ID of the person asked about big swings (for example U0123ABCD). Their name is mentioned in the question.",
          "error": "Placeholder Data 'Marketing lead': value is required",
          "name": "Marketing lead",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "How much a page, referrer or campaign must move against the week before, up or down, to be flagged.",
          "error": null,
          "name": "Swing threshold %",
          "type": "INT",
          "value": ""
        },
        {
          "description": "A page or referrer is only flagged when it had at least this many pageviews or visits in one of the two weeks.",
          "error": null,
          "name": "Minimum visits for a swing",
          "type": "INT",
          "value": ""
        },
        {
          "description": "A campaign is only flagged when it had at least this many signups in one of the two weeks.",
          "error": null,
          "name": "Minimum signups for a swing",
          "type": "INT",
          "value": ""
        },
        {
          "description": "The Anthropic key the AI step uses.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        }
      ],
      "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-02T01:42:26.917Z"
}
