{
  "name": "Google Sheets content calendar to AckPost drafts",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger",
      "name": "Run manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "content": "Connect this to Google Sheets once imported. Map your row fields into the AckPost draft payload below. Keep drafts in AckPost for approval before publishing."
      },
      "id": "setup-note",
      "name": "Setup note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [0, -220]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "brand",
              "name": "brandId",
              "type": "string",
              "value": "replace-with-ackpost-brand-id"
            },
            {
              "id": "content",
              "name": "content",
              "type": "string",
              "value": "Draft from n8n: replace this with your Google Sheet row content."
            },
            {
              "id": "platform",
              "name": "platform",
              "type": "string",
              "value": "linkedin"
            },
            {
              "id": "source",
              "name": "source",
              "type": "string",
              "value": "n8n-google-sheets"
            }
          ]
        }
      },
      "id": "map-fields",
      "name": "Map draft fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [260, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://ackpost.com/api/ackpost/mcp",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"jsonrpc\": \"2.0\",\n  \"id\": \"n8n-create-draft\",\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"ackpost_create_draft\",\n    \"arguments\": {\n      \"brandId\": \"{{ $json.brandId }}\",\n      \"content\": \"{{ $json.content }}\",\n      \"platform\": \"{{ $json.platform }}\",\n      \"source\": \"{{ $json.source }}\"\n    }\n  }\n}"
      },
      "id": "create-ackpost-draft",
      "name": "Create AckPost draft",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [540, 0],
      "credentials": {
        "httpHeaderAuth": {
          "id": "replace-with-credential-id",
          "name": "AckPost API Key"
        }
      }
    }
  ],
  "connections": {
    "Run manually": {
      "main": [
        [
          {
            "node": "Map draft fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map draft fields": {
      "main": [
        [
          {
            "node": "Create AckPost draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
