AutomationFlowsAI & RAG › Generación_publicaciones (workflow 1) Webhook All Platforms Publicar Git

Generación_publicaciones (workflow 1) Webhook All Platforms Publicar Git

generación_publicaciones (workflow 1) webhook all platforms publicar git. Uses httpRequest, dataTable, lmChatOpenAi, chainLlm. Webhook trigger; 43 nodes.

Webhook trigger★★★★★ complexityAI-powered43 nodesHTTP RequestData TableOpenAI ChatChain Llm
AI & RAG Trigger: Webhook Nodes: 43 Complexity: ★★★★★ AI nodes: yes Added:

This workflow follows the Chainllm → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "generaci\u00f3n_publicaciones (workflow 1) webhook all platforms publicar git",
  "nodes": [
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2160,
        64
      ],
      "id": "50be7b5a-7a9e-4485-9f7b-2c189ff72165",
      "name": "Merge"
    },
    {
      "parameters": {
        "url": "=https://image.pollinations.ai/prompt/{{ encodeURIComponent($json[\"text\"]) }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        544,
        -160
      ],
      "id": "78665e09-5ead-4c3e-88a5-281f8529fd0d",
      "name": "PollinationsAI"
    },
    {
      "parameters": {
        "jsCode": "const media = $json;\n\nreturn [\n  {\n    json: {\n      featured_media_id: media.id,\n      image_url: media.source_url || media.guid?.rendered || media.guid?.raw || \"\"\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1040,
        -160
      ],
      "id": "b5da31e8-1e5f-48cd-9555-31a644dd555b",
      "name": "WP media"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "bfacf8a7-0548-4384-939f-26d70a40c0ab",
              "name": "session_id",
              "value": "={{ $json.session_id }}",
              "type": "string"
            },
            {
              "id": "d846373f-76db-4426-8bd1-7f4b1ca426e5",
              "name": "status",
              "value": "pending_review",
              "type": "string"
            },
            {
              "id": "5d8278a7-de55-4072-8d38-5c7ddf3b4d57",
              "name": "idioma",
              "value": "={{ $json.idioma }}",
              "type": "string"
            },
            {
              "id": "b59fb814-ebe2-4269-9ad5-ac8d1da06f6e",
              "name": "tamano",
              "value": "={{ $json.tamano }}",
              "type": "string"
            },
            {
              "id": "22320357-51aa-4623-8181-3f5a94905ad3",
              "name": "title_current",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "id": "ff6857c2-e46a-49bd-a198-ec2578e859cc",
              "name": "descripcion",
              "value": "={{ $json.descripcion }}",
              "type": "string"
            },
            {
              "id": "da7d594c-6397-4e39-abe8-6c12a0dc978d",
              "name": "content_current",
              "value": "={{ $json.content }}",
              "type": "string"
            },
            {
              "id": "9e3aba1f-8f64-47d8-93bf-bd0836d3c699",
              "name": "image_current",
              "value": "={{ $json.image_current }}",
              "type": "string"
            },
            {
              "id": "eea92e70-ebf7-4df9-94ed-72887131931a",
              "name": "category_current",
              "value": "={{$json.categories }}",
              "type": "string"
            },
            {
              "id": "e361ff81-1963-4e36-b2e5-c3f46adefcfa",
              "name": "custom_category",
              "value": "={{ $json.custom_category }}",
              "type": "string"
            },
            {
              "id": "f31517cf-696d-4921-9a25-3899c852e429",
              "name": "tags_current",
              "value": "={{ $json.tags }}",
              "type": "array"
            },
            {
              "id": "c8bba257-cdd7-4740-8ef3-360b99bd1293",
              "name": "text_versions",
              "value": "={{ JSON.stringify([\n  {\n    version: 1,\n    source: \"ai_initial\",\n    title: $json.title,\n    content: $json.content\n  }\n]) }}",
              "type": "string"
            },
            {
              "id": "2a5dbbb6-bb79-4200-9ed4-020d3f69e005",
              "name": "image_versions",
              "value": "={{ JSON.stringify([\n  {\n    version: 1,\n    source: \"ai_initial\",\n    image: $json.image_current, \n    image_id: $json.featured_media\n  }\n]) }}",
              "type": "string"
            },
            {
              "id": "83d2df38-7f72-4624-9e1c-4e80c9ed890a",
              "name": "featured_media_id",
              "value": "={{ $json.featured_media_id }}",
              "type": "number"
            },
            {
              "id": "3d625422-8fcc-45a2-b563-cfa13c23f795",
              "name": "created_at",
              "value": "={{ $now }}",
              "type": "string"
            },
            {
              "id": "c275cb6d-75f0-497d-88a0-67f23b6da06d",
              "name": "updated_at",
              "value": "={{ $now }}",
              "type": "string"
            },
            {
              "id": "c44e587a-548f-4a80-a501-e2976e8b99c0",
              "name": "review_action",
              "value": "none",
              "type": "string"
            },
            {
              "id": "7e242994-48b1-4e0c-b0fe-8ba7f959b176",
              "name": "keyword_current",
              "value": "={{ $json.keyword_current || \"\" }}",
              "type": "string"
            },
            {
              "id": "d6f83609-e88d-477f-91b8-e6d09b72fb0d",
              "name": "image_prompt_current",
              "value": "={{ $json.image_prompt || \"\" }}",
              "type": "string"
            },
            {
              "id": "73d62bbf-e6ae-440c-9995-fa20a7ede670",
              "name": "objetivo",
              "value": "={{ $json.objetivo || \"\" }}",
              "type": "string"
            },
            {
              "id": "30881d25-d8d0-4d5c-9c50-db18e82361dd",
              "name": "publico_objetivo",
              "value": "={{ $json.publico_objetivo || \"\" }}",
              "type": "string"
            },
            {
              "id": "a6741f34-b3ca-4540-b9a5-2875e8ebe0c8",
              "name": "nivel_tecnico",
              "value": "={{ $json.nivel_tecnico || \"\" }}",
              "type": "string"
            },
            {
              "id": "f89f8d96-1dea-4452-a223-ed341415fb78",
              "name": "tono",
              "value": "={{ $json.tono || \"\" }}",
              "type": "string"
            },
            {
              "id": "4df7969b-fef1-416c-908d-622ab89620d1",
              "name": "formato_texto",
              "value": "={{ $json.formato_texto || \"\" }}",
              "type": "string"
            },
            {
              "id": "89db01cb-e409-413a-9516-b19caa110ae7",
              "name": "publication_type",
              "value": "={{ $json.publication_type || \"\" }}",
              "type": "string"
            },
            {
              "id": "a0b7f5fe-8f9a-4a16-a694-1baa3827f708",
              "name": "cta",
              "value": "={{ $json.cta }}",
              "type": "string"
            },
            {
              "id": "a82d140a-8de3-4d3b-b98d-c5cc744e43e2",
              "name": "custom_cta",
              "value": "={{ $json.custom_cta || \"\" }}",
              "type": "string"
            },
            {
              "id": "f8d14dc1-9e61-4861-9dfe-39b88325de95",
              "name": "cta_intensity",
              "value": "={{ $json.cta_intensity }}",
              "type": "string"
            },
            {
              "id": "137b8b7d-f6fa-4071-9647-ce87d1a02b4c",
              "name": "visual_style",
              "value": "={{ $json.visual_style }}",
              "type": "string"
            },
            {
              "id": "a44691dc-d0cd-4873-a1c5-ccdf62129792",
              "name": "image_format",
              "value": "={{ $json.image_format }}",
              "type": "string"
            },
            {
              "id": "606feeb9-74ea-4d6b-a748-551cd0cd7f1c",
              "name": "visual_reference",
              "value": "={{ $json.visual_reference || \"\" }}",
              "type": "string"
            },
            {
              "id": "02c5b798-02d0-44fd-bbfc-1a9663babd30",
              "name": "storytelling_format",
              "value": "={{ $json.storytelling_format === true }}",
              "type": "boolean"
            },
            {
              "id": "c751698b-5671-4a41-992e-4f12cd35b342",
              "name": "viral_format",
              "value": "={{ $json.viral_format === true }}",
              "type": "boolean"
            },
            {
              "id": "bfc56efd-b82f-4c2b-ae13-62d9053a762e",
              "name": "professional_linkedin_format",
              "value": "={{ $json.professional_linkedin_format === true }}",
              "type": "boolean"
            },
            {
              "id": "8d051edb-4d10-4034-b377-f32e01e9975b",
              "name": "generate_image",
              "value": "={{ $json.generate_image === true }}",
              "type": "boolean"
            },
            {
              "id": "6e1ac641-31dd-4db9-bd1f-0acf43839bc6",
              "name": "title_wordpress",
              "value": "={{ $json.title_wordpress }}",
              "type": "string"
            },
            {
              "id": "d4e57b54-2ef0-4907-b07f-ac739298bb7f",
              "name": "content_wordpress",
              "value": "={{ $json.content_wordpress }}",
              "type": "string"
            },
            {
              "id": "c4a5b209-35c8-4402-9adf-8ac3d3a05ece",
              "name": "tags_wordpress",
              "value": "={{ $json.tags_wordpress }}",
              "type": "string"
            },
            {
              "id": "78c484a6-3d12-4e02-85e5-eb2fad94b3ad",
              "name": "title_linkedin",
              "value": "={{ $json.title_linkedin }}",
              "type": "string"
            },
            {
              "id": "78900385-d00f-4d33-9193-5c018cb42b9e",
              "name": "content_linkedin",
              "value": "={{ $json.content_linkedin }}",
              "type": "string"
            },
            {
              "id": "95fbbb61-62da-417e-9322-058628460615",
              "name": "tags_linkedin",
              "value": "={{ $json.tags_linkedin }}",
              "type": "string"
            },
            {
              "id": "95e7ba46-a5ac-42c9-bfef-44aef9382862",
              "name": "title_x",
              "value": "={{ $json.title_x }}",
              "type": "string"
            },
            {
              "id": "612724e7-3145-46f0-ade7-630dae3f45c2",
              "name": "content_x",
              "value": "={{ $json.content_x }}",
              "type": "string"
            },
            {
              "id": "b993de5d-c467-4969-9c60-460bfd5c2151",
              "name": "tags_x",
              "value": "={{ $json.tags_x }}",
              "type": "string"
            },
            {
              "id": "52f77297-0d5a-4b11-88e5-27d741c92f37",
              "name": "title_facebook",
              "value": "={{ $json.title_facebook }}",
              "type": "string"
            },
            {
              "id": "7fc3bf1c-3ffa-4b5b-80c0-2b96015e15a7",
              "name": "content_facebook",
              "value": "={{ $json.content_facebook }}",
              "type": "string"
            },
            {
              "id": "7daf3c8a-4f72-44f2-9441-1a5a7b6c59c9",
              "name": "tags_facebook",
              "value": "={{ $json.tags_facebook }}",
              "type": "string"
            },
            {
              "id": "39f07c44-b308-4d4b-9026-1df2c0130b21",
              "name": "title_instagram",
              "value": "={{ $json.title_instagram }}",
              "type": "string"
            },
            {
              "id": "59a34130-9aca-46a0-8499-573d2050e5fb",
              "name": "content_instagram",
              "value": "={{ $json.content_instagram }}",
              "type": "string"
            },
            {
              "id": "e965e9f2-f83e-4973-a823-e1911cb7bd1b",
              "name": "tags_instagram",
              "value": "={{ $json.tags_instagram }}",
              "type": "string"
            },
            {
              "id": "4cb21c96-1eb8-4cbe-9d9f-26c0d82c66ab",
              "name": "image_source_url",
              "value": "={{ $json.image_source_url }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        3664,
        64
      ],
      "id": "65049e3d-8ddc-488e-a6cf-504429c8dc47",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "content": "## Block Generate Provisional Image via Prompt",
        "height": 544,
        "width": 1168
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        176,
        -368
      ],
      "id": "0d4d4205-a3f9-4ad4-a02c-5e42204e9370",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Block Generate Provisional Post",
        "height": 768,
        "width": 1088
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        96,
        176
      ],
      "id": "cd904879-bd1c-4454-8d4a-bbadfce1e969",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Validate Provisional Post\n\n\n\n\n\n\n\n\n**Cumple requisitos** \nEl formato y la longitud del art\u00edculo\ncumplen los requisitos del formulario inicial\n\n\n\n\n\n\n**No cumple los requisitos**\nLa longitud no cumple el requerimiento inicial\ndel formulario y se volver\u00e1 a generar hasta\n3 veces para cumplir los requisitos.\nSi no lo logra, tocar\u00e1 pedir de nuevo en\nel formulario que se haga el art\u00edculo",
        "height": 720,
        "width": 496,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        688,
        224
      ],
      "id": "7018b792-19f4-4e9b-9755-f4cb6f191fbc",
      "name": "Sticky Note2"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2928,
        64
      ],
      "id": "b2a14b4f-3f89-4421-b9b1-d33da9bfcf66",
      "name": "Merge1"
    },
    {
      "parameters": {
        "content": "## Table\n-Podemos observar cu\u00e1les datos hemos recogido en la tabla\n- No requiere conectarse con ninguno de los workflows\n",
        "height": 368,
        "width": 720
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1952,
        -624
      ],
      "id": "88995681-410a-4363-a4d1-f56a36ff6797",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "session_id": "={{ $json.session_id }}",
            "status": "={{ $json.status }}",
            "title_current": "={{ $json.title_current }}",
            "content_current": "={{ $json.content_current }}",
            "image_current": "={{ $json.image_current }}",
            "category_current": "={{ $json.category_current }}",
            "tags_current": "={{ JSON.stringify($json.tags_current) }}",
            "text_versions": "={{ $json.text_versions }}",
            "image_versions": "={{ $json.image_versions }}",
            "created_at": "={{ $json.created_at }}",
            "updated_at": "={{ $json.updated_at }}",
            "review_action": "={{ $json.review_action }}",
            "featured_media_id": "={{ $json.featured_media_id }}",
            "featured_media": "={{ $json.featured_media_id }}",
            "keyword_current": "={{ $json.keyword_current }}",
            "image_prompt_current": "={{ $json.image_prompt_current }}",
            "publication_type": "={{ $json.publication_type }}",
            "formato_texto": "={{ $json.formato_texto }}",
            "tono": "={{ $json.tono }}",
            "nivel_tecnico": "={{ $json.nivel_tecnico }}",
            "publico_objetivo": "={{ $json.publico_objetivo }}",
            "objetivo": "={{ $json.objetivo }}",
            "visual_style": "={{ $json.visual_style }}",
            "image_format": "={{ $json.image_format }}",
            "visual_reference": "={{ $json.visual_reference }}",
            "storytelling_format": "={{ $json.storytelling_format }}",
            "viral_format": "={{ $json.viral_format }}",
            "professional_linkedin_format": "={{ $json.professional_linkedin_format }}",
            "cta": "={{ $json.cta }}",
            "custom_cta": "={{ $json.custom_cta }}",
            "cta_intensity": "={{ $json.cta_intensity }}",
            "generate_image": "={{ $json.generate_image === true || $json.generate_image === \"true\" }}",
            "idioma": "={{ $json.idioma }}",
            "tamano": "={{ $json.tamano }}",
            "custom_category": "={{ $json.custom_category }}",
            "descripcion": "={{ $json.descripcion }}",
            "title_wordpress": "={{ $json.title_wordpress }}",
            "content_wordpress": "={{ $json.content_wordpress }}",
            "tags_facebook": "={{ $json.tags_facebook }}",
            "content_facebook": "={{ $json.content_facebook }}",
            "title_facebook": "={{ $json.title_facebook }}",
            "tags_instagram": "={{ $json.tags_instagram }}",
            "content_instagram": "={{ $json.content_instagram }}\n",
            "title_instagram": "={{ $json.title_instagram }}",
            "tags_x": "={{ $json.tags_x }}",
            "content_x": "={{ $json.content_x }}",
            "title_x": "={{ $json.title_x }}",
            "tags_linkedin": "={{ $json.tags_linkedin }}",
            "content_linkedin": "={{ $json.content_linkedin }}",
            "title_linkedin": "={{ $json.title_linkedin }}",
            "tags_wordpress": "={{ $json.tags_wordpress }}",
            "image_source_url": "={{ $json.image_source_url }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "session_id",
              "displayName": "session_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "title_current",
              "displayName": "title_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "content_current",
              "displayName": "content_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "excerpt_current",
              "displayName": "excerpt_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "meta_current",
              "displayName": "meta_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_current",
              "displayName": "category_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "image_current",
              "displayName": "image_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tags_current",
              "displayName": "tags_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "text_versions",
              "displayName": "text_versions",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "image_versions",
              "displayName": "image_versions",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "updated_at",
              "displayName": "updated_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "review_action",
              "displayName": "review_action",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "wp_post_id",
              "displayName": "wp_post_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "wp_post_url",
              "displayName": "wp_post_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "featured_media_id",
              "displayName": "featured_media_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "featured_media",
              "displayName": "featured_media",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "keyword_current",
              "displayName": "keyword_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "image_prompt_current",
              "displayName": "image_prompt_current",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "objetivo",
              "displayName": "objetivo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "publico_objetivo",
              "displayName": "publico_objetivo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "nivel_tecnico",
              "displayName": "nivel_tecnico",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tono",
              "displayName": "tono",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "formato_texto",
              "displayName": "formato_texto",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "publication_type",
              "displayName": "publication_type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "visual_style",
              "displayName": "visual_style",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "image_format",
              "displayName": "image_format",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "visual_reference",
              "displayName": "visual_reference",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "storytelling_format",
              "displayName": "storytelling_format",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "viral_format",
              "displayName": "viral_format",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "professional_linkedin_format",
              "displayName": "professional_linkedin_format",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "cta",
              "displayName": "cta",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "custom_cta",
              "displayName": "custom_cta",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "cta_intensity",
              "displayName": "cta_intensity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "generate_image",
              "displayName": "generate_image",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "idioma",
              "displayName": "idioma",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tamano",
              "displayName": "tamano",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "custom_category",
              "displayName": "custom_category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "descripcion",
              "displayName": "descripcion",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "title_wordpress",
              "displayName": "title_wordpress",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "content_wordpress",
              "displayName": "content_wordpress",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tags_wordpress",
              "displayName": "tags_wordpress",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "title_linkedin",
              "displayName": "title_linkedin",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "content_linkedin",
              "displayName": "content_linkedin",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tags_linkedin",
              "displayName": "tags_linkedin",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "title_x",
              "displayName": "title_x",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "content_x",
              "displayName": "content_x",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tags_x",
              "displayName": "tags_x",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "title_instagram",
              "displayName": "title_instagram",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "content_instagram",
              "displayName": "content_instagram",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tags_instagram",
              "displayName": "tags_instagram",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "title_facebook",
              "displayName": "title_facebook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "content_facebook",
              "displayName": "content_facebook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tags_facebook",
              "displayName": "tags_facebook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "linkedin_post_id",
              "displayName": "linkedin_post_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "facebook_post_id",
              "displayName": "facebook_post_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "instagram_post_id",
              "displayName": "instagram_post_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "x_post_id",
              "displayName": "x_post_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "linkedin_post_url",
              "displayName": "linkedin_post_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "facebook_post_url",
              "displayName": "facebook_post_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "instagram_post_url",
              "displayName": "instagram_post_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "x_post_url",
              "displayName": "x_post_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "image_source_url",
              "displayName": "image_source_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "optimizeBulk": false
        }
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        3824,
        64
      ],
      "id": "af717b08-4065-4707-9e21-64b40da2b305",
      "name": "Insert row"
    },
    {
      "parameters": {
        "content": "## Block Create Category\n",
        "height": 480,
        "width": 832
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1200,
        176
      ],
      "id": "2daba4fe-bf44-43e0-9b06-de286bad0fd5",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Block Create Tags",
        "height": 416,
        "width": 704
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2336,
        -112
      ],
      "id": "582b160b-3c9c-4853-8615-75412d820beb",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "## Block Prepare Post for Review & Publish\n",
        "height": 416,
        "width": 1088
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3056,
        -112
      ],
      "id": "ffea73e9-c130-49e5-8a33-1a5928736a3f",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "## Merging Text-Image",
        "height": 368
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2064,
        -80
      ],
      "id": "37dbd413-60fe-4df6-8bd3-f1a14eab0750",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "generate-social-content",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -336,
        176
      ],
      "id": "7a84cd08-3a0e-40a9-b956-c8a6bc5b17c0",
      "name": "Webhook"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f974e5c9-fd52-4b9d-8f0a-c0ef25717359",
              "name": "idioma",
              "value": "={{ $json.body.idioma }}",
              "type": "string"
            },
            {
              "id": "af3aa69f-a2de-4d9c-afeb-fa3c8929a1f8",
              "name": "tamano",
              "value": "={{ $json.body.tamano }}",
              "type": "string"
            },
            {
              "id": "03e1aa0e-c293-4386-bcbd-913184f80e2e",
              "name": "titulo",
              "value": "={{ $json.body.titulo }}",
              "type": "string"
            },
            {
              "id": "3b369b10-70de-44a4-bbc2-706aa220541a",
              "name": "descripcion",
              "value": "={{ $json.body.descripcion }}",
              "type": "string"
            },
            {
              "id": "17c29131-77f9-4243-912c-ae9438173736",
              "name": "category",
              "value": "={{ $json.body.category }}",
              "type": "string"
            },
            {
              "id": "829a7e2e-c7e5-4558-9186-0ddacfef313e",
              "name": "custom_category",
              "value": "={{ $json.body.custom_category }}",
              "type": "string"
            },
            {
              "id": "2cdb40a5-a149-44de-9151-10c46dbe4dc4",
              "name": "tags",
              "value": "={{ $json.body.tags }}",
              "type": "string"
            },
            {
              "id": "d31cf959-fd2e-4a97-873b-0493e9eaff5a",
              "name": "keyword",
              "value": "={{ $json.body.keyword }}",
              "type": "string"
            },
            {
              "id": "24d985da-9ab7-4021-942b-fc3be1b3cbe1",
              "name": "tono",
              "value": "={{ $json.body.tono }}",
              "type": "string"
            },
            {
              "id": "48939f87-9451-4f10-ab5b-9a0582ba14c5",
              "name": "objetivo",
              "value": "={{ $json.body.objetivo }}",
              "type": "string"
            },
            {
              "id": "755c6c06-a19f-4a34-9f52-29089e4bfc27",
              "name": "publico_objetivo",
              "value": "={{ $json.body.publico_objetivo }}",
              "type": "string"
            },
            {
              "id": "f9f7542b-5a47-4e52-ad4d-df8130710ee7",
              "name": "nivel_tecnico",
              "value": "={{ $json.body.nivel_tecnico }}",
              "type": "string"
            },
            {
              "id": "befca6bc-e018-4e21-aedb-c3f724359614",
              "name": "formato_texto",
              "value": "={{ $json.body.formato_texto }}",
              "type": "string"
            },
            {
              "id": "b489cc26-f33d-48a4-8e69-8e667c4a88d4",
              "name": "cta",
              "value": "={{ $json.body.cta }}",
              "type": "string"
            },
            {
              "id": "1e054a98-b3ea-430b-aabb-1baa5e664007",
              "name": "custom_cta",
              "value": "={{ $json.body.custom_cta }}",
              "type": "string"
            },
            {
              "id": "4233b2a2-ffdf-46af-8991-54dca50bb22b",
              "name": "cta_intensity",
              "value": "={{ $json.body.cta_intensity }}",
              "type": "string"
            },
            {
              "id": "80fcc316-d423-462c-b4c6-d9bb65b6638b",
              "name": "generate_image",
              "value": "={{ $json.body.generate_image }}",
              "type": "boolean"
            },
            {
              "id": "448bb951-a19a-4689-9844-f25e57c30d89",
              "name": "visual_style",
              "value": "={{ $json.body.visual_style }}",
              "type": "string"
            },
            {
              "id": "f216782b-5044-4d8f-a40d-51ada931fc40",
              "name": "image_format",
              "value": "={{ $json.body.image_format }}",
              "type": "string"
            },
            {
              "id": "ed1159f6-79f0-40a3-8a8d-a5f1fc8a5b49",
              "name": "visual_reference",
              "value": "={{ $json.body.visual_reference }}",
              "type": "string"
            },
            {
              "id": "90a29ba0-163a-48a1-a178-92ee828c36bb",
              "name": "publication_type",
              "value": "={{ $json.body.publication_type }}",
              "type": "string"
            },
            {
              "id": "ecf90ee5-07b4-44f5-a984-acaabcd09a7d",
              "name": "storytelling_format",
              "value": "={{ $json.body.storytelling_format }}",
              "type": "boolean"
            },
            {
              "id": "6b8e2441-b2a5-4bfe-90cc-11c5d8eb0b81",
              "name": "viral_format",
              "value": "={{ $json.body.viral_format }}",
              "type": "boolean"
            },
            {
              "id": "94b3f4e0-8b24-4337-96e0-6db21e658054",
              "name": "professional_linkedin_format",
              "value": "={{ $json.body.professional_linkedin_format }}",
              "type": "boolean"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -128,
        176
      ],
      "id": "56ef6834-15a9-489b-a2c3-91df00efe121",
      "name": "Map Input Data"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        4192,
        64
      ],
      "id": "0f964b81-49a5-4413-a23f-f32640423000",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "jsCode": "const results = $input.all();\nconst article = $('Format').item.json;\n\nconst normalize = (s) =>\n  (s || \"\")\n    .toString()\n    .trim()\n    .toLowerCase()\n    .normalize(\"NFD\")\n    .replace(/[\\u0300-\\u036f]/g, \"\");\n\nconst slugify = (s) =>\n  normalize(s)\n    .replace(/[^a-z0-9\\s-]/g, \"\")\n    .replace(/\\s+/g, \"-\")\n    .replace(/-+/g, \"-\")\n    .replace(/^-|-$/g, \"\");\n\nconst finalCategory = article.category || \"Sin categor\u00eda\";\nconst targetName = normalize(finalCategory);\nconst targetSlug = slugify(finalCategory);\n\nconst matchedCategory = results.find(item => {\n  const j = item.json || {};\n\n  return j.id && (\n    normalize(j.name) === targetName ||\n    normalize(j.slug) === targetSlug\n  );\n});\n\nconst baseData = {\n  ...article,\n  category: finalCategory,\n};\n\nif (matchedCategory) {\n  return [\n    {\n      json: {\n        ...baseData,\n        categoryId: Number(matchedCategory.json.id),\n        categoryName: matchedCategory.json.name || finalCategory,\n        exists: true,\n        categoryReady: true\n      },\n    },\n  ];\n}\n\nreturn [\n  {\n    json: {\n      ...baseData,\n      categoryId: null,\n      categoryName: finalCategory,\n      exists: false,\n      categoryReady: false\n    },\n  },\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1408,
        256
      ],
      "id": "59bbf6e3-3e46-4b07-a3eb-3c05e89a478d",
      "name": "Check WP Category"
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      ...$json,\n      categoryId: Number($json.categoryId),\n      categoryName: $json.categoryName || $json.category,\n      categoryReady: true\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1792,
        208
      ],
      "id": "60c812d9-df9a-4c04-bf11-850c4cd09c9d",
      "name": "Category exists",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 3
          },
          "conditions": [
            {
              "id": "29c669ad-4e41-433f-a343-bb062ec9a031",
              "leftValue": "={{ $json.exists}}",
              "rightValue": "true",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        1584,
        256
      ],
      "id": "8dcabf99-0a75-4d40-9721-ff2e14983723",
      "name": "Category exists?"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "0e1ea3c1-975b-45d4-8a09-1917248bb5fd",
              "leftValue": "={{ $json.isValidLength }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            },
            {
              "id": "f1087d6d-d24b-491c-9141-646fd82fb5f3",
              "leftValue": "={{ Number($json.retries ?? 0) }}",
              "rightValue": 3,
              "operator": {
                "type": "number",
                "operation": "lt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        832,
        272
      ],
      "id": "1ab5c304-d975-4c3e-9ad9-74ec0f1ee22c",
      "name": "Validate"
    },
    {
      "parameters": {
        "jsCode": "const rawOriginal =\n  $json.text ||\n  $json.output ||\n  $json.response ||\n  $json.message ||\n  $json.content ||\n  \"\";\n\nlet raw = String(rawOriginal)\n  .replace(/```json/gi, \"\")\n  .replace(/```/g, \"\")\n  .trim();\n\nlet parsed;\n\ntry {\n  parsed = JSON.parse(raw);\n} catch (e) {\n\n  // Buscar el primer objeto JSON v\u00e1lido dentro del texto\n  const jsonMatch = raw.match(/\\{[\\s\\S]*\\}/);\n\n  if (!jsonMatch) {\n    throw new Error(\n      \"No se encontr\u00f3 JSON v\u00e1lido en la respuesta del LLM: \" +\n      raw.slice(0, 700)\n    );\n  }\n\n  try {\n    parsed = JSON.parse(jsonMatch[0]);\n  } catch (err) {\n    throw new Error(\n      \"El JSON del LLM no se pudo parsear: \" +\n      jsonMatch[0].slice(0, 700)\n    );\n  }\n}\n\nconst clean = (v) =>\n  v == null ? \"\" : String(v).trim();\n\nconst category = clean(\n  parsed.category ||\n  $json.category ||\n  $json.custom_category\n);\n\nconst keyword = clean(\n  parsed.keyword ||\n  $json.keyword\n);\n\nconst title_wordpress = clean(parsed.title_wordpress);\nconst content_wordpress = clean(parsed.content_wordpress);\n\nif (!title_wordpress) {\n  throw new Error(\n    \"Falta title_wordpress en el JSON del LLM.\"\n  );\n}\n\nif (!content_wordpress) {\n  throw new Error(\n    \"Falta content_wordpress en el JSON del LLM.\"\n  );\n}\n\nreturn [\n  {\n    json: {\n      ...$json,\n\n      // Compatibilidad con el flujo antiguo WP\n      title: title_wordpress,\n      content: content_wordpress,\n      tags: clean(parsed.tags_wordpress),\n\n      category,\n      keyword,\n\n      image_prompt: clean(parsed.image_prompt),\n\n      // =========================\n      // WORDPRESS\n      // =========================\n      title_wordpress,\n      content_wordpress,\n      tags_wordpress: clean(parsed.tags_wordpress),\n\n      // =========================\n      // LINKEDIN\n      // =========================\n      title_linkedin: clean(parsed.title_linkedin),\n      content_linkedin: clean(parsed.content_linkedin),\n      tags_linkedin: clean(parsed.tags_linkedin),\n\n      // =========================\n      // X / TWITTER\n      // =========================\n      title_x: clean(parsed.title_x),\n      content_x: clean(parsed.content_x),\n      tags_x: clean(parsed.tags_x),\n\n      // =========================\n      // FACEBOOK\n      // =========================\n      title_facebook: clean(parsed.title_facebook),\n      content_facebook: clean(parsed.content_facebook),\n      tags_facebook: clean(parsed.tags_facebook),\n\n      // =========================\n      // INSTAGRAM\n      // =========================\n      title_instagram: clean(parsed.title_instagram),\n      content_instagram: clean(parsed.content_instagram),\n      tags_instagram: clean(parsed.tags_instagram),\n    },\n  },\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        432,
        256
      ],
      "id": "39b76a1c-04d8-430c-9f8f-96741d87824d",
      "name": "Format"
    },
    {
      "parameters": {
        "jsCode": "const article = $('Check WP Category').item.json;\nconst createResult = $json;\n\nconst normalize = (s) =>\n  (s || \"\")\n    .toString()\n    .trim()\n    .toLowerCase()\n    .normalize(\"NFD\")\n    .replace(/[\\u0300-\\u036f]/g, \"\");\n\nconst slugify = (s) =>\n  normalize(s)\n    .replace(/[^a-z0-9\\s-]/g, \"\")\n    .replace(/\\s+/g, \"-\")\n    .replace(/-+/g, \"-\")\n    .replace(/^-|-$/g, \"\");\n\nconst finalCategory = article.categoryName || article.category || \"Sin categor\u00eda\";\n\n// Caso 1: se cre\u00f3 bien\nif (createResult.id) {\n  return [\n    {\n      json: {\n        ...article,\n        categoryId: Number(createResult.id),\n        categoryName: createResult.name || finalCategory,\n        categoryReady: true,\n        exists: true,\n      },\n    },\n  ];\n}\n\n// Caso 2: fall\u00f3 porque ya exist\u00eda o no devolvi\u00f3 id\nconst searchResults = $('Create categories').all();\n\nconst targetName = normalize(finalCategory);\nconst targetSlug = slugify(finalCategory);\n\nconst matchedCategory = searchResults.find(item => {\n  const j = item.json || {};\n\n  return j.id && (\n    normalize(j.name) === targetName ||\n    normalize(j.slug) === targetSlug\n  );\n});\n\nif (matchedCategory) {\n  return [\n    {\n      json: {\n        ...article,\n        categoryId: Number(matchedCategory.json.id),\n        categoryName: matchedCategory.json.name || finalCategory,\n        categoryReady: true,\n        exists: true,\n      },\n    },\n  ];\n}\n\nthrow new Error(\n  `No se pudo obtener el ID de la categor\u00eda. category=\"${finalCategory}\". Resultados GET=${JSON.stringify(searchResults.map(i => i.json))}`\n);"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1904,
        464
      ],
      "id": "2b99fc97-51c7-4144-8540-c5e89ad1c8d5",
      "name": "Created & Sent Category"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const data = $json;\n\nlet termId =\n  data.error?.additional_data?.[0]?.data?.term_id ||\n  data.error?.additional_data?.data?.term_id ||\n  data.error?.data?.term_id ||\n  data.data?.term_id ||\n  null;\n\nif (!termId && data.error?.message) {\n  const msg = String(data.error.message);\n\n  const match = msg.match(/\"term_id\"\\s*:\\s*(\\d+)/) ||\n                msg.match(/term_id[^0-9]+(\\d+)/);\n\n  if (match) {\n    termId = match[1];\n  }\n}\n\nif (!termId) {\n  throw new Error(`No se pudo recuperar term_id del tag existente: ${JSON.stringify(data)}`);\n}\n\nreturn {\n  json: {\n    tagId: Number(termId),\n    tagName: data.tagName || data.name || \"\",\n    tagSlug: data.tagSlug || data.slug || \"\",\n    tagReady: true,\n    existed: true\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2704,
        144
      ],
      "id": "130b814a-2dd8-4c98-b900-f370d8cbb235",
      "name": "Code Error"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "",
          "mode": "list",
          "cachedResultName": "",
          "cachedResultUrl": ""
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        144,
        464
      ],
      "id": "510c4ef4-1065-418f-ba28-9896b452b7e1",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Genera un prompt visual detallado para una imagen profesional basada en:\n\nT\u00edtulo: {{ $json.titulo }}\nDescripci\u00f3n: {{ $json.descripcion }}\nCategor\u00eda: {{ $json.category }}\nKeyword principal: {{ $json.keyword }}\nTono: {{ $json.tono }}\n\nRequisitos:\n- La imagen debe ser moderna, limpia y profesional\n- Estilo corporativo/tecnol\u00f3gico\n- Sin texto dentro de la imagen\n- Composici\u00f3n clara y atractiva\n- Iluminaci\u00f3n cuidada\n- Est\u00e9tica relacionada con inteligencia artificial y negocio\n\nDevuelve SOLO el prompt de imagen en ingl\u00e9s, sin frases como \"Here is...\" ni explicaciones.",
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        224,
        -240
      ],
      "id": "2fcc9e2e-f1f7-4b90-81d5-d1bd36319fb9",
      "name": "Basic LLM Chain (image)"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Act\u00faa como un estratega senior de contenido, copywriter SEO, experto en growth marketing y especialista en contenido multicanal para redes sociales y plataformas digitales.\n\nTu objetivo es generar contenido altamente optimizado, persuasivo y adaptado espec\u00edficamente a cada plataforma:\n\n- WordPress / Blog\n- LinkedIn\n- X (Twitter)\n- Facebook\n- Instagram\n\nCada plataforma debe tener:\n- t\u00edtulo propio\n- contenido propio\n- hashtags propios\n- estructura optimizada\n- tono adaptado\n- longitud adecuada\n- CTA contextualizado\n\nNO reutilices exactamente el mismo texto entre plataformas.\n\n====================================================================\nDATOS RECIBIDOS\n====================================================================\n\nIdioma: {{ $json.idioma }}\nTama\u00f1o: {{ $json.tamano }}\n\nT\u00edtulo sugerido: {{ $json.titulo }}\nDescripci\u00f3n / contexto: {{ $json.descripcion }}\n\nCategor\u00eda principal: {{ $json.category }}\nCategor\u00eda personalizada: {{ $json.custom_category }}\n\nTags: {{ $json.tags }}\nKeyword principal SEO: {{ $json.keyword }}\n\nTono: {{ $json.tono }}\nObjetivo de publicaci\u00f3n: {{ $json.objetivo }}\nP\u00fablico objetivo: {{ $json.publico_objetivo }}\nNivel t\u00e9cnico del p\u00fablico: {{ $json.nivel_tecnico }}\n\nFormato del texto: {{ $json.formato_texto }}\n\nCTA seleccionado: {{ $json.cta }}\nCTA personalizado: {{ $json.custom_cta }}\nIntensidad CTA: {{ $json.cta_intensity }}\n\nGenerar imagen: {{ $json.generate_image }}\nEstilo visual: {{ $json.visual_style }}\nFormato imagen: {{ $json.image_format }}\nInspiraci\u00f3n visual: {{ $json.visual_reference }}\n\nTipo de publicaci\u00f3n: {{ $json.publication_type }}\n\nFormato storytelling: {{ $json.storytelling_format }}\nFormato viral: {{ $json.viral_format }}\nFormato LinkedIn profesional: {{ $json.professional_linkedin_format }}\n\n====================================================================\nREGLAS GENERALES\n====================================================================\n\n- Usa SIEMPRE el idioma indicado.\n- Adapta completamente el contenido al p\u00fablico objetivo.\n- Ajusta el nivel t\u00e9cnico seg\u00fan el 

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

generación_publicaciones (workflow 1) webhook all platforms publicar git. Uses httpRequest, dataTable, lmChatOpenAi, chainLlm. Webhook trigger; 43 nodes.

Source: https://github.com/arturolg20/n8n-social-media-automation-/blob/main/workflow-1-content-generation.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow transforms natural language queries into research reports through a five-stage AI pipeline. When triggered via webhook (typically from Google Sheets using the companion [](https://gist.g

Redis, Agent, Output Parser Structured +7
AI & RAG

Transform any Google Sheets cell into an intelligent web scraper! Type and get AI-filtered result from every website in ~20 seconds.

Agent, Mcp Client Tool, HTTP Request +4
AI & RAG

Workflow 2 — Content Review and Regeneration. Uses dataTable, chainLlm, httpRequest, lmChatOpenAi. Webhook trigger; 22 nodes.

Data Table, Chain Llm, HTTP Request +1
AI & RAG

CLINICAINTEGRAL_secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 89 nodes.

Postgres, Mcp Client Tool, Google Drive Tool +14
AI & RAG

This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages La

Google Sheets, HTTP Request, Slack +10