Input and Output

At Hablla, all input and output of a component is done in JSON format. This means that each action within the automation flow receives information (input), processes that data and returns a result (output). Let's better understand how this works and how you can use this information in your daily routine.


🏗 Data Flow in Hablla

1️⃣ Entry → The component receives a set of data in JSON, coming from other steps in the flow. 2️⃣ Processing → The component manipulates the data and makes internal or external requests. 3️⃣ Output → The component returns a JSON with the processed information, including status, request details and obtained results.

📌 Real example in Hablla: Imagine that a component receives data from a WhatsApp contact and needs to create a service card in the system.


📥 Data Input

The input contains all the information available to the component. This information comes from previous components in the flow.

Example input (JSON):

{
  "whatsapp": {
    "name": "Marcus Barboza",
    "phone_number": "5517997275046"
  },
  "person": {
    "name": "Marcus Barboza",
    "customer_status": "lead",
    "id": "675c7667dc2708736e804575"
  },
  "service": {
    "type": "whatsapp",
    "status": "in_bot",
    "id": "67c7503f15788872a1f61328"
  },
  "content": {
    "body": "Hablla, good afternoon!"
  }
}

Data in Hablla is generated from user interactions, captured from external systems or added by previous components in the automation flow. Automations in Hablla can be started by events triggered from receptive components as WhatsApp, Instagram, Messenger, Telegram, Email, Phone, as well as integrations via Webhooks, CRON and Trigger.

These events (trigger) can be activated by different types of actions within the platform, such as: ✅ Interactions with People → Leads, customers or users performing actions in the system. ✅ Organizations → Updates in registered companies. ✅ Cards → Movements within boards and pipelines. ✅ Bot and Chat → Messages sent or received by AI or human operators. ✅ Phone Calls and Emails → Records and updates of communications. ✅ Custom Fields → Changes in specific data within the CRM. ✅ Session Events → Login, logout, session expired, online/offline status. ✅ Services and Transfers → Assignment of service cases and movement between departments. ✅ Tags and Users → Actions related to segmentation and user permissions. ✅ Tasks and Data Dictionary → Updates to tasks or structured information. ✅ Conversions and Status Changes → Changes in stages of the sales and service funnel.

Whenever one of these events is activated in Hablla, it triggers a trigger that receives the event data and executes configured actions, such as: Create, Update, Delete, Merge, among others. 🚀


Data Processing

Between the input and the output, the component manipulates the received data. It can: ✅ Query a database → Fetch information about customers, orders, etc. ✅ Make a call to an external API → Such as integrating an ERP or another open API system. ✅ Apply automation rules → Create, update or delete records in Hablla according to flow rules.


📤 Data Output

The output contains the result of the component's operation. It always follows the same format and includes:

1️⃣ value → Result of the operation (example: success or error). 2️⃣ headers → Request headers (useful for debugging and security). 3️⃣ config → Request configuration, such as URL and response time. 4️⃣ request → Path of the call made by the component. 5️⃣ data → The final result of the operation.

Example output (JSON):

{
  "status": "fulfilled",
  "value": {
    "status": 200,
    "statusText": "OK",
    "headers": {
      "content-type": "application/json; charset=utf-8",
      "date": "Tue, 04 Mar 2025 19:10:56 GMT"
    },
    "config": {
      "method": "GET",
      "url": "https://api.hablla.com/v3/workspaces/643d802021b6aa9234eb9797/cards"
    },
    "request": {
      "method": "GET",
      "path": "/v3/workspaces/643d802021b6aa9234eb9797/cards?person=675c7667dc2708736e804575"
    },
    "data": {
      "results": [],
      "count": 0,
      "totalItems": 0
    }
  }
}

🔹 What do these data mean?status: Indicates whether the operation was successful (fulfilled) or if there was an error. ✅ value.status: The HTTP response code (200 means success, 400 request error, etc.). ✅ config.url: The URL used in the request. ✅ request.path: The exact path of the API called. ✅ data: The result of the request (in this case, it didn't find any card for that person).


🛠 How to Use This Data in the Flow

💡 You can access any value from the input or from the output of the component within the flow using the syntax:

{{$data?.componentCode?.variablePath}}

📌 There are examples in Using variables


🚀 Conclusion

🔹 The input contains the data available before the component is executed. 🔹 The component processes that data, makes requests and applies automation rules. 🔹 The output shows the result of the operation, allowing the flow to continue automatically.

💡 Tip: Always analyze the input and the output to understand how data is flowing within the automation. This makes it easier to identify errors and configure your rules correctly! 🚀

Last updated

Was this helpful?