{
  "name": "Weekly Review Generator",
  "description": "Every Friday it reads your tracking sheet and emails you an AI-written review of your week — reflection without the writing.",
  "tags": [
    "weekly review",
    "google sheets",
    "email",
    "on-device ai",
    "reflection",
    "journal"
  ],
  "type": "triggered",
  "nodes": [
    {
      "id": "sticky-intro",
      "position": {
        "x": 20,
        "y": 20
      },
      "data": {
        "color": "#fff266",
        "content": "🗓️ Close the week with a clear head.\n\nEvery Friday at 5pm this reads your tracking sheet, an on-device AI writes a short weekly review, and it lands in your inbox. Connect Google Sheets and Gmail, pick the sheet, and choose a model the first time. Keep your browser open for scheduled runs to fire."
      },
      "type": "stickyNote",
      "width": 360,
      "height": 210
    },
    {
      "id": "trigger-schedule",
      "position": {
        "x": 100,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:trigger:schedule"
        },
        "label": "Fridays at 5pm",
        "inputs": {
          "rules": [
            {
              "triggerInterval": "weeks",
              "triggerOnWeekdays": [
                "friday"
              ],
              "triggerAtHour": "17",
              "triggerAtMinute": 0
            }
          ]
        },
        "parameters": {
          "notes": "Runs once a week, Friday at 5pm."
        }
      },
      "type": "trigger"
    },
    {
      "id": "read-sheet",
      "position": {
        "x": 420,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:googleSheets"
        },
        "label": "Read the sheet",
        "inputs": {
          "credential": "",
          "parameters": {
            "resource": "data",
            "operation": "getValuesWorksheet",
            "spreadsheetId": "",
            "worksheetId": "",
            "range": "Sheet1!A:Z"
          }
        },
        "parameters": {
          "notes": "Reads all rows from your tracking sheet for the week."
        }
      },
      "type": "basic"
    },
    {
      "id": "aggregate-rows",
      "position": {
        "x": 740,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:aggregate"
        },
        "label": "Gather the rows",
        "inputs": {
          "mode": "allItems"
        },
        "parameters": {
          "notes": "Collects every row into a single bundle the AI can read at once, under the field 'data'."
        }
      },
      "type": "basic"
    },
    {
      "id": "compose-review",
      "position": {
        "x": 1060,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:agent:basicLLMChain"
        },
        "label": "Write the review",
        "inputs": {
          "prompt": "Write a weekly review from this data: {{ $input.data }}"
        },
        "parameters": {
          "notes": "Turns the week's rows into a short, reflective review."
        }
      },
      "type": "agent"
    },
    {
      "id": "local-model",
      "position": {
        "x": 1060,
        "y": 500
      },
      "data": {
        "instance": {
          "id": "af-base-node:dependency:webLLM"
        },
        "label": "Local AI model",
        "inputs": {
          "model": "",
          "options": {
            "temperature": 0.4
          }
        },
        "parameters": {
          "notes": "Runs the writing locally. Pick a model the first time — it downloads once, then works offline."
        }
      },
      "type": "dependency"
    },
    {
      "id": "send-email",
      "position": {
        "x": 1380,
        "y": 260
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:gmail"
        },
        "label": "Email the review",
        "inputs": {
          "credential": "",
          "parameters": {
            "resource": "message",
            "operation": "send",
            "to": [
              "you@example.com"
            ],
            "subject": "Your weekly review",
            "body": "{{ $('Write the review').response }}"
          }
        },
        "parameters": {
          "notes": "Emails the finished review to yourself. Change the recipient to your own address."
        }
      },
      "type": "basic"
    },
    {
      "id": "sticky-sheet",
      "position": {
        "x": 420,
        "y": 460
      },
      "data": {
        "color": "#ffd9b3",
        "content": "Setup needed: connect Google Sheets and pick the spreadsheet + worksheet to read."
      },
      "type": "stickyNote",
      "width": 300,
      "height": 110
    },
    {
      "id": "sticky-model",
      "position": {
        "x": 1060,
        "y": 660
      },
      "data": {
        "color": "#ffd9b3",
        "content": "Setup needed: pick a local model the first time — it downloads once, then works offline."
      },
      "type": "stickyNote",
      "width": 300,
      "height": 110
    },
    {
      "id": "sticky-gmail",
      "position": {
        "x": 1380,
        "y": 460
      },
      "data": {
        "color": "#ffd9b3",
        "content": "Setup needed: connect Gmail and set the address to send the review to."
      },
      "type": "stickyNote",
      "width": 300,
      "height": 110
    }
  ],
  "edges": [
    {
      "id": "e-schedule-sheet",
      "type": "flowEdge",
      "source": "trigger-schedule",
      "target": "read-sheet"
    },
    {
      "id": "e-sheet-aggregate",
      "type": "flowEdge",
      "source": "read-sheet",
      "target": "aggregate-rows"
    },
    {
      "id": "e-aggregate-compose",
      "type": "flowEdge",
      "source": "aggregate-rows",
      "target": "compose-review"
    },
    {
      "id": "e-compose-model",
      "type": "flowEdge",
      "source": "compose-review",
      "target": "local-model",
      "sourceHandle": "dependency-0"
    },
    {
      "id": "e-compose-email",
      "type": "flowEdge",
      "source": "compose-review",
      "target": "send-email"
    }
  ]
}