Files
Emanuel Almeida 6b3a6f2698 feat: refactor 30+ skills to Anthropic progressive disclosure pattern
- All SKILL.md files now <500 lines (avg reduction 69%)
- Detailed content extracted to references/ subdirectories
- Frontmatter standardised: only name + description (Anthropic standard)
- New skills: brand-guidelines, spec-coauthor, report-templates, skill-creator
- Design skills: anti-slop guidelines, premium-proposals reference
- Removed non-standard frontmatter fields (triggers, version, author, category)

Plugins affected: infraestrutura, marketing, dev-tools, crm-ops, gestao,
core-tools, negocio, perfex-dev, wordpress, design-media

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:05:03 +00:00

161 lines
2.7 KiB
Markdown

---
name: n8n-webhook
description: Criação e gestão de webhooks n8n para receber dados de sistemas externos.
---
# /n8n-webhook - Webhooks n8n
Criar e gerir webhooks para receber dados externos.
---
## Uso
```
/n8n-webhook create <descrição> # Criar novo webhook
/n8n-webhook list # Listar webhooks existentes
/n8n-webhook test <workflow_id> # Testar webhook
```
---
## Workflow Obrigatório
```
1. Health check → mcp__n8n__n8n_health_check()
2. Pesquisar template → mcp__n8n__search_templates({ query: "webhook" })
3. Se template OK → mcp__n8n__n8n_deploy_template()
4. Se criar do zero → Seguir fluxo abaixo
```
---
## Criar Webhook do Zero
### Passo 1: Documentação do Node
```javascript
mcp__n8n__get_node({
nodeType: "nodes-base.webhook",
detail: "standard",
includeExamples: true
})
```
### Passo 2: Validar Configuração
```javascript
mcp__n8n__validate_node({
nodeType: "nodes-base.webhook",
config: {
httpMethod: "POST",
path: "meu-webhook",
responseMode: "onReceived"
},
mode: "minimal"
})
```
### Passo 3: Nodes de Processamento
| Node | Uso |
|------|-----|
| `nodes-base.set` | Transformar dados |
| `nodes-base.if` | Condicionais |
| `nodes-base.code` | JavaScript custom |
| `nodes-base.httpRequest` | Chamar APIs |
### Passo 4: Deploy
```javascript
mcp__n8n__n8n_create_workflow({
name: "Webhook - Descrição",
nodes: [...],
connections: {...},
active: true
})
```
---
## Configurações Webhook
| Parâmetro | Opções | Default |
|-----------|--------|---------|
| `httpMethod` | GET, POST, PUT, DELETE | POST |
| `path` | String única | (obrigatório) |
| `authentication` | none, basicAuth, headerAuth | none |
| `responseMode` | onReceived, lastNode | onReceived |
---
## URL do Webhook
Após deploy:
```
https://automator.descomplicar.pt/webhook/<path>
```
Modo teste (workflow inactivo):
```
https://automator.descomplicar.pt/webhook-test/<path>
```
---
## Exemplos
### Webhook → Slack
```
Webhook (POST /notify)
Set (formatar)
Slack (enviar)
```
### Webhook → CRM
```
Webhook (POST /lead)
HTTP Request (criar no Desk)
Email (notificar)
```
---
## Testar
```javascript
mcp__n8n__n8n_test_workflow({
workflowId: "wf-xxx",
inputData: {
body: { "test": "data" },
headers: { "Content-Type": "application/json" }
}
})
```
```bash
curl -X POST https://automator.descomplicar.pt/webhook/meu-webhook \
-H "Content-Type: application/json" \
-d '{"test": "data"}'
```
---
## Troubleshooting
| Problema | Solução |
|----------|---------|
| 404 Not Found | Workflow não está activo |
| 401 Unauthorized | Verificar autenticação |
| Dados não chegam | Verificar responseMode |
---
*Skill v1.0 | Descomplicar®*