feat: adiciona 12 plugins Descomplicar ao marketplace
Plugins: automacao, crm-ops, design-media, dev-tools, gestao, infraestrutura, marketing, negocio, perfex-dev, project-manager, wordpress + hello-plugin (existente). Totais: 83 skills, 44 agents, 12 datasets.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
162
automacao/skills/n8n-sync/SKILL.md
Normal file
162
automacao/skills/n8n-sync/SKILL.md
Normal file
@@ -0,0 +1,162 @@
|
||||
# /n8n-sync - Sincronização de Dados n8n
|
||||
|
||||
Manter dados sincronizados entre sistemas.
|
||||
|
||||
---
|
||||
|
||||
## Uso
|
||||
|
||||
```
|
||||
/n8n-sync create <origem> <destino> # Criar sync
|
||||
/n8n-sync list # Listar syncs
|
||||
/n8n-sync status <workflow_id> # Ver estado
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Workflow Obrigatório
|
||||
|
||||
```
|
||||
1. Health check → mcp__n8n__n8n_health_check()
|
||||
2. Pesquisar template → mcp__n8n__search_templates({ task: "data_sync" })
|
||||
3. Se template OK → mcp__n8n__n8n_deploy_template()
|
||||
4. Se criar do zero → Seguir fluxo abaixo
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Padrões de Sync
|
||||
|
||||
### One-Way (Unidireccional)
|
||||
|
||||
```
|
||||
Origem → Transform → Destino
|
||||
```
|
||||
|
||||
### Two-Way (Bidireccional)
|
||||
|
||||
```
|
||||
A ←→ B (com resolução de conflitos)
|
||||
```
|
||||
|
||||
### Hub-and-Spoke
|
||||
|
||||
```
|
||||
A ↔ HUB ↔ B
|
||||
↕
|
||||
C
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nodes por Sistema
|
||||
|
||||
### APIs/CRM
|
||||
|
||||
| Node | Sistema |
|
||||
|------|---------|
|
||||
| `nodes-base.httpRequest` | APIs genéricas |
|
||||
| `nodes-base.webhook` | Receber dados |
|
||||
|
||||
### Bases de Dados
|
||||
|
||||
| Node | Sistema |
|
||||
|------|---------|
|
||||
| `nodes-base.postgres` | PostgreSQL |
|
||||
| `nodes-base.mySql` | MySQL |
|
||||
| `nodes-base.mongoDb` | MongoDB |
|
||||
|
||||
### Ficheiros
|
||||
|
||||
| Node | Sistema |
|
||||
|------|---------|
|
||||
| `nodes-base.googleSheets` | Google Sheets |
|
||||
| `nodes-base.spreadsheetFile` | Excel/CSV |
|
||||
| `nodes-base.ftp` | FTP/SFTP |
|
||||
|
||||
---
|
||||
|
||||
## Exemplo: CRM → Sheets
|
||||
|
||||
```
|
||||
Schedule (horário)
|
||||
↓
|
||||
HTTP Request (GET leads)
|
||||
↓
|
||||
IF (há dados?)
|
||||
↓
|
||||
Set (mapear campos)
|
||||
↓
|
||||
Google Sheets (append)
|
||||
↓
|
||||
Slack (confirmar)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Estratégias
|
||||
|
||||
| Estratégia | Uso |
|
||||
|------------|-----|
|
||||
| Full Sync | Apagar tudo + inserir tudo |
|
||||
| Incremental | Apenas modificados (updated_at) |
|
||||
| Delta | Comparar hashes |
|
||||
|
||||
---
|
||||
|
||||
## Upsert Pattern
|
||||
|
||||
```javascript
|
||||
{
|
||||
nodeType: "nodes-base.postgres",
|
||||
config: {
|
||||
operation: "upsert",
|
||||
table: "clientes",
|
||||
columns: "email,nome,empresa",
|
||||
conflictColumns: "email"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Gestão de Erros
|
||||
|
||||
### Retry
|
||||
|
||||
```javascript
|
||||
{
|
||||
options: {
|
||||
retry: {
|
||||
maxRetries: 3,
|
||||
retryInterval: 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Dead Letter Queue
|
||||
|
||||
```
|
||||
Operação
|
||||
↓ (erro)
|
||||
Error Trigger
|
||||
↓
|
||||
BD (guardar erro)
|
||||
↓
|
||||
Slack (alertar)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Problema | Solução |
|
||||
|----------|---------|
|
||||
| Duplicados | Usar upsert |
|
||||
| Timeout | Batches menores |
|
||||
| Rate limit | Adicionar delays |
|
||||
|
||||
---
|
||||
|
||||
*Skill v1.0 | Descomplicar®*
|
||||
Reference in New Issue
Block a user