{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ffe09e4a-b779-4686-8206-a4d089632797",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        260
      ],
      "parameters": {
        "color": 5,
        "width": 1200,
        "height": 1140,
        "content": "## \u2705 Step 2 \u2014 Generate Caption with OpenAI\n\n### 1. Add Your OpenAI Credential\n- Go to **Credentials > OpenAI API**.\n- Paste your API key and save.\n- Make sure your model is set to `gpt-4.1` or similar.\n\n### 2. Workflow Logic\n- The `idea` is sent to an **AI Agent node**.\n- The prompt instructs the AI to generate a short, emoji-rich LinkedIn caption.\n- A **Parser node** structures the JSON output to extract just the caption.\n\n### 3. Save Caption\n- The AI-generated caption is written back to the Google Sheet in the `caption` column.\n- The `complete` column is also updated to \u201cYes\u201d.\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "474e2957-0aed-4e8e-be81-b97cfe31b2f6",
      "name": "Tool: Inject Creativity",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1220,
        1060
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7c06fa33-e6f1-4f07-932d-2962f793e9a2",
      "name": "Parser: Extract JSON from Idea",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1400,
        1060
      ],
      "parameters": {
        "jsonSchemaExample": "[\n  {\n    \"Caption\": \"\"\n  }\n]\n"
      },
      "typeVersion": 1.2
    },
    {
      "id": "f9f0b001-12de-43ab-9e04-d7825e0f9787",
      "name": "openai",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1040,
        1080
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "90ba9f62-3bea-4979-99e1-3fc5701a078d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        260
      ],
      "parameters": {
        "width": 980,
        "height": 1140,
        "content": "## \u2705 Step 1 \u2014 Get Today\u2019s Topic from Google Sheets\n\n### 1. Set Up Google Sheets Credential in n8n\n- Go to **Settings > Credentials > Google Sheets OAuth2**.\n- Authorize access to your Google account.\n- Make sure you\u2019ve copied this Google Sheet:  \n  \ud83d\udc49 [Copy this sheet](https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/copy)\n\n### 2. Workflow Logic\n- A **Schedule Trigger** (or Manual Trigger for testing) runs daily.\n- A **Code Node** generates today\u2019s date in ISO format.\n- The **Merge Node** filters to only return the row in the sheet that matches today\u2019s date.\n- Result: You have today\u2019s `idea` ready to process.\n\n---\n"
      },
      "typeVersion": 1
    },
    {
      "id": "975448f5-4762-42c7-a8ff-64d874f1f8aa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2060,
        260
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 1140,
        "content": "### 1. Set Up GoToHuman\n- Go to [GoToHuman](https://gotohuman.com) and create an account.\n- Create a **Review Template** for content approvals.\n- In n8n, add your **GoToHuman credential** under **Credentials**.\n- Use the **reviewTemplateId** from your template in the workflow node.\n\n### 2. Workflow Logic\n- The caption is sent to the **Ask Human for approval** node (GoToHuman).\n- The approver sees the caption and can choose to **Approve** or **Reject**.\n- A **Filter node** ensures the workflow only continues if the caption is approved.\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "d40dbea1-cdbb-43a5-ba41-93f1c3ae5559",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2400,
        260
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 1140,
        "content": "## \u2705 Step 4 \u2014 Publish to LinkedIn via Blotato\n\n### 1. Set Up Blotato\n- Go to [Blotato](https://blotato.com) and create an account.\n- Generate a **Blotato API Key** and get your **Account ID**.\n- Paste these into the **HTTP Request node** under headers/body:\n  - Header: `blotato-api-key: YOUR_API_KEY`\n  - Body:\n    ```json\n    {\n      \"post\": {\n        \"accountId\": \"YOUR_ACCOUNT_ID\",\n        \"target\": { \"targetType\": \"linkedin\" },\n        \"content\": {\n          \"text\": \"{{ $('Ask Human for approval').item.json.responseValues.text.value }}\",\n          \"platform\": \"linkedin\",\n          \"mediaUrls\": []\n        }\n      }\n    }\n    ```"
      },
      "typeVersion": 1
    },
    {
      "id": "b5cbf911-193f-4876-af70-cf572b372721",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        780
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c7dc0418-be95-4aeb-835d-3a1129d04579",
      "name": "Test",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -40,
        1040
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c5280459-6cd0-4138-b581-23f8e38c4912",
      "name": "Get Today's Idea",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        300,
        840
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit?usp=drivesdk",
          "cachedResultName": "SampleTopics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e8b6a5e6-2f67-4ba1-8c2b-b572ec4c1d0c",
      "name": "Output Today's Date",
      "type": "n8n-nodes-base.code",
      "position": [
        460,
        960
      ],
      "parameters": {
        "jsCode": "const today = new Date();\ntoday.setHours(0, 0, 0, 0); // Normalize to start of day\n\nreturn [\n  {\n    json: {\n      today: today.toISOString().split('T')[0] // e.g., \"2025-07-30\"\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "9599b1de-b2a6-49ac-a846-35d4956ce96c",
      "name": "Keep only todays idea",
      "type": "n8n-nodes-base.merge",
      "position": [
        600,
        740
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "mergeByFields": {
          "values": [
            {
              "field1": "Date",
              "field2": "today"
            }
          ]
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "fab5ffe1-3f4c-48d4-8b4f-5ff7a41188d4",
      "name": "AI Agent: Create caption for linkedin",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1100,
        800
      ],
      "parameters": {
        "text": "=Idea:  {{ $json.idea }}",
        "options": {
          "systemMessage": "=your job is to expand on the idea and turn it into a social media post that will capture users attention. keep it to two sentances using emoji's\n\nOutupt like this. \n\n[\n  {\n    \"Caption\": \"\"\n  }\n]"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "3cfdc342-d7c9-4466-9bb1-5367b592cd14",
      "name": "Mark complete in google sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1740,
        740
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $('Get Today's Idea').item.json.Date }}",
            "complete": "Yes"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "idea",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "complete",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "complete",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Date"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit?usp=drivesdk",
          "cachedResultName": "SampleTopics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "3d163f38-4a7b-4332-ab64-f833295fc0a5",
      "name": "Save caption to google sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1740,
        1000
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $('Get Today's Idea').item.json.Date }}",
            "caption": "={{ $json.output[0].Caption }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "idea",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "complete",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "complete",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "STATUS",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "STATUS",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Date"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit?usp=drivesdk",
          "cachedResultName": "SampleTopics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "2b84f67a-b87e-48c0-bf9a-3fc59fd6d86d",
      "name": "Ask Human for approval",
      "type": "@gotohuman/n8n-nodes-gotohuman.gotoHuman",
      "position": [
        2100,
        720
      ],
      "parameters": {
        "fields": {
          "value": {
            "text": "={{ $json.caption }}"
          },
          "schema": [
            {
              "id": "text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "text (text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "text"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "additionalFields": {},
        "reviewTemplateID": {
          "__rl": true,
          "mode": "list",
          "value": "RoUEcfHxQX17pM8Roj7i",
          "cachedResultName": "My Review Step (RoUEcfHxQX17pM8Roj7i)"
        }
      },
      "credentials": {
        "gotoHumanApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7f3e957e-1490-48ef-8bcc-6fa7fc70f740",
      "name": "Keep only if approved",
      "type": "n8n-nodes-base.filter",
      "position": [
        2240,
        1020
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4966b55f-f10b-415a-bc81-f8fedfc60573",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.response }}",
              "rightValue": "approved"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a5c5e685-c1b7-40f0-b6e0-cc60b45aca86",
      "name": "Post to Linkedin",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2560,
        1000
      ],
      "parameters": {
        "url": "https://backend.blotato.com/v2/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"your account id\",\n    \"target\": {\n      \"targetType\": \"linkedin\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Ask Human for approval').item.json.responseValues.text.value }}\",\n      \"platform\": \"linkedin\",\n      \"mediaUrls\": []\n    }\n  }\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "your api key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bf13ea7e-6223-4585-ace5-3d9d71276626",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        20
      ],
      "parameters": {
        "color": 6,
        "width": 2940,
        "height": 200,
        "content": "# \ud83e\udd16 Automated LinkedIn Posting with OpenAI, GoToHuman, and Blotato\n\n## \ud83d\udcec Need Help?\n\nMessage me on [LinkedIn](https://www.linkedin.com/in/robert-breen-29429625/) \nor email me at **robert@ynteractive.com**\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Test": {
      "main": [
        [
          {
            "node": "Get Today's Idea",
            "type": "main",
            "index": 0
          },
          {
            "node": "Output Today's Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "openai": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Daily Trigger": {
      "main": [
        [
          {
            "node": "Get Today's Idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Today's Idea": {
      "main": [
        [
          {
            "node": "Keep only todays idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Today's Date": {
      "main": [
        [
          {
            "node": "Keep only todays idea",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Keep only if approved": {
      "main": [
        [
          {
            "node": "Post to Linkedin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep only todays idea": {
      "main": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask Human for approval": {
      "main": [
        [
          {
            "node": "Keep only if approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tool: Inject Creativity": {
      "ai_tool": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Save caption to google sheets": {
      "main": [
        [
          {
            "node": "Ask Human for approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parser: Extract JSON from Idea": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent: Create caption for linkedin": {
      "main": [
        [
          {
            "node": "Save caption to google sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Mark complete in google sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}