This workflow follows the HTTP Request → Supabase 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 →
{
"name": "Barbearia SaaS Pro",
"nodes": [
{
"id": "1",
"name": "Entrada do Webhook",
"type": "n8n-nodes-base.webhook",
"parameters": {
"httpMethod": "POST",
"path": "evolution",
"responseMode": "onReceived"
},
"position": [
100,
100
]
},
{
"id": "2",
"name": "Identificador do Locat\u00e1rio",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": "// Extrai ID do locat\u00e1rio da mensagem\nconst tenantId = msg.payload.text.match(/\\*\\d{3}/)?.[0].replace('*','') || msg.payload.from.match(/(\\d+)@/)?.[1];\nconst sessionId = `${tenantId}-${msg.payload.from}`;\nreturn { tenantId, sessionId, rawInput: msg.payload };"
},
"position": [
300,
100
]
},
{
"id": "3",
"name": "Gerenciador de Sess\u00e3o",
"type": "n8n-nodes-base.supabase",
"parameters": {
"operation": "executeQuery",
"query": "INSERT INTO sessions (id, tenant_id, state, context) VALUES ($1, $2, $3, $4) ON CONFLICT (id) DO UPDATE SET state = $3, context = $4",
"values": "={{[$node[\"Identificador do Locat\u00e1rio\"].json[\"sessionId\"], $node[\"Identificador do Locat\u00e1rio\"].json[\"tenantId\"], \"EM_PROGRESSO\", $node[\"Identificador do Locat\u00e1rio\"].json]}}"
},
"position": [
500,
100
]
},
{
"id": "4",
"name": "Processador Dify AI",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.dify.ai/v1/chat",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_DIFY_KEY"
},
"body": {
"query": "={{$node[\"Identificador do Locat\u00e1rio\"].json[\"rawInput\"].text}}",
"context": {
"tenant": "={{$node[\"Identificador do Locat\u00e1rio\"].json[\"tenantId\"]}}",
"history": "={{$node[\"Gerenciador de Sess\u00e3o\"].json}}"
}
}
},
"position": [
700,
100
]
},
{
"id": "5",
"name": "Validador de Agendamento",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": "const { data, error } = await supabase\n .from('disponibilidade')\n .select('*')\n .eq('tenant_id', $json.tenantId)\n .eq('data', $json.selectedDate)\n .eq('barber_id', $json.barberId);\nreturn data?.length > 0 ? { available: true } : { available: false };"
},
"position": [
900,
100
]
},
{
"id": "6",
"name": "Gateway de Pagamento",
"type": "n8n-nodes-base.switch",
"parameters": {
"rules": [
{
"type": "equal",
"value": "pix",
"output": "OpenPIX"
},
{
"type": "equal",
"value": "cartao",
"output": "Banco EFI"
}
]
},
"position": [
1100,
100
]
},
{
"id": "7",
"name": "Integra\u00e7\u00e3o OpenPIX",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.openpix.com.br/v1/charge",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_OPENPIX_KEY"
},
"body": {
"correlationID": "={{$json.sessionId}}",
"value": "={{$json.amount}}"
}
},
"position": [
1300,
100
]
},
{
"id": "8",
"name": "Processador do Banco EFI",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.efipay.com.br/v1/charge",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_EFI_KEY"
},
"body": {
"payment": {
"method": "={{$json.paymentMethod}}",
"wallet": "={{$json.walletType}}"
}
}
},
"position": [
1300,
300
]
},
{
"id": "9",
"name": "Transfer\u00eancia para Chatwoot",
"type": "n8n-nodes-base.chatwoot",
"parameters": {
"operation": "create",
"additionalFields": {
"content": "={{$json}}",
"inboxId": "={{$node[\"Configura\u00e7\u00e3o do Locat\u00e1rio\"].json.chatwoot_inbox}}"
}
},
"position": [
1500,
100
]
},
{
"id": "10",
"name": "Console de Depura\u00e7\u00e3o",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": "await supabase\n .from('debug_logs')\n .insert([{\n tenant_id: $json.tenantId,\n session_id: $json.sessionId,\n log_data: $json\n }]);"
},
"position": [
1700,
100
]
}
],
"connections": {
"1": {
"main": [
[
{
"node": "2",
"type": "main",
"index": 0
}
]
]
},
"2": {
"main": [
[
{
"node": "3",
"type": "main",
"index": 0
}
]
]
},
"3": {
"main": [
[
{
"node": "4",
"type": "main",
"index": 0
}
]
]
},
"4": {
"main": [
[
{
"node": "5",
"type": "main",
"index": 0
}
]
]
},
"5": {
"main": [
[
{
"node": "6",
"type": "main",
"index": 0
}
]
]
},
"6": {
"main": [
[
{
"node": "7",
"type": "main",
"index": 0
},
{
"node": "8",
"type": "main",
"index": 1
}
]
]
},
"7": {
"main": [
[
{
"node": "9",
"type": "main",
"index": 0
}
]
]
},
"8": {
"main": [
[
{
"node": "9",
"type": "main",
"index": 0
}
]
]
},
"9": {
"main": [
[
{
"node": "10",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Barbearia SaaS Pro. Uses supabase, httpRequest, chatwoot. Webhook trigger; 10 nodes.
Source: https://gist.github.com/Gustavouu/53a9f0dc5698af07e0dbff819e28ff0c — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
2. Refresh Pipedrive tokens. Uses stopAndError, stickyNote, supabase, httpRequest. Webhook trigger; 29 nodes.
This workflow provides an OAuth 2.0 auth token refresh process for better control. Developers can utilize it as an alternative to n8n's built-in OAuth flow to achieve improved control and visibility.
Buildnbloom - Typeform to Tier 1 Call. Uses supabase, airtable, httpRequest. Webhook trigger; 17 nodes.
Ai Assistant Workflow. Uses supabase, httpRequest, emailSend. Webhook trigger; 14 nodes.
Automação Master: Pedidos & Reservas (Web & App) - Evolution MultiTenant. Uses httpRequest, supabase. Webhook trigger; 14 nodes.