Discusión

Arquitecto Senior de Automatización n8n

De Wikiprompt, la enciclopedia libre de prompts

Millie Marconi
Contribuido porMillie MarconiXFuente

29 ene 2026

Arquitecto Senior de Automatización n8n Un mensaje que obliga a Claude a generar flujos de trabajo de n8n detallados y listos para producción, sin relleno conceptual.

Contenido del PromptGuardar

🌐
WORKFLOW OVERVIEW: This workflow receives a webhook trigger, validates its payload, enriches it with an external API call, and routes the result to either a success or failure branch based on validation rules. NODES (in execution order): - Webhook Receiver: n8n-nodes-base.webhook Input: External HTTP POST request Operation: Receive payload Parameters: - HTTP Method: POST - Path: /incoming - Response Mode: On Received - Options: - Allowed Origins: [YOUR_DOMAIN] - Response Data: All Incoming Items - Payload Validator: n8n-nodes-base.function Input: Webhook Receiver output Operation: Custom JavaScript validation Parameters: - Function Code: | const item = $input.first().json; if (!item.apiKey || item.apiKey !== '[EXPECTED_KEY]') { throw new Error('Invalid API key'); } if (!item.data || typeof item.data !== 'object') { throw new Error('Missing data object'); } return { json: { valid: true, payload: item } }; - External Enricher: n8n-nodes-base.httpRequest Input: Payload Validator output (only if valid) Operation: GET request to external service Parameters: - URL: https://api.example.com/enrich/[ID] - Method: GET - Authentication: Generic Credential Type - Credential: [ENRICHMENT_API_CREDENTIAL] - Query Parameters: - source: webhook - Options: - Timeout: 5000 ms - Retry On Fail: true (max 3 retries) - Data Router: n8n-nodes-base.switch Input: External Enricher output Operation: Route based on enrichment success Parameters: - Data Property Name: json.status - Rules: - Rule 1: - Value: success - Output: Success Branch - Rule 2: - Value: failed - Output: Failure Branch - Options: - Fallback Output: Failure Branch - Success Logger: n8n-nodes-base.noOp Input: Data Router (success output) Operation: Pass through (placeholder for downstream) Parameters: (none) - Failure Notifier: n8n-nodes-base.emailSend Input: Data Router (failure output) Operation: Send alert email Parameters: - From Email: [ALERT_FROM_EMAIL] - To Email: [ALERT_TO_EMAIL] - Subject: Workflow failure for ID [ID] - Email Format: text - Message: Enrichment failed with status: {{ $json.status }} CONNECTIONS: Webhook Receiver -> Payload Validator -> External Enricher -> Data Router -> (Success Logger | Failure Notifier) ERROR HANDLING: - Payload Validator throws errors - add an Error Trigger node connected to the workflow's error output. Configure it to send a notification to [OPS_CHANNEL] via Slack/email. - External Enricher has built-in retry (3 attempts, 5s timeout). If all retries fail, the HTTP Request node outputs an error item - route this to Failure Notifier via the Data Router's fallback. - For webhook timeouts, set Response Mode to 'On Received' to acknowledge immediately, then process asynchronously. SECURITY: - Webhook validation: Check 'apiKey' field against [EXPECTED_KEY] in Payload Validator. Use environment variables (not hardcoded) for the key. - Enrichment API: Store credentials in n8n's credential store (Generic Credential Type) - never in node parameters. - Webhook: Restrict Allowed Origins to [YOUR_DOMAIN] and use HTTPS endpoint. - Email: Use SMTP credentials stored in n8n credential vault. DEPLOYMENT: - Run in queue mode (worker + main) for production scalability. - Set webhook path to a non-guessable value (e.g., /incoming/[RANDOM_HASH]). - Enable workflow execution history for audit. - Use environment variables for all secrets ([EXPECTED_KEY], [ALERT_FROM_EMAIL], etc.) via n8n's env config. - Monitor with n8n's built-in execution metrics and set up alerts on error executions.

Iniciá sesión para ver el prompt completo

Continuar con:

Al iniciar sesión, aceptás nuestros Términos de uso y Política de privacidad

Uso

Este prompt está diseñado para usarse con coding. Copiá el contenido de arriba y pegalo en tu herramienta de IA preferida.

Para mejores resultados, personalizá los marcadores (indicados con corchetes o mayúsculas) con tus requisitos específicos.

Referencias

Categorías:coding| twitter| n8n| automation

Discusión