{
  "name": "Abacus IG",
  "nodes": [
    {
      "parameters": {
        "node": "17841442292833891",
        "imageUrl": "={{ $json.url }}",
        "caption": "={{ $('Pick one post idea').item.json['Instagram Caption'] }}",
        "additionalFields": {}
      },
      "type": "@mookielianhd/n8n-nodes-instagram.instagram",
      "typeVersion": 1,
      "position": [
        416,
        0
      ],
      "id": "af8a5abe-b32d-40cf-b176-13d8fa478311",
      "name": "Publish",
      "credentials": {
        "instagramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "image",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-3.1-flash-image-preview",
          "mode": "list",
          "cachedResultName": "models/gemini-3.1-flash-image-preview (Nano Banana 2)"
        },
        "prompt": "={{ $json['Image Generation Prompt'] }}\n\nText on Image: {{ $json['Text on Image'] }}\n\nNote: Do not mention any website, phone number, email or Instagram handle on the image.",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1.2,
      "position": [
        -32,
        0
      ],
      "id": "26f68c2e-2612-44ff-a6b6-fce637e32aef",
      "name": "Generate an image",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-uploadtourl.uploadToUrl",
      "typeVersion": 1,
      "position": [
        192,
        0
      ],
      "id": "da0aea79-f833-484f-8131-c56c094cd97b",
      "name": "Upload a File",
      "credentials": {
        "uploadToUrlApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -480,
        0
      ],
      "id": "5c8580a7-f0a2-4f71-8c7d-19dae7a7e16a",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Z6dLFZbj3z5NIX1C0lWRGYhiBV05QuoBXaBCYqitm2I",
          "mode": "list",
          "cachedResultName": "The Smart Math Coach - Instagram Prompts & Content Calendar",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z6dLFZbj3z5NIX1C0lWRGYhiBV05QuoBXaBCYqitm2I/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1079071490,
          "mode": "list",
          "cachedResultName": "Smart Math Coach - Instagram Prompts & Content Calendar",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z6dLFZbj3z5NIX1C0lWRGYhiBV05QuoBXaBCYqitm2I/edit#gid=1079071490"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Status",
              "lookupValue": "Ready"
            }
          ]
        },
        "options": {
          "returnFirstMatch": true
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -256,
        0
      ],
      "id": "b3a9b32c-8f93-469d-bc5e-2ac1a0b155c0",
      "name": "Pick one post idea",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Z6dLFZbj3z5NIX1C0lWRGYhiBV05QuoBXaBCYqitm2I",
          "mode": "list",
          "cachedResultName": "The Smart Math Coach - Instagram Prompts & Content Calendar",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z6dLFZbj3z5NIX1C0lWRGYhiBV05QuoBXaBCYqitm2I/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1079071490,
          "mode": "list",
          "cachedResultName": "Smart Math Coach - Instagram Prompts & Content Calendar",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z6dLFZbj3z5NIX1C0lWRGYhiBV05QuoBXaBCYqitm2I/edit#gid=1079071490"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Pick one post idea').item.json.row_number }}",
            "Status": "Posted"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Category",
              "displayName": "Category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Image Generation Prompt",
              "displayName": "Image Generation Prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Text on Image",
              "displayName": "Text on Image",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram Caption",
              "displayName": "Instagram Caption",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        640,
        0
      ],
      "id": "1dd8cc9a-8a33-449c-9f2d-e099cbcf2c2a",
      "name": "Update status to posted",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Generate an image": {
      "main": [
        [
          {
            "node": "Upload a File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload a File": {
      "main": [
        [
          {
            "node": "Publish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Pick one post idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish": {
      "main": [
        [
          {
            "node": "Update status to posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick one post idea": {
      "main": [
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "versionId": "e1466d1f-67d5-49a5-8248-bc132053b61b",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "UF2EgKEEDpMpAipE",
  "tags": []
}