{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Weekly digest — Gmail",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Weekly metrics",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "to": "team@yourco.test",
          "week": "W28",
          "signups": 42
        }
      },
      "position": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "send",
      "type": "output.gmail",
      "label": "Send digest",
      "category": "output",
      "config": {
        "credentialId": "",
        "accessToken": "${credential.google.accessToken}",
        "operation": "send",
        "to": "{{ $json.to }}",
        "cc": "",
        "bcc": "",
        "subject": "Digest {{ $json.week }}: {{ $json.signups }} signups",
        "bodyText": "Signups this week: {{ $json.signups }}. Full board in the dashboard.",
        "bodyHtml": "",
        "attachmentsField": "",
        "baseUrl": "",
        "timeoutMs": 15000
      },
      "position": {
        "x": 530,
        "y": 0
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Sent",
      "category": "utility",
      "config": {
        "message": "digest {{ $json.week }} sent"
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "send",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "send",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "SETUP: add a “google-oauth2” credential in Admin → Credentials, then Test sends for real — the node is pre-wired with ${credential.…} references. Until then this demo saves and verifies but the send will report the missing credential. Sends the weekly metrics digest from your Google account (OAuth)."
  }
}