# Create or Update

#### 🎯 **What does this operation do?**

This operation ensures that card records are managed efficiently, preventing duplicates and keeping the data always up to date.

✅ **If the card already exists** → Updates the card information with the new data.\
✅ **If the card does not exist** → Creates a new card in the system with the provided data.

The operation allows filling and updating information such as:\
✅ Card name\
✅ Description\
✅ List within the board\
✅ Responsible user\
✅ Associated tags\
✅ Expected completion date\
✅ Custom fields

***

### 📂 **How to Configure the "Create or Update" Operation**

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

1. In **Hablla Studio**, open the automation flow where you want to create or update a card.
2. Add the **Cards**.
3. In **right side panel**, select the operation **"Create or Update"**.

***

#### 2️⃣ **Set the Identification Rule**

To determine if a card already exists, the system can use one of the following methods:

🔹 **Filter by ID** → Uses a unique identifier to find the card in the system.\
🔹 **Filter by Query** → Searches for a card based on specific parameters such as name, status, or tags.

***

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

* **Workspace ID** → Identifier of the workspace where the card will be created or updated.
* **Card Name** → Name of the card to be created or updated.

If you are using **Filter by ID**, it is necessary to provide:

* **Card ID** → Unique identifier of the card.

If you are using **Filter by Query**, you can define:

* **Associated tags**
* **Card status**
* **Responsible user**

***

#### 4️⃣ **Choose the Fields to Be Updated (Optional)**

If the card already exists, you can configure which fields should be **modified**:

🔹 **Card Name**\
🔹 **Description**\
🔹 **Board** and **List**\
🔹 **Assignee (User)**\
🔹 **Tags**\
🔹 **Expected Date**\
🔹 **Followers**\
🔹 **Custom Fields**

Additionally, you can define the **update rule**:\
🔸 **Oldest** → Keeps the data from the first record found.\
🔸 **Most Recent** → Keeps the data from the last updated record.

***

#### 5️⃣ **Save the Configuration**

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

Now, whenever this automation is triggered, the system **will create a new card or automatically update an existing one**.

***

### 📌 **Usage Example in an Automation Flow**

📊 **Scenario**: Create a flow where a new lead is recorded and associated with a card on the **opportunities board**.

1️⃣ **Block 1** → Capture a new lead via form.\
2️⃣ **Block 2** → Check if a card with the same name already exists.\
3️⃣ **Block 3** → If it exists, update the lead information on the card.\
4️⃣ **Block 4** → If it does not exist, automatically create a new card.

🚀 **Result**: The system **ensures there are no duplicates** and keeps the card always updated with the most recent lead information.

***

### 🎉 **Conclusion**

The operation **Create or Update Card** in the **Hablla Studio** is a powerful feature to keep a workflow organized and avoid duplicate records.

If you need more support, contact our team! 🚀
