# Tasks

With it, you can create new tasks, update information, remove records, search for existing tasks, and add checklist items for better management.

### 📂 **Available Operations**

Here are the operations that can be performed with this component:

| **Operation**                                       | **Description**                            |
| --------------------------------------------------- | ------------------------------------------ |
| **Create (create)**                                 | Creates a new task in the system.          |
| **Update (update)**                                 | Updates the data of an existing task.      |
| **Delete (delete)**                                 | Removes a task from the system.            |
| **Get by ID (get\_by\_id)**                         | Gets the details of a specific task.       |
| **Get all (get\_all)**                              | Gets a list of all registered tasks.       |
| **Add checklist item (add\_checklist\_item)**       | Adds an item to the task's checklist.      |
| **Update checklist item (update\_checklist\_item)** | Updates an item in the task's checklist.   |
| **Remove checklist item (delete\_checklist\_item)** | Removes an item from the task's checklist. |

### 📑 **Variables Used in the Component**

Below are the variables used in the component **Tasks**, including their data types and whether they are required.

| **Field**            | **Data Type** | **Required?** | **Description**                                                  |
| -------------------- | ------------- | ------------- | ---------------------------------------------------------------- |
| **Workspace ID**     | `string`      | ✅ Yes         | ID of the workspace where the task is located.                   |
| **Task ID**          | `string`      | ✅ Yes         | Unique identifier of the task in the system.                     |
| **Full name**        | `string`      | ✅ Yes         | Task name.                                                       |
| **Description**      | `string`      | ✅ Yes         | Detailed description of the task.                                |
| **Responsible User** | `string`      | ✅ Yes         | Identifier of the user assigned to the task.                     |
| **Type**             | `string`      | ✅ Yes         | Defines the type of task (e.g., call, email, meeting, etc.).     |
| **Color**            | `string`      | ✅ Yes         | Defines the task color for visual organization.                  |
| **Sector**           | `string`      | ❌ No          | Department to which the task is linked.                          |
| **Person**           | `string`      | ❌ No          | Person associated with the task (if applicable).                 |
| **Organization**     | `string`      | ❌ No          | Organization linked to the task.                                 |
| **Service**          | `string`      | ❌ No          | Service related to the task (if applicable).                     |
| **Linked Card**      | `string`      | ❌ No          | ID of the card associated with the task.                         |
| **Start Date**       | `datetime`    | ✅ Yes         | Start date and time of the task.                                 |
| **Finish Date**      | `datetime`    | ✅ Yes         | Expected date and time for task completion.                      |
| **Status**           | `string`      | ✅ Yes         | Defines the task status (pending, in progress, completed, etc.). |
| **Checklist**        | `array`       | ❌ No          | List of items that make up the task's checklist.                 |

### 🎯 **How to Configure an Operation**

#### 1️⃣ **Access the Component**

1. In **Hablla Studio**, open the automation flow where you want to include the action.
2. Add the block **"Tasks"**.
3. In **right side panel**, select the desired operation.

#### 2️⃣ **Fill in the Required Fields**

Depending on the chosen operation, some fields are mandatory. Consult the variables table above to understand which data must be filled in for each operation.

#### 3️⃣ **Save the Configuration**

After filling in the fields, click the **"Save"** ✅.

Now, whenever this automation is triggered, the task will be managed according to the defined configuration.

### 📝 **Operation Details**

Each operation has required and optional fields that must be filled in as needed. Below, we will detail each of them:

1️⃣ **Create Task**\
2️⃣ **Update Task**\
3️⃣ **Delete Task**\
4️⃣ **Get Task by ID**\
5️⃣ **Get All Tasks**\
6️⃣ **Manage Task Checklist**

🚀 **Continue to the next topics to configure each operation correctly!**
