🇺🇸 English
🌐 2-Way Bidirectional Integration

Complete Manual for HTTP Node & Webhooks

Learn how to connect Smartchat Flow Builder to any external system, payment gateway, CRM, or automation platform in real-time.

1. What is the HTTP Request Node in Flow Builder?

The HTTP Request node (available under the Integrations category in the visual editor) allows your flow to query or send data to any external web API the exact moment a lead passes through that automation step.

📤 Outbound Push (Push)

Notify your external CRM, create a sales order in your ERP, or trigger a webhook in N8N/Make with data captured during the conversation.

📥 Inbound Pull & Mapping (Pull & Mapping)

Fetch a invoice PIX code, verify order status by Tax ID (CPF), or retrieve postal tracking numbers and save directly onto the lead.

📦 2. Sent JSON Payload Structure (Body Sent)

For POST and PUT requests, Smartchat automatically injects full contact data into the JSON request body:

// JSON structure sent to your external endpoint:
{
  "lead_id": "lead_9823a10f",
  "name": "Maria Silva",
  "username": "mariasilva",
  "channel": "instagram",
  "email": "maria@email.com",
  "phone": "+5511999998888",
  "cpf": "123.456.789-00",
  "tags": ["Interessado", "VIP"],
  "custom_fields": {
    "produto_interesse": "Curso Avançado v2.0"
  }
}

🔄 3. JSON Response Mapping & 2-Way Routing

Write any response value from the external API directly into lead fields and route the flow dynamically:

🟢 Success Branch (HTTP 2xx)

When the external API responds with HTTP 200 or 201, JSON mapping saves the chosen variables and the flow continues down the green Success branch (e.g. send DM with PIX code).

✔ Example: Map `data.pix_copia_cola` -> Lead Field `{pix_code}`

🔴 Error Branch (HTTP 4xx / 5xx / Timeout)

If the external server is down or returns an error (e.g. invalid CPF), the flow doesn't freeze! It follows the red Error branch (e.g. notify customer or transfer to human agent).

✖ Example: API unavailable -> Fallback message node: "Sorry, please try again in a few moments."

💡 4. Practical Use Cases & Integration Possibilities

See how businesses use the HTTP Request node daily to automate end-to-end processes:

💳

Payment Gateways

Connect Asaas, Mercado Pago, Hotmart, or Kiwify to generate real-time PIX/Boleto invoices during support chats.

Automation Platforms

Trigger webhooks to N8N, Make (Integromat), Zapier, or Pipedream and connect your bot to 5,000+ business apps.

📊

External CRMs & Email Marketing

Instantly sync new contacts into ActiveCampaign, RD Station, HubSpot, or Salesforce at the exact moment of capture.

🔍

Data Validation

Query public or private APIs to validate customer Tax ID (CPF), lookup addresses via ZIP code, or check product stock availability.

🚚

Order Tracking

Allow customers to enter their order number and let the bot query delivery status from postal carriers automatically.

🤖

Custom AI APIs

Send message history to Python microservices or proprietary AI endpoints to receive tailored analytics or recommendations.