{
  "name": "Topic to Draft - Honest AI Income Series starter",
  "flow": [
    {
      "id": 1,
      "module": "google-sheets:filterRows",
      "version": 2,
      "parameters": {
        "__IMTCONN__": null
      },
      "mapper": {
        "from": "drive",
        "mode": "select",
        "spreadsheetId": "[PICK YOUR GOOGLE SHEET]",
        "sheetId": "Topics",
        "includesHeaders": true,
        "limit": "1",
        "sortOrder": "asc",
        "filter": [
          [
            {
              "a": "C",
              "o": "text:equal",
              "b": "New"
            }
          ]
        ],
        "tableFirstRow": "A1:D1"
      },
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0,
          "name": "Find next topic (Status = New)"
        }
      }
    },
    {
      "id": 2,
      "module": "openai-gpt-3:createModelResponse",
      "version": 1,
      "parameters": {
        "__IMTCONN__": null
      },
      "mapper": {
        "model": "gpt-4o-mini",
        "input": "Write a first draft of about 250 words on this topic: {{1.`0`}}. Audience: {{1.`1`}}. Plain English, short paragraphs, no made-up statistics, no income promises. End with one line: DRAFT - check facts before use."
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0,
          "name": "AI writes the draft"
        }
      }
    },
    {
      "id": 3,
      "module": "google-sheets:updateRow",
      "version": 2,
      "parameters": {
        "__IMTCONN__": null
      },
      "mapper": {
        "from": "drive",
        "mode": "select",
        "spreadsheetId": "[PICK YOUR GOOGLE SHEET]",
        "sheetId": "Topics",
        "valueInputOption": "USER_ENTERED",
        "rowNumber": "{{1.__ROW_NUMBER__}}",
        "values": {
          "2": "Draft ready - review me",
          "3": "{{2.output_text}}"
        }
      },
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0,
          "name": "Save draft back to the sheet"
        }
      }
    }
  ],
  "metadata": {
    "instant": false,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": true,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    }
  }
}