{
  "name": "Automate google analytics reporting",
  "nodes": [
    {
      "id": "1b3a0365-92e0-4b51-9a5f-2562b7f3de39",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        560,
        940
      ]
    },
    {
      "id": "5c35f802-82e7-457a-9f11-4d9026cbf0e0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        360
      ],
      "parameters": {
        "width": 1270.4518485107694,
        "height": 209.13454984057833,
        "content": "# Aggregate Google Analytics data and Email the results\n\nThis workflow will check for country views, page engagement and google search console results. It will take this week's data and compare it to "
      }
    },
    {
      "id": "54288de3-60ec-4119-a067-e6b8e67949b9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        600
      ],
      "parameters": {
        "width": 1269.8517211291685,
        "height": 745.919853945687,
        "content": "## Property ID\n\n1. Create your [Google Analytics Credentials](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/?utm_source=n8n_app&utm_medium=credential_settings&utm_ca"
      }
    },
    {
      "id": "cc1c37f3-6354-4413-9ee1-473509fc23e7",
      "name": "Get Page Engagement Stats for this week",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        840,
        740
      ]
    },
    {
      "id": "c6b8f171-0e43-4d55-9ba0-c17a8cddca5b",
      "name": "Get Page Engagement Stats for prior week",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        1240,
        740
      ]
    },
    {
      "id": "3c056c98-055d-4dc5-870d-d9c01c467714",
      "name": "Get Google Search Results for this week",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        1640,
        740
      ]
    },
    {
      "id": "ea5cdc7a-b00b-45d6-86e9-dd2a61451cca",
      "name": "Get Country views data for this week",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        1240,
        940
      ]
    },
    {
      "id": "d52e9084-d00b-490f-b107-ed9904423a03",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        360
      ],
      "parameters": {
        "width": 231.71528995536218,
        "height": 986.0715248510506,
        "content": "## AlexK1919 \n![Alex Kim](https://media.licdn.com/dms/image/v2/D5603AQFOYMkqCPl6Sw/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1718309808352?e=1736985600&v=beta&t=pQKm7lQ"
      }
    },
    {
      "id": "d1160f2f-80ca-4900-8b85-d94073cf38e3",
      "name": "Aggregate Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1040,
        1140
      ]
    },
    {
      "id": "14fea93c-7d9c-4f58-96a3-b241f6b0bcec",
      "name": "Get Google Search Results for prior week",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        840,
        940
      ]
    },
    {
      "id": "436c7977-0214-4b23-924a-3915c0f27d28",
      "name": "Get Country views data for prior week",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        1640,
        940
      ]
    },
    {
      "id": "15f3edcb-2e31-4faa-8db2-62da69bbfe8d",
      "name": "Parse - Get Page Engagement This Week",
      "type": "n8n-nodes-base.code",
      "position": [
        1040,
        740
      ]
    },
    {
      "id": "46cd21cd-c7f4-45cb-a724-db8a122f9de3",
      "name": "Parse - Get Page Engagement Prior Week",
      "type": "n8n-nodes-base.code",
      "position": [
        1440,
        740
      ]
    },
    {
      "id": "6bef6c5c-74a1-4566-8b8d-372414ae9b0d",
      "name": "Parse - Get Google Search This Week",
      "type": "n8n-nodes-base.code",
      "position": [
        1840,
        740
      ]
    },
    {
      "id": "d0c2b575-6bf0-40d7-80e9-c4f1702df7c8",
      "name": "Parse - Get Google Search Prior Week",
      "type": "n8n-nodes-base.code",
      "position": [
        1040,
        940
      ]
    },
    {
      "id": "1fca2a6c-1b60-4860-ad60-3e0696f2cb07",
      "name": "Parse - Country Views This Week",
      "type": "n8n-nodes-base.code",
      "position": [
        1440,
        940
      ]
    },
    {
      "id": "23679bde-bf02-465a-a656-5eeea0e82f34",
      "name": "Parse - Country Views Prior Week",
      "type": "n8n-nodes-base.code",
      "position": [
        1840,
        940
      ]
    },
    {
      "id": "d6797f36-d715-4821-9747-cea5c87dc2cb",
      "name": "Set urlStrings",
      "type": "n8n-nodes-base.set",
      "position": [
        840,
        1140
      ]
    },
    {
      "id": "5990f2af-1fc4-4ed5-aea6-c46bebb463a8",
      "name": "Format Data",
      "type": "n8n-nodes-base.code",
      "position": [
        840,
        1480
      ]
    },
    {
      "id": "74ad1eef-3a5b-4939-83ee-be0c4b6c13cb",
      "name": "Input All",
      "type": "n8n-nodes-base.code",
      "position": [
        1240,
        1140
      ]
    },
    {
      "id": "019a40de-80c8-4ede-a86b-babb2c6288eb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        1380
      ],
      "parameters": {
        "width": 1264.897623827279,
        "height": 295.7350020039967,
        "content": "## Format the data and Email"
      }
    },
    {
      "id": "f81326ce-ac35-4463-8444-e9c2b7be027b",
      "name": "Email the Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1040,
        1480
      ]
    },
    {
      "id": "9358a6bc-3696-4647-b02d-891c597d1cb6",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        560,
        1140
      ]
    }
  ],
  "connections": {
    "Input All": {
      "main": [
        [
          {
            "node": "Format Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Data": {
      "main": [
        [
          {
            "node": "Email the Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Data": {
      "main": [
        [
          {
            "node": "Input All",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set urlStrings": {
      "main": [
        [
          {
            "node": "Aggregate Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse - Country Views This Week": {
      "main": [
        [
          {
            "node": "Get Country views data for prior week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse - Country Views Prior Week": {
      "main": [
        [
          {
            "node": "Set urlStrings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get Page Engagement Stats for this week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse - Get Google Search This Week": {
      "main": [
        [
          {
            "node": "Get Google Search Results for prior week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Country views data for this week": {
      "main": [
        [
          {
            "node": "Parse - Country Views This Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse - Get Google Search Prior Week": {
      "main": [
        [
          {
            "node": "Get Country views data for this week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Country views data for prior week": {
      "main": [
        [
          {
            "node": "Parse - Country Views Prior Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse - Get Page Engagement This Week": {
      "main": [
        [
          {
            "node": "Get Page Engagement Stats for prior week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse - Get Page Engagement Prior Week": {
      "main": [
        [
          {
            "node": "Get Google Search Results for this week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google Search Results for this week": {
      "main": [
        [
          {
            "node": "Parse - Get Google Search This Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Page Engagement Stats for this week": {
      "main": [
        [
          {
            "node": "Parse - Get Page Engagement This Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google Search Results for prior week": {
      "main": [
        [
          {
            "node": "Parse - Get Google Search Prior Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Page Engagement Stats for prior week": {
      "main": [
        [
          {
            "node": "Parse - Get Page Engagement Prior Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}