Usar Claude AI para generar texto alternativo accesible desde Google Sheets a WordPress

Intermedio

Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 10 nodos.Utiliza principalmente nodos como If, Code, HttpRequest, GoogleSheets, SplitInBatches. Generar textos alternativos accesibles desde Google Sheets a WordPress con Claude AI

Requisitos previos
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Credenciales de API de Google Sheets
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "393ca9e36a1f81b0f643c72792946a5fe5e49eb4864181ba4032e5a408278263",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b093bb6e-2797-470b-b32f-c4ffe96249bb",
      "name": "Recorrer elementos",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        912,
        -16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "30695fd4-d335-46c8-9987-119ce068da74",
      "name": "Analizar imagen",
      "type": "@n8n/n8n-nodes-langchain.anthropic",
      "onError": "continueRegularOutput",
      "position": [
        1152,
        0
      ],
      "parameters": {
        "text": "#Tâche \nAnalysez cette image et rédigez une description alternative (alt text) pour l'accessibilité web.\nCritères :\n\n##Caractéristiques\nMaximum 125 caractères\nDécrire les éléments visuels essentiels\nTon neutre et factuel\nCommencer par l'élément principal\n\nInclure : sujet principal, actions significatives, contexte important, texte visible\nÉviter : \"image de\", \"photo de\", détails décoratifs, interprétations\nRéponse : Fournir uniquement la description, sans guillemets.\n\n##Exemples\n\nIncorrect : Photo d'un chat mignon qui dort sur un canapé rouge dans un salon\nCorrect : Chat tigré dormant sur un canapé rouge",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "claude-sonnet-4-20250514"
        },
        "options": {},
        "resource": "image",
        "imageUrls": "={{ $json.URL }}"
      },
      "credentials": {
        "anthropicApi": {
          "id": "WXQf5QsxCs3AyxlW",
          "name": "Anthropic account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "e981bf45-2b8b-45ae-bce5-f20f6d29941b",
      "name": "Actualizar fila en hoja",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1568,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "URL": "={{ $('Loop Over Items').item.json.URL }}",
            "Alt text": "={{ $json.content[0].text }}",
            "row_number": 0
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Alt text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Alt text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Export media"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('Send Sheets URL').item.json.chatInput }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wBRLUCktxqXE6DVJ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "71cf07ec-7559-4944-a0e6-adf9b85ac4ee",
      "name": "Enviar URL de Sheets",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        16,
        0
      ],
      "webhookId": "cb9f34cd-dd44-4859-8a12-4f7a20c32237",
      "parameters": {
        "mode": "webhook",
        "public": true,
        "options": {
          "responseMode": "responseNode"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "1060d6dd-e8c7-4550-bac0-ab2e608b75a1",
      "name": "Obtener URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        656,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Export media"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('Send Sheets URL').item.json.chatInput }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wBRLUCktxqXE6DVJ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "1c82e061-01e3-4efb-861f-b928903ec7ee",
      "name": "Obtener clave WP + URL del sitio sin https://",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        224,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Infos client"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $json.chatInput }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wBRLUCktxqXE6DVJ",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "232776ed-2123-4ff7-96f5-336e85470a99",
      "name": "Obtener clave Base64",
      "type": "n8n-nodes-base.code",
      "position": [
        448,
        0
      ],
      "parameters": {
        "jsCode": "// Dans une Function/Code node n8n\nconst username = $('Get WP Key + website URL WITHOUT https://').first().json['Admin Name'];\nconst password = $('Get WP Key + website URL WITHOUT https://').first().json.KEY;\nconst credentials = username + ':' + password;\n\n// Encoder en Base64 avec Buffer (Node.js)\nconst encodedCredentials = Buffer.from(credentials).toString('base64');\nconst authHeader = 'Basic ' + encodedCredentials;\n\nreturn {\n  json: {\n    username: username,\n    password: password,\n    credentials: credentials,\n    authHeader: authHeader\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "5ef87414-1e64-443d-925d-fd4c443030d3",
      "name": "Actualizar alt de imagen en WP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1792,
        0
      ],
      "parameters": {
        "url": "=https://{{ $('Get WP Key + website URL WITHOUT https://').item.json.Domaine }}/wp-json/wp/v2/media/{{ $('Loop Over Items').item.json.ID }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "alt_text",
              "value": "={{ $('Analyze image').item.json.content[0].text }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "={{ $('Get Base64 key').item.json.authHeader }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3fb66fec-319f-482c-8b04-3a45490bea72",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1360,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "86ad2ab9-a213-4e16-b81b-b1c4315b6822",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $json.error }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7d00b936-879e-45d0-a874-2a40f5b5f6c3",
      "name": "Nota adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        -592
      ],
      "parameters": {
        "color": 4,
        "width": 816,
        "height": 1776,
        "content": "Voici la description avec le lien hypertexte échappé :\n## AI-powered alt text generation from Google Sheets to WordPress media\n## Who's it for\nWordPress site owners, content managers, and accessibility advocates who need to efficiently add alt text descriptions to multiple images for better SEO and web accessibility compliance.\n## What it does\nThis workflow automates the process of generating and updating alt text for WordPress media files using AI analysis. It reads image URLs from a Google Sheet, analyzes each image with Claude AI to generate accessibility-compliant descriptions, updates the sheet with the generated alt text, and automatically applies the descriptions to the corresponding WordPress media files. The workflow includes error handling to skip unsupported media formats and continue processing.\n## How it works\n\nInput: Provide a Google Sheets URL containing image URLs and WordPress media IDs\nAuthentication: Retrieves WordPress credentials from a separate sheet and generates Base64 authentication\nProcessing: Loops through each image URL in the sheet\nAI Analysis: Claude AI analyzes each image and generates concise, accessible alt text (max 125 characters)\nError Handling: Automatically skips unsupported media formats and continues with the next item\nUpdate Sheet: Writes the generated alt text back to the Google Sheet\nWordPress Update: Updates the WordPress media library with the new alt text via REST API\n\n## Requirements\n\nGoogle Sheets with image URLs and WordPress media IDs\nWordPress site with Application Passwords enabled\nClaude AI (Anthropic) API credentials\nWordPress admin credentials stored in Google Sheets\nExport Media URLs WordPress plugin for generating the media list\n\n## How to set up\n### Step 1: Export your WordPress media URLs\n\nInstall the \"Export Media URLs\" plugin on your WordPress site\nGo to the plugin settings and check both ID and URL columns for export (these are mandatory for the workflow)\nExport your media list to get the required data\n\n### Step 2: Configure WordPress Application Passwords\n\nGo to WordPress Admin → Users → Your Profile\nScroll down to \"Application Passwords\" section\nEnter application name (e.g., \"n8n API\")\nClick \"Add New Application Password\"\nCopy the generated password immediately (it won't be shown again)\n\n### Step 3: Set up Google Sheets\n[Duplicate this Google Sheets template]\n(https://docs.google.com/spreadsheets/d/1BKGQRx_xDiuh3QD3ACOOTJomsWFuPBjCHYMQX8UzTBE/edit?usp=sharing\\) to get the correct structure.\nThe template includes two sheets:\nSheet 1: \"Export media\" - Paste your exported media data with columns:\n\nID (WordPress media ID)\nURL (image URL)\nAlt text (will be populated by the workflow)\n\nSheet 2: \"Infos client\" - Add your WordPress credentials:\n\nAdmin Name: Your WordPress username\nKEY: The application password you generated\nDomaine: Your site URL without https:// (format: \"example.com\")\n\n### Step 4: Configure API credentials\n\nAdd your Anthropic API credentials to the Claude node\nConnect your Google Sheets account to the Google Sheets nodes\n\n## How to customize\n\nLanguage: The Claude prompt is in French - modify it in the \"Analyze image\" node for other languages\nAlt text length: Adjust the 125-character limit in the Claude prompt\nBatch processing: Change the batch size in the Split in Batches node\nError handling: The workflow automatically handles unsupported formats, but you can modify the error handling logic\nAuthentication: Customize for different WordPress authentication methods\n\nThis workflow is perfect for managing accessibility compliance across large WordPress media libraries while maintaining consistent, AI-generated descriptions. It's built to be resilient and will continue processing even when encountering unsupported media formats."
      },
      "typeVersion": 1
    },
    {
      "id": "ccae276a-6fc9-4a8e-94d4-f72a478cf336",
      "name": "Fin",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1168,
        -192
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={\n    \"text\": \"Fin de la rédaction des alt description\"\n } "
      },
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "3fb66fec-319f-482c-8b04-3a45490bea72": {
      "main": [
        [
          {
            "node": "e981bf45-2b8b-45ae-bce5-f20f6d29941b",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1060d6dd-e8c7-4550-bac0-ab2e608b75a1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30695fd4-d335-46c8-9987-119ce068da74": {
      "main": [
        [
          {
            "node": "3fb66fec-319f-482c-8b04-3a45490bea72",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "232776ed-2123-4ff7-96f5-336e85470a99": {
      "main": [
        [
          {
            "node": "1060d6dd-e8c7-4550-bac0-ab2e608b75a1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "ccae276a-6fc9-4a8e-94d4-f72a478cf336",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "30695fd4-d335-46c8-9987-119ce068da74",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "71cf07ec-7559-4944-a0e6-adf9b85ac4ee": {
      "main": [
        [
          {
            "node": "1c82e061-01e3-4efb-861f-b928903ec7ee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5ef87414-1e64-443d-925d-fd4c443030d3": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e981bf45-2b8b-45ae-bce5-f20f6d29941b": {
      "main": [
        [
          {
            "node": "5ef87414-1e64-443d-925d-fd4c443030d3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1c82e061-01e3-4efb-861f-b928903ec7ee": {
      "main": [
        [
          {
            "node": "232776ed-2123-4ff7-96f5-336e85470a99",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Creación de contenido, IA Multimodal

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Generador de contenido SEO usando Claude AI y análisis de la competencia
Usar Claude AI y análisis de competencia de Apify para generar contenido de SEO
If
Code
Filter
+
If
Code
Filter
36 NodosGrowth AI
Creación de contenido
Generador de contenido SEO usando Claude AI, análisis de la competencia y RAG de Supabase
Usar Claude AI, análisis de competencia y Supabase RAG para generar contenido de SEO
If
Code
Filter
+
If
Code
Filter
40 NodosGrowth AI
Creación de contenido
Crear cortos de terror sin rostro usando Replicate y OpenAI
Crear cortometrajes de terror sin rostros con OpenAI TTS, generación de video de Replicate y subida a YouTube
If
Code
Wait
+
If
Code
Wait
50 NodosDeb Mukherjee
Creación de contenido
Envío automático de mensajes de agradecimiento y cupones de lealtad de WhatsApp para Shopify (usando la API de Rapiwa)
Envío automático de mensajes de agradecimiento y cupones de fidelización de WhatsApp desde Shopify con Rapiwa
If
Code
Wait
+
If
Code
Wait
17 NodosSpaGreen Creative
Creación de contenido
Automatización de Printify - Actualizar títulos y descripciones - AlexK1919
Usar GPT-4o-mini para generar automáticamente títulos y descripciones de productos SEO para Printify
If
Set
Code
+
If
Set
Code
26 NodosAmit Mehta
Creación de contenido
Publicador de blogs - Automatización impulsada por IA de la investigación, creación, optimación y publicación de contenido completa
Usar Gemini, Ideogram AI y WordPress para automatizar la creación y publicación de contenido para blog
If
Set
Code
+
If
Set
Code
35 NodosIncrementors
Creación de contenido
Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos10
Categoría2
Tipos de nodos8
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34