Éditeur de publications sociales AI via PostPulse

Avancé

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 16 nœuds.Utilise principalement des nœuds comme Set, Code, Merge, ManualTrigger, OpenAi. Générer des publications pour les réseaux sociaux multiplateforme avec GPT-4.1 et PostPulse

Prérequis
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "FS1zmh5zmaLSg0jw",
  "meta": {
    "instanceId": "bf246f909c2b838648f333c22c98b9bde186937bc00a5918bd9a27f4ec3914d3",
    "templateCredsSetupCompleted": true
  },
  "name": "AI Social Publisher via PostPulse",
  "tags": [],
  "nodes": [
    {
      "id": "c5aa58f2-1be9-405e-93d3-d5011b6dfa05",
      "name": "Lors du clic sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        192
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6900757a-86f1-45ed-a976-e041383e510b",
      "name": "Obtenir les comptes connectés",
      "type": "@postpulse/n8n-nodes-postpulse.postPulse",
      "position": [
        768,
        448
      ],
      "parameters": {
        "resource": "account"
      },
      "credentials": {
        "postPulseOAuth2Api": {
          "id": "nrEYznJjQaKGajyK",
          "name": "PostPulse account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cb6c4037-384f-4cff-b31e-8d2a1a5b2934",
      "name": "Idée",
      "type": "n8n-nodes-base.set",
      "position": [
        304,
        32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1279a713-d71c-44a0-a65e-01679663007c",
              "name": "idea",
              "type": "string",
              "value": "Write a post for my restaurant called \"West Coast\", write that oysters and squid have appeared on our menu and many new items from Asian cuisine, in honor of this, a discount on Asian cuisine and seafood dishes minus 40 percent!"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b2b9f6da-0586-4fc8-9c7b-88cdf4b638ac",
      "name": "Adaptateur de contenu IA",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        784,
        -80
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an expert in creating content for social media, adapting content for different platforms while maintaining the core message and maximizing engagement for each platform's unique audience. Write in English only."
            },
            {
              "content": "={{$json[\"text\"]}}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "PSmGB8tfEOzisT6A",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4bf62121-7d1b-45c0-88da-25d61eee5c72",
      "name": "Fusion",
      "type": "n8n-nodes-base.merge",
      "position": [
        1440,
        176
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "fieldsToMatchString": "platform"
      },
      "typeVersion": 3.2
    },
    {
      "id": "ef889214-42cf-4346-afea-fed139035937",
      "name": "Publier la publication",
      "type": "@postpulse/n8n-nodes-postpulse.postPulse",
      "position": [
        1664,
        144
      ],
      "parameters": {
        "isDraft": true,
        "publications": {
          "publication": [
            {
              "posts": {
                "post": [
                  {
                    "content": "={{ (function(){\n    const fullText = $json.text || '';\n    const p = $json.platform;\n    let max = 500;\n    if(p==='X_TWITTER') max = 280;\n    if(p==='BLUE_SKY') max = 300;\n    if(fullText.length <= max) return fullText;\n    const d = fullText.lastIndexOf('.', max),\n          e = fullText.lastIndexOf('!', max),\n          q = fullText.lastIndexOf('?', max),\n          s = Math.max(d,e,q),\n          l = max*0.6;\n    if(s>0 && s>=l) return fullText.substring(0,s+1);\n    const w = fullText.lastIndexOf(' ', max);\n    return fullText.substring(0, w>0?w:max) + '...';\n})() }}\n"
                  }
                ]
              },
              "platformSettings": "={{ (function() { const platformMapping = { 'X_TWITTER': 'TWITTER', 'YOUTUBE': 'YOUTUBE', 'THREADS': 'THREADS', 'TIKTOK': 'TIK_TOK', 'INSTAGRAM': 'INSTAGRAM', 'FACEBOOK': 'FACEBOOK', 'LINKEDIN': 'LINKEDIN', 'BLUE_SKY': 'BLUE_SKY', 'TELEGRAM': 'TELEGRAM' }; return JSON.stringify({ \"type\": platformMapping[$json.platform] }); })() }}",
              "socialMediaAccountId": "={{ $json.id }}"
            }
          ]
        },
        "scheduledTime": "={{$now.toUTC()}}"
      },
      "credentials": {
        "postPulseOAuth2Api": {
          "id": "nrEYznJjQaKGajyK",
          "name": "PostPulse account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a7072966-6003-4e56-a918-8a8e3a195300",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -416
      ],
      "parameters": {
        "width": 624,
        "height": 144,
        "content": "## AI Social Publisher via PostPulse\nThis workflow automatically adapts your ideas into social media posts with AI, adjusts content for different platforms (Twitter, LinkedIn, TikTok, Telegram, YouTube, etc.), and schedules them as drafts in PostPulse for further review or publishing.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "87a7b4cb-a406-4afa-9aea-9781419ac9d2",
      "name": "Définir restrictions et hashtags",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        -32
      ],
      "parameters": {
        "jsCode": "// Get the user's idea from the previous Set node\nlet idea = items[0].json.idea;\n\n// Define platforms with character limits\nconst platforms = {\n  TELEGRAM: 800,\n  TIKTOK: 800,\n  LINKEDIN: 800,\n  X_TWITTER: 280,\n  YOUTUBE: 400\n};\n\n// Return one item per platform with platform name + text\nreturn Object.entries(platforms).map(([platform, maxLength]) => {\n  return {\n    json: {\n      platform: platform, // THIS IS IMPORTANT\n      text: `${idea} \\nCreate a post for ${platform} within ${maxLength} characters and add 3-4 relevant hashtags based on the topic. Write in English only.`\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "8cc19030-7f06-4f7a-b01f-cc00cdba5503",
      "name": "Unification des plateformes et du texte",
      "type": "n8n-nodes-base.code",
      "position": [
        1184,
        -48
      ],
      "parameters": {
        "jsCode": "// Define platforms in the same порядок, що використовувався перед OpenAI\nconst platforms = [\"TELEGRAM\", \"TIKTOK\", \"LINKEDIN\", \"X_TWITTER\", \"YOUTUBE\"];\n\n// Output array from OpenAI\nconst aiItems = items; // items — це вхідні дані з OpenAI ноди\n\n// We iterate and add platform to each item\nreturn aiItems.map((item, index) => {\n    return {\n        json: {\n            platform: platforms[index] || \"unknown\", // protection in case there are more or less items\n            text: item.json?.message?.content || \"\" // text from OpenAI\n        }\n    };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "89db40dc-4dbc-46c2-bf97-b52acf6486b4",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        176
      ],
      "parameters": {
        "width": 176,
        "height": 96,
        "content": "## Idea  \nEnter your post idea here.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "472b4241-842b-4bb5-86ba-7b7531d98c68",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -208
      ],
      "parameters": {
        "width": 464,
        "content": "## Setting Restrictions and Hashtags  \nHere the idea is adapted for each platform with limits and hashtags.  \nOptionally, you can change character limits (within each platform’s max), adjust hashtag count, or tweak prompts.  \nBy default, everything works fine — changes are optional.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "08b3e28e-798c-4c6f-abc3-89fbf65a21ef",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -224
      ],
      "parameters": {
        "width": 272,
        "height": 128,
        "content": "## AI Content Adapter  \nThis is the AI node that generates platform-specific content variations.  \nIt adapts the idea into ready posts.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f171cec9-22dc-4e90-b705-1ca03aca4304",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -192
      ],
      "parameters": {
        "width": 288,
        "height": 128,
        "content": "## Unification of Platforms and Text  \nCombines AI-generated text with the corresponding platform for publishing.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "47116afa-50d0-4ab0-b1c8-c3346b10c71d",
      "name": "Note adhésive8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        304
      ],
      "parameters": {
        "width": 352,
        "height": 128,
        "content": "## PostPulse Get Connected Accounts\nRetrieves your linked social media accounts for publishing posts.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ec553756-5bfa-42c6-b2f9-c624b698cea8",
      "name": "Note adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        336
      ],
      "parameters": {
        "width": 288,
        "height": 144,
        "content": "## Merge  \nMerges the platform info from connected accounts with the AI-generated posts, preparing data for publishing.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d47184a4-74f7-40ec-b79a-2b8b15dba73b",
      "name": "Note adhésive6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        16
      ],
      "parameters": {
        "width": 304,
        "height": 112,
        "content": "## Publish Post  \nSends the prepared posts to PostPulse as drafts, ready for scheduling or publishing.  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ef6f4402-3c77-4ec4-8df8-b3df02ba6208",
  "connections": {
    "cb6c4037-384f-4cff-b31e-8d2a1a5b2934": {
      "main": [
        [
          {
            "node": "87a7b4cb-a406-4afa-9aea-9781419ac9d2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4bf62121-7d1b-45c0-88da-25d61eee5c72": {
      "main": [
        [
          {
            "node": "ef889214-42cf-4346-afea-fed139035937",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b2b9f6da-0586-4fc8-9c7b-88cdf4b638ac": {
      "main": [
        [
          {
            "node": "8cc19030-7f06-4f7a-b01f-cc00cdba5503",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6900757a-86f1-45ed-a976-e041383e510b": {
      "main": [
        [
          {
            "node": "4bf62121-7d1b-45c0-88da-25d61eee5c72",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "87a7b4cb-a406-4afa-9aea-9781419ac9d2": {
      "main": [
        [
          {
            "node": "b2b9f6da-0586-4fc8-9c7b-88cdf4b638ac",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8cc19030-7f06-4f7a-b01f-cc00cdba5503": {
      "main": [
        [
          {
            "node": "4bf62121-7d1b-45c0-88da-25d61eee5c72",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c5aa58f2-1be9-405e-93d3-d5011b6dfa05": {
      "main": [
        [
          {
            "node": "6900757a-86f1-45ed-a976-e041383e510b",
            "type": "main",
            "index": 0
          },
          {
            "node": "cb6c4037-384f-4cff-b31e-8d2a1a5b2934",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds16
Catégorie2
Types de nœuds7
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur

Hnatiuk Dmytro is a Content Manager at PostPulse, experienced in copywriting, localization, and social media marketing. Skilled in creating engaging content strategies, managing multi-platform campaigns, and optimizing posts for audience engagement. He also has technical skills in HTML, JavaScript, Node.js, and C#, with a background in cybersecurity. Outside of work, Dmytro is a musician, enjoys playing and listening to music, stays active through sports, and values connecting with people

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34