{
  "id": "ynlgDnRU3m6jKK6z",
  "name": "Create social media content with AI and schedule for daily posting",
  "tags": [],
  "nodes": [
    {
      "id": "21a21ff1-404f-4f43-8360-a9b2038e4369",
      "name": "Airtable Trigger",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        688,
        656
      ],
      "parameters": {
        "baseId": {
          "__rl": true,
          "mode": "url",
          "value": "https://airtable.com/appohoaAJ51qH5A72/tblNdd8e8BP4CbgkB"
        },
        "tableId": {
          "__rl": true,
          "mode": "id",
          "value": "tblNdd8e8BP4CbgkB"
        },
        "pollTimes": {
          "item": [
            {}
          ]
        },
        "triggerField": "Created",
        "authentication": "airtableTokenApi",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "effbfc49-b469-420f-871b-642bcdd7b83e",
      "name": "Generate AI Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        896,
        656
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/generate-ai-image ",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"FLUX.1-schnell\",\n  \"input\": {\n    \"prompt\": \"{{ $json.fields.Prompt }}\",\n    \"aspect_ratio\": \"16:9\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "5f9cf79c-cb92-41e7-9b8d-9533f0e23135",
      "name": "Upload media",
      "type": "@postpulse/n8n-nodes-postpulse.postPulse",
      "position": [
        1728,
        656
      ],
      "parameters": {
        "resource": "media"
      },
      "typeVersion": 1
    },
    {
      "id": "4776b4bd-6e80-4c73-99a9-fac3ed4fb9ab",
      "name": "Schedule a light post",
      "type": "@postpulse/n8n-nodes-postpulse.postPulse",
      "position": [
        2144,
        656
      ],
      "parameters": {
        "content": "={{ $('Create Social Media Post').item.json.content[0].text }}",
        "operation": "scheduleLight",
        "scheduledTime": "={{ $now.plus({ days: 1 }) }}",
        "attachmentPaths": "={{ $json.path }}",
        "socialMediaAccount": "X_TWITTER|1154"
      },
      "typeVersion": 1
    },
    {
      "id": "12e7163b-cf87-4a7f-a4ed-e86149b7ea0e",
      "name": "Create or update a record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2352,
        656
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appohoaAJ51qH5A72",
          "cachedResultUrl": "https://airtable.com/appohoaAJ51qH5A72",
          "cachedResultName": "Get Social Media Prompt"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblNdd8e8BP4CbgkB",
          "cachedResultUrl": "https://airtable.com/appohoaAJ51qH5A72/tblNdd8e8BP4CbgkB",
          "cachedResultName": "Table 1"
        },
        "columns": {
          "value": {
            "Posted?": "Yes"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Post Idea",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Post Idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Created",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Created",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Posted?",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Yes",
                  "value": "Yes"
                },
                {
                  "name": "No",
                  "value": "No"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Posted?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "typeVersion": 2.1
    },
    {
      "id": "afe878d1-b5bb-46a0-88fb-4306374fd192",
      "name": "Download File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1536,
        656
      ],
      "parameters": {
        "url": "={{ $('Generate AI Image').item.json.images[0].url }}",
        "options": {}
      },
      "typeVersion": 4.4
    },
    {
      "id": "5e7be5a9-9f5f-4890-9224-65cd90e3bb67",
      "name": "Create Social Media Post",
      "type": "@n8n/n8n-nodes-langchain.anthropic",
      "position": [
        1088,
        656
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "claude-haiku-4-5-20251001",
          "cachedResultName": "claude-haiku-4-5-20251001"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "assistant",
              "content": "=Create a short social media post using the provided idea below. Generate only the output:\n\n {{ $('Airtable Trigger').item.json.fields['Post Idea'] }}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d06657a7-fca3-4da9-ab72-af8ad78aa749",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 544,
        "height": 848,
        "content": "**Workflow Purpose**\nA social media content creation workflow that generates AI image, create social media content with Claude, and schedule post in PostPulse - using data from Airtable.\n\n## Workflow Steps\n**1. Airtable Trigger** \n* Triggers the worflow whenever a new table is created in Airtable. \n\n\n**2. Generate AI Image**\n* Creates an AI Image using Flux and the image prompt from Airtable.\n\n\n**3. Create Social Media Post**\n* Creates a social media post using Claude and the post idea prompt from Airtable.\n\n\n**4. Download File**\n* Download the generated AI Image.\n\n\n**5. Upload Media**\n* Upload the AI Image to PostPulse for use in step 6. Output will generate a path ID.\n\n\n**6. Schedule a Light Post**\n* Schedule post to go out daily. \n\n\n**7. Create or  Update a record**\n* Update status of Airtable record to \"yes\".\n\n\n\n## Notes\nA json expression is used in step 6 that schedules the post a day in advance. Right now it schedules one day in advance but can be changed to schedule two days in advance or more based on specification."
      },
      "typeVersion": 1
    },
    {
      "id": "088040a8-1719-4aa3-83b0-0a00dfd7b5ef",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 320,
        "content": "## Kick-Off workflow\n\nSearches Airtable and uses AI to generate an image and a sociale media post with Flux and Claude respectively."
      },
      "typeVersion": 1
    },
    {
      "id": "0b16becb-01cd-40fb-bcde-860b44a585ba",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 528,
        "height": 320,
        "content": "## Upload Generated AI Image\n\nDownloads the generated AI image and uploads it for later scheduling."
      },
      "typeVersion": 1
    },
    {
      "id": "90273fd1-d6e4-46b1-920e-a9044437a73e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2032,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 320,
        "content": "## Schedule Post and Updates Airtable\n\nSchedules generated social media post and generated image in PostPulse and updates a record in Airtable."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "d9349ffd-5133-4421-b404-081af2794312",
  "connections": {
    "Upload media": {
      "main": [
        [
          {
            "node": "Schedule a light post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Airtable Trigger": {
      "main": [
        [
          {
            "node": "Generate AI Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Image": {
      "main": [
        [
          {
            "node": "Create Social Media Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule a light post": {
      "main": [
        [
          {
            "node": "Create or update a record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Social Media Post": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}