Concepteur de publications avec intervention humaine (Mistral AI, ImageKit et publication LinkedIn)

Avancé

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 25 nœuds.Utilise principalement des nœuds comme S3, Set, Gmail, Merge, Switch. Créateur de posts assisté par l'homme combinant Mistral AI, ImageKit et LinkedIn

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Informations d'identification LinkedIn API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
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
{
  "meta": {
    "instanceId": "d2787088d49a05164783f5a9fa37e1730a27b190e51881d2128ba2bcd8c2656e",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "a171f8ee-c782-4e49-8725-4c4da246a72d",
      "name": "À la réception d'un message chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -2880,
        3980
      ],
      "webhookId": "1754b88b-6591-4373-a595-78c638e915b5",
      "parameters": {
        "options": {
          "allowFileUploads": true
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "19f45580-6118-4fa9-bbeb-3cce50066b07",
      "name": "Modifier les champs",
      "type": "n8n-nodes-base.set",
      "position": [
        -2600,
        3980
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "6ccb2d73-64ec-48d0-8f91-3221176cd821",
              "name": "post",
              "type": "string",
              "value": "={{ $json.chatInput }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "90736b86-55b7-4cfe-95a6-7a1534801d06",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        -2340,
        4180
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "mRwBaVJZsN6hIzkX",
          "name": "Mistral Cloud account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "547da51e-321c-451a-b96d-84fe6d7600f2",
      "name": "Modifier les champs6",
      "type": "n8n-nodes-base.set",
      "position": [
        -1840,
        3980
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ee05a8b8-0010-4f6a-ae59-9acd4cda9c5c",
              "name": "line1",
              "type": "string",
              "value": "={{ $json.output.line1 }}"
            },
            {
              "id": "d7579879-3c87-47bf-904e-fd984265631a",
              "name": "safeName",
              "type": "string",
              "value": "={{ $('AI Agent').item.json.output.line1.split(' ')[0].replace(/[^a-zA-Z0-9]/g, '') + '_' + new Date().toISOString().slice(0,10).replace(/-/g, '') }}"
            },
            {
              "id": "9d254a6b-e6eb-4df4-a771-e03a829ac4d8",
              "name": "line2",
              "type": "string",
              "value": "={{ $json.output.line2 }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "294d48b7-6da6-419d-8c1d-4a2f2078193d",
      "name": "Envoyer le contenu pour approbation1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -760,
        4080
      ],
      "webhookId": "a23938a4-fc6c-4445-8dee-17e501e92e06",
      "parameters": {
        "sendTo": "= {{ $json.email }}",
        "message": "=your post is ready\n{{ $json.output }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "Approval Required for LinkedIn post",
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Approve Content?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Yes"
                  },
                  {
                    "option": "No"
                  },
                  {
                    "option": "Cancel"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Content Feedback"
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "WuamtxlwHxi5NKfr",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "3a9acbcd-710d-4a28-adf8-eb366afb93de",
      "name": "Résultat de l'approbation1",
      "type": "n8n-nodes-base.switch",
      "position": [
        -560,
        4100
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Yes",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "317039f4-754e-4cb0-a674-eb8d26c9ed27",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.data['Approve Content?'] }}",
                    "rightValue": "Yes"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "No",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "caace3ea-4ca0-40de-84fb-5a8fd809a0eb",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.data['Approve Content?'] }}",
                    "rightValue": "No"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Cancel",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f93e5649-6a21-49a9-9993-85f1323139b0",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.data['Approve Content?'] }}",
                    "rightValue": "Cancel"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "c8e6149c-36f2-456e-8925-ae55e2ad5cb7",
      "name": "Révision basée sur les retours",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -60,
        4220
      ],
      "parameters": {
        "text": "=##role\nyou are assistant to make LinkedIn post based on user response\npost :{{ $('AI Agent').item.json.output.postclean }}\nchanges :{{ $json.data['Content Feedback'] }}\nDon't make drastic changes — only needed edits for grammar, clarity, or flow.\nReturn the post back in the same tone and structure.\n\n##input",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "f405cc1c-e824-46b2-8440-9562086bc3a6",
      "name": "Fusionner",
      "type": "n8n-nodes-base.merge",
      "position": [
        200,
        3980
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.1
    },
    {
      "id": "cd07964b-d52f-4ca6-acfe-50abbc9a08bc",
      "name": "S32",
      "type": "n8n-nodes-base.s3",
      "position": [
        -1280,
        4080
      ],
      "parameters": {
        "fileName": "={{ $json.safeName }}",
        "operation": "upload",
        "bucketName": "rag",
        "additionalFields": {}
      },
      "credentials": {
        "s3": {
          "id": "kxM6BjwCa2LsVIgl",
          "name": "S3 account 4 working"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5c75e862-459d-44c9-9d66-b0b2fb4931a3",
      "name": "Texte vers HTML",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1120,
        4080
      ],
      "parameters": {
        "text": "={{ $('AI Agent').item.json.output.postclean }}",
        "options": {
          "systemMessage": "=  You are a precise HTML formatter.\n\nConvert the following LinkedIn-style post written in Markdown into valid, semantic HTML suitable for sending as the body of a professional marketing email.\n\nRequirements:\n\n- Keep the structure and tone of a LinkedIn post (short paragraphs, emojis, clear headers, bullets, numbered lists, line breaks)\n- Use semantic HTML: <p>, <br>, <ul>, <ol>, <li>, <strong>, <em>, <blockquote>, <a>, etc.\n- Apply minimal inline CSS to enhance readability (font size, spacing, alignment) so it's visually polished when viewed in email\n- Do NOT include <html>, <head>, or <body> tags\n- Do NOT use any JavaScript\n-all hastag in one lines dont use break\n- At the bottom, embed this image:\n  <img src=\"https://rmlkaysgqjrtjedpopha.supabase.co/storage/v1/object/public/rag/{{ $('Edit Fields6').item.json.safeName }}\" alt=\"Image\" style=\"max-width:100%; height:auto; margin-top:20px;\" />\n\n- Output only raw HTML with no extra explanation or text or tags \n "
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "83c4c1ad-ab47-49dd-a99f-eb4dced153db",
      "name": "Mistral Cloud Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        -1060,
        4340
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "mRwBaVJZsN6hIzkX",
          "name": "Mistral Cloud account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c790feae-4889-432b-a13a-caf36a88134e",
      "name": "Modifier les champs8",
      "type": "n8n-nodes-base.set",
      "position": [
        -200,
        4000
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c253ac6b-6f2f-4505-8b54-2a253900280b",
              "name": "output",
              "type": "string",
              "value": "={{ $('AI Agent').item.json.output.postclean }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7d73414b-9542-4e11-aa0a-b7595d8d916f",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2300,
        3980
      ],
      "parameters": {
        "text": "={{ $json.post }}",
        "options": {
          "systemMessage": "##Role\nYou are an assistant with the role of data formatter and banner caption creator.\n\n##Instructions\n1. For any given user query or post, remove only formatting issues such as \\n, **. The output should be clean, grammatically correct, and naturally readable. Important: don't remove emojis.\n2. Based on the cleaned input, create a catchy, relevant, and impactful banner text.\n   -If the banner text is 5 words or less, it will be a single line.\n   -important If it's more than 5 words, it will be split into line1 and line2. Each line will contain a maximum of 5 words.\n3. All banner text (single line or split lines) will be URL-encoded.\n4. Respond ONLY with a JSON object.\n5. only use %20 instead of space\n\nExample Input:\n\"This is a **really** awesome new product launch! Get ready for innovation!\\n🚀\"\n\nExample Output:\n```json\n{\n  \"postclean\": \"This is a really awesome new product launch!  ready innovation! \",\n  \"banner_text\": {\n    \"line1\": \"Awesome%20New%20Product%20Launch\", only 5 words allowed\n    \"line2\":\"Ready%20Innovation\" should start with word\n  }\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "638009af-4a55-4bfe-819d-a41c23c5e2a5",
      "name": "Analyseur de sortie structurée",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2100,
        4180
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"postclean\": \"\",\n  \"line1\": \"\",\n  \"line2\":\"\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "f87da4d5-e5ca-481f-b1d1-7486eb996a5c",
      "name": "LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        400,
        3980
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "person": "agyagEHVK-",
        "additionalFields": {},
        "shareMediaCategory": "IMAGE"
      },
      "credentials": {
        "linkedInOAuth2Api": {
          "id": "DfM7WZl5s1WKM5JY",
          "name": "LinkedIn account 2 working"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "27b8d834-ee20-4b4b-9a2c-2507db4e0975",
      "name": "HTTP Request6",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1640,
        3980
      ],
      "parameters": {
        "url": "=https://ik.imagekit.io/(imagekit image link).png?updatedAt=1751960203232&tr=l-text,i-{{ $json.line1 }},fs-30,co-FFFFFF,ff-Montserrat,tg-b,lx-20,ly-85,l-end:l-text,i-{{ $json.line2 }},fs-30,co-FFFFFF,ff-Montserrat,tg-b,lx-20,ly-130,l-end",
        "options": {
          "response": {
            "response": {}
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "012d2ec7-ec5a-4c5c-9cdc-2fa642eec2b9",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        4140
      ],
      "parameters": {
        "width": 460,
        "height": 300,
        "content": "## revision loop"
      },
      "typeVersion": 1
    },
    {
      "id": "6e3d5da2-371a-4c3f-bd55-fff9a007a2a4",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        3980
      ],
      "parameters": {
        "width": 520,
        "height": 320,
        "content": "## approval(human in the loop)"
      },
      "typeVersion": 1
    },
    {
      "id": "a36f9d02-4700-4ada-96f9-505d7d62abb5",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        3900
      ],
      "parameters": {
        "width": 320,
        "height": 260,
        "content": "##post to linkedin"
      },
      "typeVersion": 1
    },
    {
      "id": "4b6474db-7de3-4785-9b91-4317cf855368",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2720,
        3940
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 240,
        "content": "input post"
      },
      "typeVersion": 1
    },
    {
      "id": "91adb84b-d475-4146-8b46-fd677fadddea",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2400,
        3920
      ],
      "parameters": {
        "color": 5,
        "width": 460,
        "height": 380,
        "content": "clean post and add image banner"
      },
      "typeVersion": 1
    },
    {
      "id": "5ec5abfc-a7db-4df5-abc0-a255d0be9649",
      "name": "Note adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1860,
        3880
      ],
      "parameters": {
        "width": 420,
        "height": 420,
        "content": "## image kit io for adding text on image https://imagekit.io/"
      },
      "typeVersion": 1
    },
    {
      "id": "b35ef162-5ef0-4145-881b-d29200c79a62",
      "name": "Note adhésive6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        3980
      ],
      "parameters": {
        "height": 280,
        "content": "s3 bucket for dynamic display of image"
      },
      "typeVersion": 1
    },
    {
      "id": "48530c19-c87a-4187-a813-38c9d7cf4ac6",
      "name": "Note adhésive7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        4180
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "49ec908f-4ceb-44cc-9dc4-1cbea5ed4176",
      "name": "Note adhésive8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        4180
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "cd07964b-d52f-4ca6-acfe-50abbc9a08bc": {
      "main": [
        [
          {
            "node": "5c75e862-459d-44c9-9d66-b0b2fb4931a3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f405cc1c-e824-46b2-8440-9562086bc3a6": {
      "main": [
        [
          {
            "node": "f87da4d5-e5ca-481f-b1d1-7486eb996a5c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7d73414b-9542-4e11-aa0a-b7595d8d916f": {
      "main": [
        [
          {
            "node": "547da51e-321c-451a-b96d-84fe6d7600f2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "19f45580-6118-4fa9-bbeb-3cce50066b07": {
      "main": [
        [
          {
            "node": "7d73414b-9542-4e11-aa0a-b7595d8d916f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "547da51e-321c-451a-b96d-84fe6d7600f2": {
      "main": [
        [
          {
            "node": "27b8d834-ee20-4b4b-9a2c-2507db4e0975",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c790feae-4889-432b-a13a-caf36a88134e": {
      "main": [
        [
          {
            "node": "f405cc1c-e824-46b2-8440-9562086bc3a6",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "5c75e862-459d-44c9-9d66-b0b2fb4931a3": {
      "main": [
        [
          {
            "node": "294d48b7-6da6-419d-8c1d-4a2f2078193d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "27b8d834-ee20-4b4b-9a2c-2507db4e0975": {
      "main": [
        [
          {
            "node": "cd07964b-d52f-4ca6-acfe-50abbc9a08bc",
            "type": "main",
            "index": 0
          },
          {
            "node": "f405cc1c-e824-46b2-8440-9562086bc3a6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3a9acbcd-710d-4a28-adf8-eb366afb93de": {
      "main": [
        [
          {
            "node": "c790feae-4889-432b-a13a-caf36a88134e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c8e6149c-36f2-456e-8925-ae55e2ad5cb7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "90736b86-55b7-4cfe-95a6-7a1534801d06": {
      "ai_languageModel": [
        [
          {
            "node": "7d73414b-9542-4e11-aa0a-b7595d8d916f",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "638009af-4a55-4bfe-819d-a41c23c5e2a5": {
      "ai_outputParser": [
        [
          {
            "node": "7d73414b-9542-4e11-aa0a-b7595d8d916f",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "83c4c1ad-ab47-49dd-a99f-eb4dced153db": {
      "ai_languageModel": [
        [
          {
            "node": "c8e6149c-36f2-456e-8925-ae55e2ad5cb7",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "5c75e862-459d-44c9-9d66-b0b2fb4931a3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "c8e6149c-36f2-456e-8925-ae55e2ad5cb7": {
      "main": [
        [
          {
            "node": "19f45580-6118-4fa9-bbeb-3cce50066b07",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "294d48b7-6da6-419d-8c1d-4a2f2078193d": {
      "main": [
        [
          {
            "node": "3a9acbcd-710d-4a28-adf8-eb366afb93de",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a171f8ee-c782-4e49-8725-4c4da246a72d": {
      "main": [
        [
          {
            "node": "19f45580-6118-4fa9-bbeb-3cce50066b07",
            "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œuds25
Catégorie2
Types de nœuds12
Description de la difficulté

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

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34