# Tích hợp Base (larksuite)

### Cách 1: Sử dụng API contact

**Bước 1: Bật API của Abot**

Ở hướng dẫn này sử dụng API theo phương thức xác thực là Basic Auth.

Bạn hãy vào cài đặt kiểm tra xem có menu **API Credentials** không. Nếu không có bạn hãy vào Configuration > API Settings > Enable HTTP basic auth? > **Yes**&#x20;

<figure><img src="/files/YXkfmBQiuuU6rMdSubiO" alt=""><figcaption><p>Bật API basic Auth</p></figcaption></figure>

**Bước 2: Lấy API key**&#x20;

Xem tài liệu API[ tại đây ](https://docs.google.com/document/d/1evu199SOCZzJaOn41p2Lp5QIOFqYVwm0DtbQ8IpPCGE/edit)

Lấy API key: Bạn hãy vào trang web <https://abot.vn/basic.html> và nhập tài khoản, mật khẩu rồi nhấn **Convert** Bạn sẽ được API key dạng **Basic ZGVtbzpkZW1.............**&#x20;

**Bước 3: Cài đặt đẩy dữ liệu từ Base sang Abot**

Bạn vào Base của bạn và chọn Tự động hóa và thêm quy trình làm việc mới

<figure><img src="/files/bBuhOj991zM6l2x7eICC" alt=""><figcaption></figcaption></figure>

**Bước 4:** Cài đặt điều kiện thực hiện hành động. Ở bước 2 chọn **Yêu cầu HTTP**

<figure><img src="/files/aZ0vEfOf9mYmT0OHeB1r" alt=""><figcaption></figcaption></figure>

Cài đặt Yêu cầu HTTP

<mark style="color:green;">`POST`</mark> `https://domain.abot.vn/api/contacts/new`

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Basic YWRtaW46QWJv.............. |

#### Request Body

| Name                  | Type   | Description               |
| --------------------- | ------ | ------------------------- |
| firstname             | String | Tên khách hàng            |
| phone                 | String | Số điện thoại             |
| email                 | String | Email                     |
| Các customfields khác | String | Giá trị muốn đẩy lên abot |

<figure><img src="/files/fuE08M3Q9c0V99nhzzYy" alt=""><figcaption></figcaption></figure>

Sau đó nhấn lưu và bật

<figure><img src="/files/b18cD1GCbQ2CD9DMna39" alt=""><figcaption></figcaption></figure>

Vậy là cách đẩy data từ Base sang Abot đã xong. Bạn hãy thay đổi dữ liệu trên Base theo điều kiện đã cài đặt để kiểm tra xem dữ liệu đã được đồng bộ lên Abot chưa nhé.


---

# 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.abot.vn/tich-hop/tich-hop-base-larksuite.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.
