Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(apitable): ui improvement (#16061)

Talal Jaber5899cf2a1d80
diff --git a/bun.lock b/bun.lock
index e1182de3c2d..8148ef0ab0a 100644
--- a/bun.lock
+++ b/bun.lock
@@ -709,7 +709,7 @@
},
"packages/pieces/community/apitable": {
"name": "@activepieces/piece-apitable",
- "version": "0.3.0",
+ "version": "0.4.0",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/apitable/package.json b/packages/pieces/community/apitable/package.json
index 30b352842c9..53d547a481b 100644
--- a/packages/pieces/community/apitable/package.json
+++ b/packages/pieces/community/apitable/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-apitable",
- "version": "0.3.0",
+ "version": "0.4.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/apitable/src/i18n/de.json b/packages/pieces/community/apitable/src/i18n/de.json
index 5bea1637fd7..90178151d8d 100644
--- a/packages/pieces/community/apitable/src/i18n/de.json
+++ b/packages/pieces/community/apitable/src/i18n/de.json
@@ -53,5 +53,26 @@
"Form Data": "Formulardaten",
"Raw": "Rohe",
"New Record": "Neuer Datensatz",
- "Triggers when a new record is added to a datasheet.": "Wird ausgelöst, wenn ein neuer Datensatz zu einem Datenblatt hinzugefügt wird."
+ "Triggers when a new record is added to a datasheet.": "Wird ausgelöst, wenn ein neuer Datensatz zu einem Datenblatt hinzugefügt wird.",
+ "API Token": "API-Token",
+ "Instance URL": "Instanz-URL",
+ "Generate it in AITable under My Settings → Developer.": "Erstellen Sie ihn in AITable unter Meine Einstellungen → Entwickler.",
+ "Keep the default unless you self-host AITable.": "Behalten Sie den Standard, außer Sie hosten AITable selbst.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "So erhalten Sie Ihren API-Token:\n1. Melden Sie sich bei AITable an.\n2. Klicken Sie unten links auf Ihren Avatar, dann auf **Meine Einstellungen**.\n3. Öffnen Sie **Entwickler** und klicken Sie auf **Neuen Token generieren**.\n4. Kopieren Sie den Token und fügen Sie ihn unten ein.",
+ "Creates a new record in a datasheet.": "Erstellt einen neuen Datensatz in einem Datenblatt.",
+ "Updates an existing record in a datasheet.": "Aktualisiert einen bestehenden Datensatz in einem Datenblatt.",
+ "Finds records in a datasheet.": "Findet Datensätze in einem Datenblatt.",
+ "Filter Formula": "Filterformel",
+ "Fields to Return": "Zurückzugebende Felder",
+ "The AITable workspace that holds your datasheet.": "Der AITable-Arbeitsbereich, der Ihr Datenblatt enthält.",
+ "The table inside the space.": "Die Tabelle innerhalb des Bereichs.",
+ "Values for the new record. Blank fields are left empty.": "Werte für den neuen Datensatz. Leere Felder bleiben leer.",
+ "Map it from a trigger or a Find Records step.": "Übernehmen Sie sie aus einem Trigger oder einem Schritt „Datensätze finden“.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Leere Felder behalten ihren Wert; nicht angehakte Kontrollkästchen werden geleert.",
+ "Only records where this formula is true are returned.": "Nur Datensätze, für die diese Formel wahr ist, werden zurückgegeben.",
+ "Only return these records. Empty: search all.": "Nur diese Datensätze zurückgeben. Leer: alle durchsuchen.",
+ "Field names to include. Empty: every field.": "Einzuschließende Feldnamen. Leer: alle Felder.",
+ "Records returned per page.": "Pro Seite zurückgegebene Datensätze.",
+ "Caps matching records before paging. Empty: no cap.": "Begrenzt die Treffer vor der Seitenaufteilung. Leer: keine Grenze.",
+ "Which page to return, starting at 1.": "Welche Seite zurückgegeben wird, beginnend bei 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/es.json b/packages/pieces/community/apitable/src/i18n/es.json
index 2b508a3b5ff..a5b5f05d0c5 100644
--- a/packages/pieces/community/apitable/src/i18n/es.json
+++ b/packages/pieces/community/apitable/src/i18n/es.json
@@ -53,5 +53,26 @@
"Form Data": "Datos de Formulario",
"Raw": "Rápido",
"New Record": "Nuevo registro",
- "Triggers when a new record is added to a datasheet.": "Se activa cuando se añade un nuevo registro a una hoja de datos."
+ "Triggers when a new record is added to a datasheet.": "Se activa cuando se añade un nuevo registro a una hoja de datos.",
+ "API Token": "Token de API",
+ "Instance URL": "URL de la instancia",
+ "Generate it in AITable under My Settings → Developer.": "Genérelo en AITable en Mi configuración → Desarrollador.",
+ "Keep the default unless you self-host AITable.": "Mantenga el valor predeterminado salvo que aloje AITable usted mismo.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Para obtener su token de API:\n1. Inicie sesión en AITable.\n2. Haga clic en su avatar abajo a la izquierda y luego en **Mi configuración**.\n3. Abra **Desarrollador** y haga clic en **Generar nuevo token**.\n4. Copie el token y péguelo abajo.",
+ "Creates a new record in a datasheet.": "Crea un nuevo registro en una hoja de datos.",
+ "Updates an existing record in a datasheet.": "Actualiza un registro existente en una hoja de datos.",
+ "Finds records in a datasheet.": "Busca registros en una hoja de datos.",
+ "Filter Formula": "Fórmula de filtro",
+ "Fields to Return": "Campos a devolver",
+ "The AITable workspace that holds your datasheet.": "El espacio de AITable que contiene su hoja de datos.",
+ "The table inside the space.": "La tabla dentro del espacio.",
+ "Values for the new record. Blank fields are left empty.": "Valores del nuevo registro. Los campos en blanco quedan vacíos.",
+ "Map it from a trigger or a Find Records step.": "Asígnelo desde un disparador o un paso Buscar registros.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Los campos en blanco conservan su valor; las casillas sin marcar se borran.",
+ "Only records where this formula is true are returned.": "Solo se devuelven los registros para los que esta fórmula es verdadera.",
+ "Only return these records. Empty: search all.": "Devolver solo estos registros. Vacío: buscar en todos.",
+ "Field names to include. Empty: every field.": "Nombres de campos a incluir. Vacío: todos los campos.",
+ "Records returned per page.": "Registros devueltos por página.",
+ "Caps matching records before paging. Empty: no cap.": "Limita las coincidencias antes de paginar. Vacío: sin límite.",
+ "Which page to return, starting at 1.": "Qué página devolver, empezando por 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/fr.json b/packages/pieces/community/apitable/src/i18n/fr.json
index e3e1b762c7f..3b0a7627234 100644
--- a/packages/pieces/community/apitable/src/i18n/fr.json
+++ b/packages/pieces/community/apitable/src/i18n/fr.json
@@ -53,5 +53,26 @@
"Form Data": "Données du formulaire",
"Raw": "Brut",
"New Record": "Nouvel enregistrement",
- "Triggers when a new record is added to a datasheet.": "Déclenche lorsqu'un nouvel enregistrement est ajouté à une fiche de données."
+ "Triggers when a new record is added to a datasheet.": "Déclenche lorsqu'un nouvel enregistrement est ajouté à une fiche de données.",
+ "API Token": "Jeton API",
+ "Instance URL": "URL de l'instance",
+ "Generate it in AITable under My Settings → Developer.": "Générez-le dans AITable sous Mes paramètres → Développeur.",
+ "Keep the default unless you self-host AITable.": "Gardez la valeur par défaut sauf si vous hébergez AITable vous-même.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Pour obtenir votre jeton API :\n1. Connectez-vous à AITable.\n2. Cliquez sur votre avatar en bas à gauche, puis sur **Mes paramètres**.\n3. Ouvrez **Développeur** et cliquez sur **Générer un nouveau jeton**.\n4. Copiez le jeton et collez-le ci-dessous.",
+ "Creates a new record in a datasheet.": "Crée un nouvel enregistrement dans une feuille de données.",
+ "Updates an existing record in a datasheet.": "Met à jour un enregistrement existant dans une feuille de données.",
+ "Finds records in a datasheet.": "Recherche des enregistrements dans une feuille de données.",
+ "Filter Formula": "Formule de filtre",
+ "Fields to Return": "Champs à renvoyer",
+ "The AITable workspace that holds your datasheet.": "L'espace AITable qui contient votre feuille de données.",
+ "The table inside the space.": "La table à l'intérieur de l'espace.",
+ "Values for the new record. Blank fields are left empty.": "Valeurs du nouvel enregistrement. Les champs vides restent vides.",
+ "Map it from a trigger or a Find Records step.": "Reprenez-le d'un déclencheur ou d'une étape Rechercher des enregistrements.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Les champs vides gardent leur valeur ; les cases non cochées sont effacées.",
+ "Only records where this formula is true are returned.": "Seuls les enregistrements pour lesquels cette formule est vraie sont renvoyés.",
+ "Only return these records. Empty: search all.": "Ne renvoyer que ces enregistrements. Vide : tout rechercher.",
+ "Field names to include. Empty: every field.": "Noms des champs à inclure. Vide : tous les champs.",
+ "Records returned per page.": "Enregistrements renvoyés par page.",
+ "Caps matching records before paging. Empty: no cap.": "Plafonne les résultats avant la pagination. Vide : aucun plafond.",
+ "Which page to return, starting at 1.": "La page à renvoyer, à partir de 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/id.json b/packages/pieces/community/apitable/src/i18n/id.json
index 48442c6cccc..b15facdb5e2 100644
--- a/packages/pieces/community/apitable/src/i18n/id.json
+++ b/packages/pieces/community/apitable/src/i18n/id.json
@@ -46,5 +46,26 @@
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Record": "New Record",
- "Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet."
+ "Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet.",
+ "API Token": "Token API",
+ "Instance URL": "URL Instans",
+ "Generate it in AITable under My Settings → Developer.": "Buat di AITable pada Pengaturan Saya → Pengembang.",
+ "Keep the default unless you self-host AITable.": "Biarkan default kecuali Anda meng-host AITable sendiri.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Untuk mendapatkan token API Anda:\n1. Masuk ke AITable.\n2. Klik avatar Anda di kiri bawah, lalu **Pengaturan Saya**.\n3. Buka **Pengembang** dan klik **Buat token baru**.\n4. Salin token dan tempel di bawah.",
+ "Creates a new record in a datasheet.": "Membuat catatan baru di lembar data.",
+ "Updates an existing record in a datasheet.": "Memperbarui catatan yang ada di lembar data.",
+ "Finds records in a datasheet.": "Mencari catatan di lembar data.",
+ "Filter Formula": "Rumus Filter",
+ "Fields to Return": "Kolom yang Dikembalikan",
+ "The AITable workspace that holds your datasheet.": "Ruang AITable yang berisi lembar data Anda.",
+ "The table inside the space.": "Tabel di dalam ruang.",
+ "Values for the new record. Blank fields are left empty.": "Nilai untuk catatan baru. Kolom kosong dibiarkan kosong.",
+ "Map it from a trigger or a Find Records step.": "Petakan dari pemicu atau langkah Cari Catatan.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Kolom kosong mempertahankan nilainya; kotak centang yang tidak dicentang dikosongkan.",
+ "Only records where this formula is true are returned.": "Hanya catatan yang membuat rumus ini bernilai benar yang dikembalikan.",
+ "Only return these records. Empty: search all.": "Hanya kembalikan catatan ini. Kosong: cari semua.",
+ "Field names to include. Empty: every field.": "Nama kolom yang disertakan. Kosong: semua kolom.",
+ "Records returned per page.": "Catatan yang dikembalikan per halaman.",
+ "Caps matching records before paging. Empty: no cap.": "Membatasi hasil yang cocok sebelum dibagi per halaman. Kosong: tanpa batas.",
+ "Which page to return, starting at 1.": "Halaman yang dikembalikan, mulai dari 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/ja.json b/packages/pieces/community/apitable/src/i18n/ja.json
index 346b9b63d5c..ec52e030917 100644
--- a/packages/pieces/community/apitable/src/i18n/ja.json
+++ b/packages/pieces/community/apitable/src/i18n/ja.json
@@ -53,5 +53,26 @@
"Form Data": "フォームデータ",
"Raw": "Raw",
"New Record": "新しいレコード",
- "Triggers when a new record is added to a datasheet.": "新しいレコードがデータシートに追加されたときにトリガーされます。"
+ "Triggers when a new record is added to a datasheet.": "新しいレコードがデータシートに追加されたときにトリガーされます。",
+ "API Token": "APIトークン",
+ "Instance URL": "インスタンスURL",
+ "Generate it in AITable under My Settings → Developer.": "AITableの「マイ設定」→「開発者」で生成します。",
+ "Keep the default unless you self-host AITable.": "AITableをセルフホストしていない場合は既定のままにします。",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "APIトークンの取得方法:\n1. AITableにサインインします。\n2. 左下のアバターをクリックし、**マイ設定**を開きます。\n3. **開発者**を開き、**新しいトークンを生成**をクリックします。\n4. トークンをコピーして下に貼り付けます。",
+ "Creates a new record in a datasheet.": "データシートに新しいレコードを作成します。",
+ "Updates an existing record in a datasheet.": "データシートの既存のレコードを更新します。",
+ "Finds records in a datasheet.": "データシートのレコードを検索します。",
+ "Filter Formula": "フィルター数式",
+ "Fields to Return": "返すフィールド",
+ "The AITable workspace that holds your datasheet.": "データシートがあるAITableのスペース。",
+ "The table inside the space.": "スペース内のテーブル。",
+ "Values for the new record. Blank fields are left empty.": "新しいレコードの値。空欄のフィールドは空のままです。",
+ "Map it from a trigger or a Find Records step.": "トリガーまたは「レコードを検索」ステップから割り当てます。",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "空欄のフィールドは値を保持し、チェックのないチェックボックスはクリアされます。",
+ "Only records where this formula is true are returned.": "この数式が真になるレコードだけが返されます。",
+ "Only return these records. Empty: search all.": "これらのレコードだけを返します。空欄: すべてを検索。",
+ "Field names to include. Empty: every field.": "含めるフィールド名。空欄: すべてのフィールド。",
+ "Records returned per page.": "1ページあたりに返すレコード数。",
+ "Caps matching records before paging. Empty: no cap.": "ページ分割の前に一致件数を制限します。空欄: 上限なし。",
+ "Which page to return, starting at 1.": "返すページ番号(1から開始)。"
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/nl.json b/packages/pieces/community/apitable/src/i18n/nl.json
index d6b7dec11c1..f3fc0a59d1f 100644
--- a/packages/pieces/community/apitable/src/i18n/nl.json
+++ b/packages/pieces/community/apitable/src/i18n/nl.json
@@ -53,5 +53,26 @@
"Form Data": "Formulieren gegevens",
"Raw": "Onbewerkte",
"New Record": "Nieuwe Record",
- "Triggers when a new record is added to a datasheet.": "Triggert wanneer een nieuw record wordt toegevoegd aan een datasheet."
+ "Triggers when a new record is added to a datasheet.": "Triggert wanneer een nieuw record wordt toegevoegd aan een datasheet.",
+ "API Token": "API-token",
+ "Instance URL": "Instantie-URL",
+ "Generate it in AITable under My Settings → Developer.": "Genereer het in AITable onder Mijn instellingen → Ontwikkelaar.",
+ "Keep the default unless you self-host AITable.": "Laat de standaardwaarde staan, tenzij u AITable zelf host.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Zo krijgt u uw API-token:\n1. Meld u aan bij AITable.\n2. Klik linksonder op uw avatar en daarna op **Mijn instellingen**.\n3. Open **Ontwikkelaar** en klik op **Nieuw token genereren**.\n4. Kopieer het token en plak het hieronder.",
+ "Creates a new record in a datasheet.": "Maakt een nieuw record aan in een datasheet.",
+ "Updates an existing record in a datasheet.": "Werkt een bestaand record in een datasheet bij.",
+ "Finds records in a datasheet.": "Zoekt records in een datasheet.",
+ "Filter Formula": "Filterformule",
+ "Fields to Return": "Terug te geven velden",
+ "The AITable workspace that holds your datasheet.": "De AITable-ruimte waarin uw datasheet staat.",
+ "The table inside the space.": "De tabel binnen de ruimte.",
+ "Values for the new record. Blank fields are left empty.": "Waarden voor het nieuwe record. Lege velden blijven leeg.",
+ "Map it from a trigger or a Find Records step.": "Koppel het vanuit een trigger of een stap Records zoeken.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Lege velden houden hun waarde; niet-aangevinkte selectievakjes worden gewist.",
+ "Only records where this formula is true are returned.": "Alleen records waarvoor deze formule waar is, worden teruggegeven.",
+ "Only return these records. Empty: search all.": "Alleen deze records teruggeven. Leeg: alles doorzoeken.",
+ "Field names to include. Empty: every field.": "Op te nemen veldnamen. Leeg: alle velden.",
+ "Records returned per page.": "Records per pagina.",
+ "Caps matching records before paging. Empty: no cap.": "Beperkt de treffers vóór het pagineren. Leeg: geen limiet.",
+ "Which page to return, starting at 1.": "Welke pagina wordt teruggegeven, vanaf 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/pt.json b/packages/pieces/community/apitable/src/i18n/pt.json
index 473bf1a0b98..ab3dc245fbf 100644
--- a/packages/pieces/community/apitable/src/i18n/pt.json
+++ b/packages/pieces/community/apitable/src/i18n/pt.json
@@ -53,5 +53,26 @@
"Form Data": "Dados de Formulário",
"Raw": "RAW",
"New Record": "Novo Registro",
- "Triggers when a new record is added to a datasheet.": "Aciona quando um novo registro é adicionado a uma ficha técnica."
+ "Triggers when a new record is added to a datasheet.": "Aciona quando um novo registro é adicionado a uma ficha técnica.",
+ "API Token": "Token de API",
+ "Instance URL": "URL da instância",
+ "Generate it in AITable under My Settings → Developer.": "Gere-o no AITable em Minhas configurações → Desenvolvedor.",
+ "Keep the default unless you self-host AITable.": "Mantenha o padrão, a menos que você hospede o AITable por conta própria.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Para obter seu token de API:\n1. Entre no AITable.\n2. Clique no seu avatar no canto inferior esquerdo e depois em **Minhas configurações**.\n3. Abra **Desenvolvedor** e clique em **Gerar novo token**.\n4. Copie o token e cole-o abaixo.",
+ "Creates a new record in a datasheet.": "Cria um novo registro em uma planilha de dados.",
+ "Updates an existing record in a datasheet.": "Atualiza um registro existente em uma planilha de dados.",
+ "Finds records in a datasheet.": "Encontra registros em uma planilha de dados.",
+ "Filter Formula": "Fórmula de filtro",
+ "Fields to Return": "Campos a retornar",
+ "The AITable workspace that holds your datasheet.": "O espaço do AITable que contém sua planilha de dados.",
+ "The table inside the space.": "A tabela dentro do espaço.",
+ "Values for the new record. Blank fields are left empty.": "Valores do novo registro. Campos em branco ficam vazios.",
+ "Map it from a trigger or a Find Records step.": "Mapeie-o de um gatilho ou de uma etapa Encontrar registros.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Campos em branco mantêm o valor; caixas de seleção desmarcadas são limpas.",
+ "Only records where this formula is true are returned.": "Somente registros para os quais esta fórmula é verdadeira são retornados.",
+ "Only return these records. Empty: search all.": "Retornar apenas estes registros. Vazio: pesquisar todos.",
+ "Field names to include. Empty: every field.": "Nomes dos campos a incluir. Vazio: todos os campos.",
+ "Records returned per page.": "Registros retornados por página.",
+ "Caps matching records before paging. Empty: no cap.": "Limita as correspondências antes da paginação. Vazio: sem limite.",
+ "Which page to return, starting at 1.": "Qual página retornar, começando em 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/ru.json b/packages/pieces/community/apitable/src/i18n/ru.json
index ba0c3e436d7..6fd7eb98df2 100644
--- a/packages/pieces/community/apitable/src/i18n/ru.json
+++ b/packages/pieces/community/apitable/src/i18n/ru.json
@@ -46,5 +46,26 @@
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD",
"New Record": "Новая запись",
- "Triggers when a new record is added to a datasheet.": "Включает при добавлении новой записи в таблицу."
+ "Triggers when a new record is added to a datasheet.": "Включает при добавлении новой записи в таблицу.",
+ "API Token": "API-токен",
+ "Instance URL": "URL экземпляра",
+ "Generate it in AITable under My Settings → Developer.": "Создайте его в AITable в разделе «Мои настройки» → «Разработчик».",
+ "Keep the default unless you self-host AITable.": "Оставьте значение по умолчанию, если вы не размещаете AITable у себя.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Как получить API-токен:\n1. Войдите в AITable.\n2. Нажмите на свой аватар внизу слева, затем **Мои настройки**.\n3. Откройте **Разработчик** и нажмите **Создать новый токен**.\n4. Скопируйте токен и вставьте его ниже.",
+ "Creates a new record in a datasheet.": "Создаёт новую запись в таблице данных.",
+ "Updates an existing record in a datasheet.": "Обновляет существующую запись в таблице данных.",
+ "Finds records in a datasheet.": "Находит записи в таблице данных.",
+ "Filter Formula": "Формула фильтра",
+ "Fields to Return": "Возвращаемые поля",
+ "The AITable workspace that holds your datasheet.": "Пространство AITable, в котором находится ваша таблица данных.",
+ "The table inside the space.": "Таблица внутри пространства.",
+ "Values for the new record. Blank fields are left empty.": "Значения новой записи. Пустые поля остаются пустыми.",
+ "Map it from a trigger or a Find Records step.": "Подставьте его из триггера или шага «Найти записи».",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Пустые поля сохраняют значение; неотмеченные флажки сбрасываются.",
+ "Only records where this formula is true are returned.": "Возвращаются только записи, для которых эта формула истинна.",
+ "Only return these records. Empty: search all.": "Вернуть только эти записи. Пусто: искать во всех.",
+ "Field names to include. Empty: every field.": "Названия полей для включения. Пусто: все поля.",
+ "Records returned per page.": "Записей на странице.",
+ "Caps matching records before paging. Empty: no cap.": "Ограничивает число совпадений до разбивки на страницы. Пусто: без ограничения.",
+ "Which page to return, starting at 1.": "Какую страницу вернуть, начиная с 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/translation.json b/packages/pieces/community/apitable/src/i18n/translation.json
index 77d553732eb..ba4f7cf5aa4 100644
--- a/packages/pieces/community/apitable/src/i18n/translation.json
+++ b/packages/pieces/community/apitable/src/i18n/translation.json
@@ -1,57 +1,89 @@
{
"Interactive spreadsheets with collaboration": "Interactive spreadsheets with collaboration",
- "Token": "Token",
- "Instance Url": "Instance Url",
- "The token of the AITable account": "The token of the AITable account",
- "The url of the AITable instance.": "The url of the AITable instance.",
- "\n To obtain your AITable token, follow these steps:\n\n 1. Log in to your AITable account.\n 2. Visit https://apitable.com/workbench\n 3. Click on your profile picture (Bottom left).\n 4. Click on \"My Settings\".\n 5. Click on \"Developer\".\n 6. Click on \"Generate new token\".\n 7. Copy the token.\n ": "\n To obtain your AITable token, follow these steps:\n\n 1. Log in to your AITable account.\n 2. Visit https://apitable.com/workbench\n 3. Click on your profile picture (Bottom left).\n 4. Click on \"My Settings\".\n 5. Click on \"Developer\".\n 6. Click on \"Generate new token\".\n 7. Copy the token.\n ",
+ "API Token": "API Token",
+ "Instance URL": "Instance URL",
+ "Generate it in AITable under My Settings → Developer.": "Generate it in AITable under My Settings → Developer.",
+ "Keep the default unless you self-host AITable.": "Keep the default unless you self-host AITable.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.",
"Create Record": "Create Record",
"Update Record": "Update Record",
"Find Records": "Find Records",
+ "Delete Record": "Delete Record",
+ "List Spaces": "List Spaces",
+ "List Datasheets": "List Datasheets",
+ "Get Datasheet Fields": "Get Datasheet Fields",
+ "List Views": "List Views",
+ "Upload Attachment": "Upload Attachment",
+ "Search Nodes": "Search Nodes",
+ "Get Node Details": "Get Node Details",
"Custom API Call": "Custom API Call",
- "Creates a new record in datasheet.": "Creates a new record in datasheet.",
- "Updates an existing record in datasheet.": "Updates an existing record in datasheet.",
- "Finds records in datasheet.": "Finds records in datasheet.",
+ "Creates a new record in a datasheet.": "Creates a new record in a datasheet.",
+ "Updates an existing record in a datasheet.": "Updates an existing record in a datasheet.",
+ "Finds records in a datasheet.": "Finds records in a datasheet.",
+ "Deletes one or more records from a datasheet.": "Deletes one or more records from a datasheet.",
+ "Lists the spaces available to the authenticated account.": "Lists the spaces available to the authenticated account.",
+ "Lists the datasheets available in a space.": "Lists the datasheets available in a space.",
+ "Reads the field (column) definitions of a datasheet.": "Reads the field (column) definitions of a datasheet.",
+ "Lists the views of a datasheet.": "Lists the views of a datasheet.",
+ "Uploads a file to a datasheet and returns its storage URL.": "Uploads a file to a datasheet and returns its storage URL.",
+ "Searches the file nodes (datasheets, folders, forms, dashboards, etc.) in a space.": "Searches the file nodes (datasheets, folders, forms, dashboards, etc.) in a space.",
+ "Reads the details of a single file node, including its children.": "Reads the details of a single file node, including its children.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Space": "Space",
"Datasheet": "Datasheet",
"Fields": "Fields",
"Record ID": "Record ID",
+ "Filter Formula": "Filter Formula",
"Record IDs": "Record IDs",
- "Field Names": "Field Names",
- "Max Records": "Max Records",
+ "Fields to Return": "Fields to Return",
"Page Size": "Page Size",
+ "Max Records": "Max Records",
"Page Number": "Page Number",
- "Filter": "Filter",
+ "File": "File",
+ "Node Type": "Node Type",
+ "Name Query": "Name Query",
+ "Node ID": "Node ID",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body Type": "Body Type",
"Body": "Body",
- "Response is Binary ?": "Response is Binary ?",
- "No Error on Failure": "No Error on Failure",
- "Timeout (in seconds)": "Timeout (in seconds)",
+ "Response is Binary": "Response is Binary",
+ "Return Error as Output": "Return Error as Output",
+ "Timeout": "Timeout",
"Follow redirects": "Follow redirects",
- "The fields to add to the record.": "The fields to add to the record.",
- "The ID of the record to update.": "The ID of the record to update.",
- "The IDs of the records to find.": "The IDs of the records to find.",
- "The returned record results are limited to the specified fields": "The returned record results are limited to the specified fields",
- "How many records are returned in total": "How many records are returned in total",
- "How many records are returned per page (max 1000)": "How many records are returned per page (max 1000)",
- "Specifies the page number of the page": "Specifies the page number of the page",
- "The filter to apply to the records (see https://help.aitable.ai/docs/guide/manual-formula-field-overview/)": "The filter to apply to the records (see https://help.aitable.ai/docs/guide/manual-formula-field-overview/)",
+ "The AITable workspace that holds your datasheet.": "The AITable workspace that holds your datasheet.",
+ "The table inside the space.": "The table inside the space.",
+ "Values for the new record. Blank fields are left empty.": "Values for the new record. Blank fields are left empty.",
+ "Map it from a trigger or a Find Records step.": "Map it from a trigger or a Find Records step.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Blank fields keep their value; unticked checkboxes are cleared.",
+ "Only records where this formula is true are returned.": "Only records where this formula is true are returned.",
+ "Only return these records. Empty: search all.": "Only return these records. Empty: search all.",
+ "Field names to include. Empty: every field.": "Field names to include. Empty: every field.",
+ "Records returned per page.": "Records returned per page.",
+ "Caps matching records before paging. Empty: no cap.": "Caps matching records before paging. Empty: no cap.",
+ "Which page to return, starting at 1.": "Which page to return, starting at 1.",
+ "The IDs of the records to delete.": "The IDs of the records to delete.",
+ "The file to upload.": "The file to upload.",
+ "The type of node to search for.": "The type of node to search for.",
+ "Filter results to node names containing this text.": "Filter results to node names containing this text.",
+ "The ID of the node to read.": "The ID of the node to read.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
+ "Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
+ "On a failed request, output the error instead of failing the step.": "On a failed request, output the error instead of failing the step.",
+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconds to wait for a response. Empty: up to the flow limit (10 min).",
+ "Follow 3xx redirects instead of returning them as the response.": "Follow 3xx redirects instead of returning them as the response.",
+ "Folder": "Folder",
+ "Form": "Form",
+ "Dashboard": "Dashboard",
+ "Mirror": "Mirror",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
- "None": "None",
- "JSON": "JSON",
- "Form Data": "Form Data",
- "Raw": "Raw",
"New Record": "New Record",
"Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/vi.json b/packages/pieces/community/apitable/src/i18n/vi.json
index a1e7cc0580d..d6439c532c9 100644
--- a/packages/pieces/community/apitable/src/i18n/vi.json
+++ b/packages/pieces/community/apitable/src/i18n/vi.json
@@ -46,5 +46,26 @@
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Record": "New Record",
- "Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet."
+ "Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet.",
+ "API Token": "Mã API",
+ "Instance URL": "URL phiên bản",
+ "Generate it in AITable under My Settings → Developer.": "Tạo trong AITable tại Cài đặt của tôi → Nhà phát triển.",
+ "Keep the default unless you self-host AITable.": "Giữ mặc định trừ khi bạn tự lưu trữ AITable.",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "Để lấy mã API:\n1. Đăng nhập vào AITable.\n2. Nhấp vào ảnh đại diện ở góc dưới bên trái, rồi chọn **Cài đặt của tôi**.\n3. Mở **Nhà phát triển** và nhấp **Tạo mã mới**.\n4. Sao chép mã và dán vào bên dưới.",
+ "Creates a new record in a datasheet.": "Tạo một bản ghi mới trong bảng dữ liệu.",
+ "Updates an existing record in a datasheet.": "Cập nhật một bản ghi hiện có trong bảng dữ liệu.",
+ "Finds records in a datasheet.": "Tìm bản ghi trong bảng dữ liệu.",
+ "Filter Formula": "Công thức lọc",
+ "Fields to Return": "Trường cần trả về",
+ "The AITable workspace that holds your datasheet.": "Không gian AITable chứa bảng dữ liệu của bạn.",
+ "The table inside the space.": "Bảng bên trong không gian.",
+ "Values for the new record. Blank fields are left empty.": "Giá trị cho bản ghi mới. Trường để trống sẽ để trống.",
+ "Map it from a trigger or a Find Records step.": "Lấy từ trình kích hoạt hoặc bước Tìm bản ghi.",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "Trường để trống giữ nguyên giá trị; ô không được đánh dấu sẽ bị xóa.",
+ "Only records where this formula is true are returned.": "Chỉ trả về các bản ghi mà công thức này đúng.",
+ "Only return these records. Empty: search all.": "Chỉ trả về các bản ghi này. Để trống: tìm tất cả.",
+ "Field names to include. Empty: every field.": "Tên trường cần bao gồm. Để trống: mọi trường.",
+ "Records returned per page.": "Số bản ghi trả về mỗi trang.",
+ "Caps matching records before paging. Empty: no cap.": "Giới hạn số kết quả khớp trước khi phân trang. Để trống: không giới hạn.",
+ "Which page to return, starting at 1.": "Trang cần trả về, bắt đầu từ 1."
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/i18n/zh.json b/packages/pieces/community/apitable/src/i18n/zh.json
index 4afec557969..630f3acea05 100644
--- a/packages/pieces/community/apitable/src/i18n/zh.json
+++ b/packages/pieces/community/apitable/src/i18n/zh.json
@@ -53,5 +53,26 @@
"Form Data": "表单数据",
"Raw": "原始文件",
"New Record": "New Record",
- "Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet."
+ "Triggers when a new record is added to a datasheet.": "Triggers when a new record is added to a datasheet.",
+ "API Token": "API 令牌",
+ "Instance URL": "实例 URL",
+ "Generate it in AITable under My Settings → Developer.": "在 AITable 的“我的设置”→“开发者”中生成。",
+ "Keep the default unless you self-host AITable.": "除非自行托管 AITable,否则保留默认值。",
+ "To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.": "获取 API 令牌:\n1. 登录 AITable。\n2. 点击左下角的头像,然后点击 **我的设置**。\n3. 打开 **开发者** 并点击 **生成新令牌**。\n4. 复制令牌并粘贴到下方。",
+ "Creates a new record in a datasheet.": "在数据表中创建一条新记录。",
+ "Updates an existing record in a datasheet.": "更新数据表中的现有记录。",
+ "Finds records in a datasheet.": "在数据表中查找记录。",
+ "Filter Formula": "筛选公式",
+ "Fields to Return": "要返回的字段",
+ "The AITable workspace that holds your datasheet.": "包含数据表的 AITable 空间。",
+ "The table inside the space.": "空间内的表格。",
+ "Values for the new record. Blank fields are left empty.": "新记录的值。留空的字段保持为空。",
+ "Map it from a trigger or a Find Records step.": "从触发器或“查找记录”步骤映射。",
+ "Blank fields keep their value; unticked checkboxes are cleared.": "留空的字段保留原值;未勾选的复选框会被清除。",
+ "Only records where this formula is true are returned.": "只返回使该公式为真的记录。",
+ "Only return these records. Empty: search all.": "只返回这些记录。留空:搜索全部。",
+ "Field names to include. Empty: every field.": "要包含的字段名称。留空:所有字段。",
+ "Records returned per page.": "每页返回的记录数。",
+ "Caps matching records before paging. Empty: no cap.": "在分页前限制匹配数量。留空:不限制。",
+ "Which page to return, starting at 1.": "要返回的页码,从 1 开始。"
}
\ No newline at end of file
diff --git a/packages/pieces/community/apitable/src/index.ts b/packages/pieces/community/apitable/src/index.ts
index 2faa0d9c74d..9e837d9aab8 100644
--- a/packages/pieces/community/apitable/src/index.ts
+++ b/packages/pieces/community/apitable/src/index.ts
@@ -1,10 +1,5 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
-import {
- createPiece,
- PieceAuth,
- PiecePropValueSchema,
- Property,
-} from '@activepieces/pieces-framework';
+import { createPiece } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/pieces-framework';
import { createRecordAction } from './lib/actions/create-record';
import { findRecordAction } from './lib/actions/find-record';
@@ -18,14 +13,13 @@ import { uploadAttachmentAction } from './lib/actions/upload-attachment';
import { searchNodesAction } from './lib/actions/search-nodes';
import { getNodeDetailsAction } from './lib/actions/get-node-details';
import { newRecordTrigger } from './lib/triggers/new-record';
-import { makeClient } from './lib/common';
import { APITableAuth } from './lib/auth';
export const apitable = createPiece({
displayName: 'AITable',
auth: APITableAuth,
description: `Interactive spreadsheets with collaboration`,
- minimumSupportedRelease: '0.87.0',
+ minimumSupportedRelease: '0.88.2',
logoUrl: 'https://cdn.activepieces.com/pieces/apitable.png',
categories: [PieceCategory.PRODUCTIVITY],
authors: [
diff --git a/packages/pieces/community/apitable/src/lib/actions/create-record.ts b/packages/pieces/community/apitable/src/lib/actions/create-record.ts
index 944c5fd9740..d51e12b4183 100644
--- a/packages/pieces/community/apitable/src/lib/actions/create-record.ts
+++ b/packages/pieces/community/apitable/src/lib/actions/create-record.ts
@@ -1,6 +1,5 @@
import {
DynamicPropsValue,
- PiecePropValueSchema,
createAction,
} from '@activepieces/pieces-framework';
import { APITableCommon, createNewFields, makeClient } from '../common';
@@ -12,7 +11,7 @@ export const createRecordAction = createAction({
name: 'apitable_create_record',
classification: 'WRITE',
displayName: 'Create Record',
- description: 'Creates a new record in datasheet.',
+ description: 'Creates a new record in a datasheet.',
audience: 'both',
aiMetadata: {
description:
@@ -22,7 +21,9 @@ export const createRecordAction = createAction({
props: {
space_id: APITableCommon.space_id,
datasheet_id: APITableCommon.datasheet_id,
- fields: APITableCommon.fields,
+ fields: APITableCommon.fields({
+ description: 'Values for the new record. Blank fields are left empty.',
+ }),
},
outputSchema: createRecordActionOutputSchema,
async run(context) {
diff --git a/packages/pieces/community/apitable/src/lib/actions/find-record.ts b/packages/pieces/community/apitable/src/lib/actions/find-record.ts
index c1b674ce0bf..e9d7dd3f915 100644
--- a/packages/pieces/community/apitable/src/lib/actions/find-record.ts
+++ b/packages/pieces/community/apitable/src/lib/actions/find-record.ts
@@ -1,5 +1,4 @@
import {
- PiecePropValueSchema,
Property,
createAction,
} from '@activepieces/pieces-framework';
@@ -13,7 +12,7 @@ export const findRecordAction = createAction({
name: 'apitable_find_record',
classification: 'SEARCH',
displayName: 'Find Records',
- description: 'Finds records in datasheet.',
+ description: 'Finds records in a datasheet.',
audience: 'both',
aiMetadata: {
description:
@@ -23,37 +22,43 @@ export const findRecordAction = createAction({
props: {
space_id: APITableCommon.space_id,
datasheet_id: APITableCommon.datasheet_id,
+ filter: Property.LongText({
+ displayName: 'Filter Formula',
+ description: 'Only records where this formula is true are returned.',
+ placeholder: '{Status} = "Done"',
+ required: false,
+ }),
recordIds: Property.Array({
displayName: 'Record IDs',
- description: 'The IDs of the records to find.',
+ description: 'Only return these records. Empty: search all.',
required: false,
}),
fieldNames: Property.Array({
- displayName: 'Field Names',
- description:
- 'The returned record results are limited to the specified fields',
- required: false,
- }),
- maxRecords: Property.Number({
- displayName: 'Max Records',
- description: 'How many records are returned in total',
+ displayName: 'Fields to Return',
+ description: 'Field names to include. Empty: every field.',
required: false,
}),
pageSize: Property.Number({
displayName: 'Page Size',
- description: 'How many records are returned per page (max 1000)',
+ description: 'Records returned per page.',
required: false,
+ defaultValue: 100,
+ display: 'stepper',
+ min: 1,
+ max: 1000,
+ step: 1,
}),
- pageNum: Property.Number({
- displayName: 'Page Number',
- description: 'Specifies the page number of the page',
+ maxRecords: Property.Number({
+ displayName: 'Max Records',
+ description: 'Caps matching records before paging. Empty: no cap.',
required: false,
+ advanced: true,
}),
- filter: Property.LongText({
- displayName: 'Filter',
- description:
- 'The filter to apply to the records (see https://help.aitable.ai/docs/guide/manual-formula-field-overview/)',
+ pageNum: Property.Number({
+ displayName: 'Page Number',
+ description: 'Which page to return, starting at 1.',
required: false,
+ advanced: true,
}),
},
outputSchema: findRecordActionOutputSchema,
diff --git a/packages/pieces/community/apitable/src/lib/actions/update-record.ts b/packages/pieces/community/apitable/src/lib/actions/update-record.ts
index e1dac94cb72..675f8b416e2 100644
--- a/packages/pieces/community/apitable/src/lib/actions/update-record.ts
+++ b/packages/pieces/community/apitable/src/lib/actions/update-record.ts
@@ -1,6 +1,5 @@
import {
DynamicPropsValue,
- PiecePropValueSchema,
Property,
createAction,
} from '@activepieces/pieces-framework';
@@ -13,7 +12,7 @@ export const updateRecordAction = createAction({
name: 'apitable_update_record',
classification: 'WRITE',
displayName: 'Update Record',
- description: 'Updates an existing record in datasheet.',
+ description: 'Updates an existing record in a datasheet.',
audience: 'both',
aiMetadata: {
description:
@@ -25,10 +24,14 @@ export const updateRecordAction = createAction({
datasheet_id: APITableCommon.datasheet_id,
recordId: Property.ShortText({
displayName: 'Record ID',
- description: 'The ID of the record to update.',
+ description: 'Map it from a trigger or a Find Records step.',
+ placeholder: 'rec2T5ppW1Mal',
required: true,
}),
- fields: APITableCommon.fields,
+ fields: APITableCommon.fields({
+ description:
+ 'Blank fields keep their value; unticked checkboxes are cleared.',
+ }),
},
outputSchema: updateRecordActionOutputSchema,
async run(context) {
diff --git a/packages/pieces/community/apitable/src/lib/auth.ts b/packages/pieces/community/apitable/src/lib/auth.ts
index cef10829b53..4345f6a8175 100644
--- a/packages/pieces/community/apitable/src/lib/auth.ts
+++ b/packages/pieces/community/apitable/src/lib/auth.ts
@@ -3,26 +3,17 @@ import { makeClient } from './common';
export const APITableAuth = PieceAuth.CustomAuth({
required: true,
- description: `
- To obtain your AITable token, follow these steps:
-
- 1. Log in to your AITable account.
- 2. Visit https://apitable.com/workbench
- 3. Click on your profile picture (Bottom left).
- 4. Click on "My Settings".
- 5. Click on "Developer".
- 6. Click on "Generate new token".
- 7. Copy the token.
- `,
+ description:
+ 'To get your API token:\n1. Sign in to AITable.\n2. Click your avatar at the bottom left, then **My Settings**.\n3. Open **Developer** and click **Generate new token**.\n4. Copy the token and paste it below.',
props: {
token: PieceAuth.SecretText({
- displayName: 'Token',
- description: 'The token of the AITable account',
+ displayName: 'API Token',
+ description: 'Generate it in AITable under My Settings → Developer.',
required: true,
}),
apiTableUrl: Property.ShortText({
- displayName: 'Instance Url',
- description: 'The url of the AITable instance.',
+ displayName: 'Instance URL',
+ description: 'Keep the default unless you self-host AITable.',
required: true,
defaultValue: 'https://aitable.ai',
}),
diff --git a/packages/pieces/community/apitable/src/lib/common/index.ts b/packages/pieces/community/apitable/src/lib/common/index.ts
index e704f2b3def..5ab02f4e7fc 100644
--- a/packages/pieces/community/apitable/src/lib/common/index.ts
+++ b/packages/pieces/community/apitable/src/lib/common/index.ts
@@ -1,4 +1,4 @@
-import { DynamicPropsValue, PiecePropValueSchema, Property } from '@activepieces/pieces-framework';
+import { DynamicPropsValue, PiecePropValueSchema, Property, tryCatch } from '@activepieces/pieces-framework';
import { APITableAuth } from '../auth';
import { AITableClient } from './client';
import { AITableFieldType, AITableNumericFieldTypes } from './constants';
@@ -12,6 +12,7 @@ export const APITableCommon = {
space_id: Property.Dropdown({
auth: APITableAuth,
displayName: 'Space',
+ description: 'The AITable workspace that holds your datasheet.',
required: true,
refreshers: [],
options: async ({ auth }) => {
@@ -19,11 +20,25 @@ export const APITableCommon = {
return {
disabled: true,
options: [],
- placeholder: 'Connect your account first',
+ placeholder: 'Connect your AITable account first',
};
}
const client = makeClient(auth.props);
- const res = await client.listSpaces();
+ const { data: res, error } = await tryCatch(() => client.listSpaces());
+ if (error) {
+ return {
+ disabled: true,
+ options: [],
+ placeholder: "Couldn't load spaces. Check your connection.",
+ };
+ }
+ if (res.data.spaces.length === 0) {
+ return {
+ disabled: false,
+ options: [],
+ placeholder: 'No spaces found for this account.',
+ };
+ }
return {
disabled: false,
options: res.data.spaces.map((space) => {
@@ -38,18 +53,40 @@ export const APITableCommon = {
datasheet_id: Property.Dropdown({
auth: APITableAuth,
displayName: 'Datasheet',
+ description: 'The table inside the space.',
required: true,
refreshers: ['space_id'],
options: async ({ auth, space_id }) => {
- if (!auth || !space_id) {
+ if (!auth) {
return {
disabled: true,
options: [],
- placeholder: 'Connect your account first and select space.',
+ placeholder: 'Connect your AITable account first',
+ };
+ }
+ if (!space_id) {
+ return {
+ disabled: true,
+ options: [],
+ placeholder: 'Select a space first',
};
}
const client = makeClient(auth.props);
- const res = await client.listDatasheets(space_id as string);
+ const { data: res, error } = await tryCatch(() => client.listDatasheets(space_id as string));
+ if (error) {
+ return {
+ disabled: true,
+ options: [],
+ placeholder: "Couldn't load datasheets. Check your connection.",
+ };
+ }
+ if (res.data.nodes.length === 0) {
+ return {
+ disabled: false,
+ options: [],
+ placeholder: 'No datasheets in this space.',
+ };
+ }
return {
disabled: false,
options: res.data.nodes.map((datasheet) => {
@@ -61,14 +98,14 @@ export const APITableCommon = {
};
},
}),
- fields: Property.DynamicProperties({
+ fields: ({ description }: { description: string }) => Property.DynamicProperties({
auth: APITableAuth,
displayName: 'Fields',
- description: 'The fields to add to the record.',
+ description,
required: true,
refreshers: ['auth', 'datasheet_id'],
props: async ({ auth, datasheet_id }) => {
- if(!auth)
+ if(!auth || !datasheet_id)
{
return {}
}
@@ -177,6 +214,7 @@ export const APITableCommon = {
case AITableFieldType.TWO_WAY_LINK:
props[field.name] = Property.Array({
displayName: field.name,
+ description: 'IDs of the records to link, like rec2T5ppW1Mal.',
required: false,
});
break;
@@ -229,8 +267,13 @@ export async function createNewFields(
// Handle member fields
else if(field.type === AITableFieldType.MEMBER)
{
+ const value = fields[key];
+ const selected = Array.isArray(value) ? value.map(String) : [String(value)];
+ if (selected.length === 0) {
+ continue;
+ }
newFields[key] = field.property?.options?.filter(
- (member) => member.id === `${fields[key]}`,
+ (member) => selected.includes(member.id),
);
}
// Handle multi-select and two-way-link fields
diff --git a/packages/pieces/community/apitable/src/lib/triggers/new-record.ts b/packages/pieces/community/apitable/src/lib/triggers/new-record.ts
index 53fe1165056..09db8c9d55e 100644
--- a/packages/pieces/community/apitable/src/lib/triggers/new-record.ts
+++ b/packages/pieces/community/apitable/src/lib/triggers/new-record.ts
@@ -10,6 +10,7 @@ import {
pollingHelper,
} from '@activepieces/pieces-common';
import { APITableCommon, makeClient } from '../common';
+import { AITableClient } from '../common/client';
import dayjs from 'dayjs';
import { newRecordTriggerOutputSchema } from '../output-schemas';
@@ -22,15 +23,25 @@ const polling: Polling<
const client = makeClient(
auth.props
);
- const records = await client.listRecords(datasheet_id as string, {
- filterByFormula: `CREATED_TIME() > ${
- lastFetchEpochMS === 0
- ? dayjs().subtract(1, 'day').valueOf()
- : lastFetchEpochMS
- }`,
+ const createdAfter =
+ lastFetchEpochMS === 0
+ ? dayjs().subtract(1, 'day').valueOf()
+ : lastFetchEpochMS;
+ const createdUpTo = await findWindowEnd({
+ client,
+ datasheetId: datasheet_id,
+ createdAfter,
+ createdUpTo: dayjs().valueOf(),
+ });
+ const records = await listRecordsCreatedBetween({
+ client,
+ datasheetId: datasheet_id,
+ createdAfter,
+ createdUpTo,
+ pageNum: 1,
});
- return records.data.records.map((record) => {
+ return records.map((record) => {
return {
epochMilliSeconds: record.createdAt,
data: record,
@@ -59,9 +70,9 @@ export const newRecordTrigger = createTrigger({
createdAt: 1689772153000,
updatedAt: 1689772153000,
fields: {
- Title: 'mhm',
- AmazingField: 'You are really looking at this?',
- 'Long text': 'veeeeeeeery long text',
+ Title: 'Quarterly report',
+ Status: 'In progress',
+ Notes: 'Draft shared with the team.',
},
},
type: TriggerStrategy.POLLING,
@@ -96,3 +107,135 @@ export const newRecordTrigger = createTrigger({
});
},
});
+
+async function findWindowEnd({
+ client,
+ datasheetId,
+ createdAfter,
+ createdUpTo,
+}: CreatedWindow & DatasheetTarget): Promise<number> {
+ const total = await countCreatedBetween({
+ client,
+ datasheetId,
+ createdAfter,
+ createdUpTo,
+ });
+ if (total <= MAX_RECORDS_PER_POLL) {
+ return createdUpTo;
+ }
+ return bisectWindowEnd({
+ client,
+ datasheetId,
+ createdAfter,
+ fitsUpTo: createdAfter,
+ fitsCount: 0,
+ overflowsAt: createdUpTo,
+ });
+}
+
+async function bisectWindowEnd({
+ client,
+ datasheetId,
+ createdAfter,
+ fitsUpTo,
+ fitsCount,
+ overflowsAt,
+}: DatasheetTarget & {
+ createdAfter: number;
+ fitsUpTo: number;
+ fitsCount: number;
+ overflowsAt: number;
+}): Promise<number> {
+ if (overflowsAt - fitsUpTo <= 1) {
+ return fitsCount > 0 ? fitsUpTo : overflowsAt;
+ }
+ const middle = fitsUpTo + Math.floor((overflowsAt - fitsUpTo) / 2);
+ const count = await countCreatedBetween({
+ client,
+ datasheetId,
+ createdAfter,
+ createdUpTo: middle,
+ });
+ if (count <= MAX_RECORDS_PER_POLL) {
+ return bisectWindowEnd({
+ client,
+ datasheetId,
+ createdAfter,
+ fitsUpTo: middle,
+ fitsCount: count,
+ overflowsAt,
+ });
+ }
+ return bisectWindowEnd({
+ client,
+ datasheetId,
+ createdAfter,
+ fitsUpTo,
+ fitsCount,
+ overflowsAt: middle,
+ });
+}
+
+async function countCreatedBetween({
+ client,
+ datasheetId,
+ createdAfter,
+ createdUpTo,
+}: CreatedWindow & DatasheetTarget): Promise<number> {
+ const probe = await client.listRecords(datasheetId, {
+ pageSize: '1',
+ filterByFormula: createdBetween({ createdAfter, createdUpTo }),
+ });
+ return probe.data.total;
+}
+
+async function listRecordsCreatedBetween({
+ client,
+ datasheetId,
+ createdAfter,
+ createdUpTo,
+ pageNum,
+}: CreatedWindow &
+ DatasheetTarget & {
+ pageNum: number;
+ }): Promise<ListedRecord[]> {
+ const page = await client.listRecords(datasheetId, {
+ pageSize: String(PAGE_SIZE),
+ pageNum: String(pageNum),
+ filterByFormula: createdBetween({ createdAfter, createdUpTo }),
+ });
+ const records = page.data.records;
+ const fetchedSoFar = (pageNum - 1) * PAGE_SIZE + records.length;
+ if (records.length === 0 || fetchedSoFar >= page.data.total) {
+ return records;
+ }
+ const nextPages = await listRecordsCreatedBetween({
+ client,
+ datasheetId,
+ createdAfter,
+ createdUpTo,
+ pageNum: pageNum + 1,
+ });
+ return [...records, ...nextPages];
+}
+
+function createdBetween({ createdAfter, createdUpTo }: CreatedWindow): string {
+ return `AND(CREATED_TIME() > ${createdAfter}, CREATED_TIME() <= ${createdUpTo})`;
+}
+
+const PAGE_SIZE = 1000;
+const MAX_RECORDS_PER_POLL = 5000;
+
+type CreatedWindow = {
+ createdAfter: number;
+ createdUpTo: number;
+};
+
+type DatasheetTarget = {
+ client: AITableClient;
+ datasheetId: string;
+};
+
+type ListedRecord = Awaited<
+ ReturnType<AITableClient['listRecords']>
+>['data']['records'][number];