{
  "name": "AI-Generated LinkedIn Posts with Human Approval using GPT-4, GoToHuman & Blotato",
  "nodes": [
    {
      "parameters": {
        "content": "## ✅ Step 2 — 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 “Yes”.\n\n---",
        "height": 1140,
        "width": 1200,
        "color": 5
      },
      "id": "45c13c91-30d1-4e18-8330-18c881ed6d09",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        240
      ],
      "typeVersion": 1
    },
    {
      "parameters": {},
      "id": "f33ef610-d4ce-41cc-99d7-ad3b602fec8d",
      "name": "Tool: Inject Creativity",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1392,
        1040
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "jsonSchemaExample": "[\n  {\n    \"Caption\": \"\"\n  }\n]\n"
      },
      "id": "397e7239-f0b8-4dc0-89ae-26d8ff4a0b60",
      "name": "Parser: Extract JSON from Idea",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1568,
        1040
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "id": "82f15491-0725-49ec-b9fa-bc34b0268691",
      "name": "openai",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1200,
        1072
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "content": "## ✅ Step 1 — Get Today’s 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’ve copied this Google Sheet:  \n  👉 [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’s date in ISO format.\n- The **Merge Node** filters to only return the row in the sheet that matches today’s date.\n- Result: You have today’s `idea` ready to process.\n\n---\n",
        "height": 1140,
        "width": 980
      },
      "id": "5ca7b360-de57-4042-a3b5-c873c7c344e2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        240
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "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---",
        "height": 1140,
        "width": 320,
        "color": 3
      },
      "id": "b91a1574-2233-4d63-b346-fe790d8eec61",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2224,
        240
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "## ✅ Step 4 — 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    ```",
        "height": 1140,
        "width": 380,
        "color": 4
      },
      "id": "5f68aafc-15f9-4075-a9ad-10aa1ac1c1c2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2560,
        240
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "id": "2797e246-9231-410e-bb11-1ec4704b5d3a",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        160,
        768
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {},
      "id": "b50c9b33-2fd7-4423-a2c3-e33981e2db37",
      "name": "Test",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        112,
        1024
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit?usp=drivesdk",
          "cachedResultName": "SampleTopics"
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "options": {}
      },
      "id": "13753902-fae0-472f-aa8a-af0402b1615f",
      "name": "Get Today's Idea",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        464,
        832
      ],
      "typeVersion": 4.6
    },
    {
      "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"
      },
      "id": "e33ac970-9e2b-40cf-916c-c9945ea92af3",
      "name": "Output Today's Date",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        944
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "mode": "combine",
        "advanced": true,
        "mergeByFields": {
          "values": [
            {
              "field1": "Date",
              "field2": "today"
            }
          ]
        },
        "options": {}
      },
      "id": "4da42cfb-30ed-4ee0-8d39-a9d515716811",
      "name": "Keep only todays idea",
      "type": "n8n-nodes-base.merge",
      "position": [
        768,
        720
      ],
      "typeVersion": 3.2
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Idea:  {{ $json.idea }}",
        "hasOutputParser": true,
        "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]"
        }
      },
      "id": "e38525d2-570b-45d9-91b7-81ce4989ad26",
      "name": "AI Agent: Create caption for linkedin",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1264,
        784
      ],
      "typeVersion": 1.9
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit?usp=drivesdk",
          "cachedResultName": "SampleTopics"
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "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": {}
      },
      "id": "bc235502-6d99-4f10-b26b-a23f752a8e97",
      "name": "Mark complete in google sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1904,
        720
      ],
      "typeVersion": 4.5
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit?usp=drivesdk",
          "cachedResultName": "SampleTopics"
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oC3dbRkGF_bSIKuFKtSJsYS-ZypT2uk7jPsAni8y154/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "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": {}
      },
      "id": "0646e09f-261d-4e2a-b276-68dbc9c3c7bf",
      "name": "Save caption to google sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1904,
        992
      ],
      "typeVersion": 4.5
    },
    {
      "parameters": {
        "reviewTemplateID": {
          "__rl": true,
          "mode": "list",
          "value": "RoUEcfHxQX17pM8Roj7i",
          "cachedResultName": "My Review Step (RoUEcfHxQX17pM8Roj7i)"
        },
        "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": {}
      },
      "id": "d7615f92-ad70-4c63-94c4-642e565d8a8b",
      "name": "Ask Human for approval",
      "type": "@gotohuman/n8n-nodes-gotohuman.gotoHuman",
      "position": [
        2272,
        704
      ],
      "webhookId": "6d42cd89-8e27-4747-8636-87d6adcd9f77",
      "typeVersion": 1
    },
    {
      "parameters": {
        "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"
            }
          ]
        },
        "options": {}
      },
      "id": "e72222ae-cb52-4fa0-9aee-57e5610bb26f",
      "name": "Keep only if approved",
      "type": "n8n-nodes-base.filter",
      "position": [
        2400,
        1008
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "your api key"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "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",
        "options": {}
      },
      "id": "3987f933-d5be-49f2-a0dd-9801b43bacef",
      "name": "Post to Linkedin",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2720,
        992
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "content": "# 🤖 Automated LinkedIn Posting with OpenAI, GoToHuman, and Blotato\n\n## 📬 Need Help?\n\nMessage me on [LinkedIn](https://www.linkedin.com/in/robert-breen-29429625/) \nor email me at **robert@ynteractive.com**\n",
        "height": 200,
        "width": 2940,
        "color": 6
      },
      "id": "1be6e542-a0fe-4732-8b3f-16b044ce6446",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Tool: Inject Creativity": {
      "ai_tool": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Parser: Extract JSON from Idea": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "ai_outputParser",
            "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
          }
        ]
      ]
    },
    "Test": {
      "main": [
        [
          {
            "node": "Get Today's Idea",
            "type": "main",
            "index": 0
          },
          {
            "node": "Output Today's Date",
            "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 todays idea": {
      "main": [
        [
          {
            "node": "AI Agent: Create caption for linkedin",
            "type": "main",
            "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
          }
        ]
      ]
    },
    "Save caption to google sheets": {
      "main": [
        [
          {
            "node": "Ask Human for approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask Human for approval": {
      "main": [
        [
          {
            "node": "Keep only if approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep only if approved": {
      "main": [
        [
          {
            "node": "Post to Linkedin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "b3af9b9e-b8c2-416a-92b2-7182eb1c9686",
  "meta": {
    "instanceId": "5ff5a5992c4c72af22abbdcfa574d8cdf93dc14d57eb9f66e3d9ef2a3e2dbb6c"
  },
  "id": "DSMzg7DoEbHYha44",
  "tags": []
}