# 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! 🚀


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hablla.com/hablla-docs-en/automation-flows/all-components/hablla/cards/create-or-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
