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
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(twitter): ui improvement (#16050)
Talal Jabered35ca5e67a3
diff --git a/bun.lock b/bun.lockindex a58b66d9f67..cb10112b711 100644--- a/bun.lock+++ b/bun.lock@@ -9323,7 +9323,7 @@},"packages/pieces/community/twitter": {"name": "@activepieces/piece-twitter",- "version": "0.4.0",+ "version": "0.5.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/twitter/package.json b/packages/pieces/community/twitter/package.jsonindex 4253f3cd248..39408621f8e 100644--- a/packages/pieces/community/twitter/package.json+++ b/packages/pieces/community/twitter/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-twitter",- "version": "0.4.0",+ "version": "0.5.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","dependencies": {diff --git a/packages/pieces/community/twitter/src/i18n/de.json b/packages/pieces/community/twitter/src/i18n/de.jsonindex 3f3f76bd50f..7ae5122d06d 100644--- a/packages/pieces/community/twitter/src/i18n/de.json+++ b/packages/pieces/community/twitter/src/i18n/de.json@@ -20,5 +20,20 @@"Tweet ID": "Tweet-ID","The text of the tweet": "Der Text des Tweets","An image, video or GIF url or base64 to attach to the tweet": "Eine Bild-, Video-oder GIF-URL oder Base64, die an den Tweet angehängt werden soll",- "The ID of the tweet to reply too.": "Die ID des zu beantwortenden Tweets."+ "The ID of the tweet to reply too.": "Die ID des zu beantwortenden Tweets.",+ "Post tweets and replies on X, formerly Twitter.": "Tweets und Antworten auf X (ehemals Twitter) posten.",+ "API Key": "API-Schlüssel",+ "API Key Secret": "API-Schlüssel-Secret",+ "Found under Keys and tokens, next to API Key and Secret.": "Zu finden unter Keys and tokens, neben API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "Zu finden unter Keys and tokens, neben Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "Erstellen Sie zum Verbinden Schlüssel für Ihre App im X Developer Portal:\n\n1. Öffnen Sie das [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) und wählen Sie Ihre App aus. Sie muss zu einem Project gehören.\n2. Klicken Sie im Tab **Settings** unter **User authentication settings** auf **Set up**. Wählen Sie **Read and write** für App permissions und **Native App** für Type of App, geben Sie Ihre Website-URL ein und setzen Sie die Callback URI auf diese URL gefolgt von `/redirect`.\n3. Generieren Sie im Tab **Keys and tokens** **API Key and Secret** und **Access Token and Secret** neu und fügen Sie die vier Werte unten ein.\n\nFühren Sie Schritt 2 vor Schritt 3 aus: Ein zuvor erzeugter Access Token behält die alte Berechtigungsstufe.",+ "Post a new tweet from the connected X account.": "Einen neuen Tweet vom verbundenen X-Konto posten.",+ "Post a reply to an existing tweet.": "Eine Antwort auf einen bestehenden Tweet posten.",+ "Media 1": "Medien 1",+ "Media 2": "Medien 2",+ "Media 3": "Medien 3",+ "Up to 280 characters, or more with X Premium.": "Bis zu 280 Zeichen, mit X Premium mehr.",+ "An image, GIF or video. Add more images under Advanced.": "Ein Bild, GIF oder Video. Weitere Bilder unter Erweitert.",+ "Another image. GIFs and videos must be posted alone.": "Ein weiteres Bild. GIFs und Videos müssen allein gepostet werden.",+ "The number at the end of the tweet's link, after /status/.": "Die Zahl am Ende des Tweet-Links, nach /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/es.json b/packages/pieces/community/twitter/src/i18n/es.jsonindex 9fdc4fde05c..36b1aa81a93 100644--- a/packages/pieces/community/twitter/src/i18n/es.json+++ b/packages/pieces/community/twitter/src/i18n/es.json@@ -20,5 +20,20 @@"Tweet ID": "Tweet ID","The text of the tweet": "El texto del tweet","An image, video or GIF url or base64 to attach to the tweet": "Una imagen, video o url GIF o base64 para adjuntar al tweet",- "The ID of the tweet to reply too.": "El ID del tweet para responder también."+ "The ID of the tweet to reply too.": "El ID del tweet para responder también.",+ "Post tweets and replies on X, formerly Twitter.": "Publica tweets y respuestas en X, antes Twitter.",+ "API Key": "Clave API",+ "API Key Secret": "Secreto de la clave API",+ "Found under Keys and tokens, next to API Key and Secret.": "Está en Keys and tokens, junto a API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "Está en Keys and tokens, junto a Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "Para conectar, crea claves para tu app en el X Developer Portal:\n\n1. Abre el [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) y selecciona tu app. Debe pertenecer a un Project.\n2. En la pestaña **Settings**, en **User authentication settings**, haz clic en **Set up**. Elige **Read and write** en App permissions y **Native App** en Type of App, introduce la URL de tu sitio web y define la Callback URI como esa URL seguida de `/redirect`.\n3. En la pestaña **Keys and tokens**, regenera **API Key and Secret** y **Access Token and Secret**, y pega los cuatro valores abajo.\n\nHaz el paso 2 antes del paso 3: un Access Token generado antes conserva el nivel de permisos anterior.",+ "Post a new tweet from the connected X account.": "Publica un tweet nuevo desde la cuenta de X conectada.",+ "Post a reply to an existing tweet.": "Publica una respuesta a un tweet existente.",+ "Media 1": "Medio 1",+ "Media 2": "Medio 2",+ "Media 3": "Medio 3",+ "Up to 280 characters, or more with X Premium.": "Hasta 280 caracteres, o más con X Premium.",+ "An image, GIF or video. Add more images under Advanced.": "Una imagen, GIF o vídeo. Añade más imágenes en Avanzado.",+ "Another image. GIFs and videos must be posted alone.": "Otra imagen. Los GIF y vídeos deben publicarse solos.",+ "The number at the end of the tweet's link, after /status/.": "El número al final del enlace del tweet, después de /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/fr.json b/packages/pieces/community/twitter/src/i18n/fr.jsonindex c35b6cea466..3bcfb2d864a 100644--- a/packages/pieces/community/twitter/src/i18n/fr.json+++ b/packages/pieces/community/twitter/src/i18n/fr.json@@ -20,5 +20,20 @@"Tweet ID": "ID du Tweet","The text of the tweet": "Le texte du tweet","An image, video or GIF url or base64 to attach to the tweet": "Une image, une vidéo ou une URL GIF ou base64 à attacher au tweet",- "The ID of the tweet to reply too.": "L'ID du tweet à répondre aussi."+ "The ID of the tweet to reply too.": "L'ID du tweet à répondre aussi.",+ "Post tweets and replies on X, formerly Twitter.": "Publiez des tweets et des réponses sur X, anciennement Twitter.",+ "API Key": "Clé API",+ "API Key Secret": "Secret de la clé API",+ "Found under Keys and tokens, next to API Key and Secret.": "Disponible sous Keys and tokens, à côté de API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "Disponible sous Keys and tokens, à côté de Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "Pour vous connecter, créez des clés pour votre application dans le X Developer Portal :\n\n1. Ouvrez le [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) et sélectionnez votre application. Elle doit appartenir à un Project.\n2. Dans l'onglet **Settings**, sous **User authentication settings**, cliquez sur **Set up**. Choisissez **Read and write** pour App permissions et **Native App** pour Type of App, saisissez l'URL de votre site web, et définissez la Callback URI sur cette URL suivie de `/redirect`.\n3. Dans l'onglet **Keys and tokens**, régénérez **API Key and Secret** et **Access Token and Secret**, puis collez les quatre valeurs ci-dessous.\n\nFaites l'étape 2 avant l'étape 3 : un Access Token généré auparavant conserve l'ancien niveau d'autorisation.",+ "Post a new tweet from the connected X account.": "Publiez un nouveau tweet depuis le compte X connecté.",+ "Post a reply to an existing tweet.": "Publiez une réponse à un tweet existant.",+ "Media 1": "Média 1",+ "Media 2": "Média 2",+ "Media 3": "Média 3",+ "Up to 280 characters, or more with X Premium.": "Jusqu'à 280 caractères, ou plus avec X Premium.",+ "An image, GIF or video. Add more images under Advanced.": "Une image, un GIF ou une vidéo. Ajoutez d'autres images dans Avancé.",+ "Another image. GIFs and videos must be posted alone.": "Une autre image. Les GIF et vidéos doivent être publiés seuls.",+ "The number at the end of the tweet's link, after /status/.": "Le nombre à la fin du lien du tweet, après /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/ja.json b/packages/pieces/community/twitter/src/i18n/ja.jsonindex a92c0843763..b2bcc60ab1c 100644--- a/packages/pieces/community/twitter/src/i18n/ja.json+++ b/packages/pieces/community/twitter/src/i18n/ja.json@@ -20,5 +20,20 @@"Tweet ID": "ツイートID","The text of the tweet": "ツイートのテキスト","An image, video or GIF url or base64 to attach to the tweet": "ツイートに添付する画像、ビデオ、または GIF URL または base64",- "The ID of the tweet to reply too.": "あまりにも返信するツイートのID。"+ "The ID of the tweet to reply too.": "あまりにも返信するツイートのID。",+ "Post tweets and replies on X, formerly Twitter.": "X(旧Twitter)にツイートと返信を投稿します。",+ "API Key": "APIキー",+ "API Key Secret": "APIキーシークレット",+ "Found under Keys and tokens, next to API Key and Secret.": "Keys and tokens の API Key and Secret の横にあります。",+ "Found under Keys and tokens, next to Access Token and Secret.": "Keys and tokens の Access Token and Secret の横にあります。",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "接続するには、X Developer Portal でアプリのキーを作成します:\n\n1. [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) を開き、アプリを選択します。アプリは Project に属している必要があります。\n2. **Settings** タブの **User authentication settings** で **Set up** をクリックします。App permissions に **Read and write**、Type of App に **Native App** を選び、ウェブサイトの URL を入力して、Callback URI をその URL の末尾に `/redirect` を付けたものに設定します。\n3. **Keys and tokens** タブで **API Key and Secret** と **Access Token and Secret** を再生成し、4 つの値を下に貼り付けます。\n\n手順 3 の前に手順 2 を行ってください。先に生成した Access Token は以前の権限レベルのままです。",+ "Post a new tweet from the connected X account.": "接続した X アカウントから新しいツイートを投稿します。",+ "Post a reply to an existing tweet.": "既存のツイートに返信を投稿します。",+ "Media 1": "メディア 1",+ "Media 2": "メディア 2",+ "Media 3": "メディア 3",+ "Up to 280 characters, or more with X Premium.": "最大 280 文字。X Premium ではそれ以上。",+ "An image, GIF or video. Add more images under Advanced.": "画像、GIF、または動画。追加の画像は「高度な設定」へ。",+ "Another image. GIFs and videos must be posted alone.": "別の画像。GIF と動画は単独で投稿する必要があります。",+ "The number at the end of the tweet's link, after /status/.": "ツイートのリンク末尾、/status/ の後ろの数字。"}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/nl.json b/packages/pieces/community/twitter/src/i18n/nl.jsonindex 57574f473d2..fe0e65b7355 100644--- a/packages/pieces/community/twitter/src/i18n/nl.json+++ b/packages/pieces/community/twitter/src/i18n/nl.json@@ -20,5 +20,20 @@"Tweet ID": "Tweet ID","The text of the tweet": "De tekst van de tweet","An image, video or GIF url or base64 to attach to the tweet": "Een afbeelding, video of GIF url of base64 om aan de tweet toe te voegen",- "The ID of the tweet to reply too.": "De ID van de tweet om te beantwoorden."+ "The ID of the tweet to reply too.": "De ID van de tweet om te beantwoorden.",+ "Post tweets and replies on X, formerly Twitter.": "Plaats tweets en antwoorden op X, voorheen Twitter.",+ "API Key": "API-sleutel",+ "API Key Secret": "API-sleutelgeheim",+ "Found under Keys and tokens, next to API Key and Secret.": "Te vinden onder Keys and tokens, naast API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "Te vinden onder Keys and tokens, naast Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "Maak om te verbinden sleutels voor je app aan in het X Developer Portal:\n\n1. Open het [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) en selecteer je app. Die moet bij een Project horen.\n2. Klik op het tabblad **Settings**, onder **User authentication settings**, op **Set up**. Kies **Read and write** bij App permissions en **Native App** bij Type of App, vul de URL van je website in en stel de Callback URI in op die URL gevolgd door `/redirect`.\n3. Genereer op het tabblad **Keys and tokens** **API Key and Secret** en **Access Token and Secret** opnieuw en plak de vier waarden hieronder.\n\nDoe stap 2 vóór stap 3: een eerder gegenereerde Access Token behoudt het oude machtigingsniveau.",+ "Post a new tweet from the connected X account.": "Plaats een nieuwe tweet vanaf het gekoppelde X-account.",+ "Post a reply to an existing tweet.": "Plaats een antwoord op een bestaande tweet.",+ "Media 1": "Media 1",+ "Media 2": "Media 2",+ "Media 3": "Media 3",+ "Up to 280 characters, or more with X Premium.": "Tot 280 tekens, of meer met X Premium.",+ "An image, GIF or video. Add more images under Advanced.": "Een afbeelding, GIF of video. Meer afbeeldingen onder Geavanceerd.",+ "Another image. GIFs and videos must be posted alone.": "Nog een afbeelding. GIF's en video's moeten alleen worden geplaatst.",+ "The number at the end of the tweet's link, after /status/.": "Het getal aan het einde van de tweetlink, na /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/pt.json b/packages/pieces/community/twitter/src/i18n/pt.jsonindex 21930af166b..d81d54ad7f4 100644--- a/packages/pieces/community/twitter/src/i18n/pt.json+++ b/packages/pieces/community/twitter/src/i18n/pt.json@@ -20,5 +20,20 @@"Tweet ID": "ID do Tweet","The text of the tweet": "O texto do tweet","An image, video or GIF url or base64 to attach to the tweet": "Uma imagem, vídeo ou URL de GIF ou base64 para anexar ao tweet",- "The ID of the tweet to reply too.": "O ID do tweet para responder também."+ "The ID of the tweet to reply too.": "O ID do tweet para responder também.",+ "Post tweets and replies on X, formerly Twitter.": "Publique tweets e respostas no X, antigo Twitter.",+ "API Key": "Chave de API",+ "API Key Secret": "Segredo da chave de API",+ "Found under Keys and tokens, next to API Key and Secret.": "Fica em Keys and tokens, ao lado de API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "Fica em Keys and tokens, ao lado de Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "Para conectar, crie chaves para o seu app no X Developer Portal:\n\n1. Abra o [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) e selecione o seu app. Ele precisa pertencer a um Project.\n2. Na aba **Settings**, em **User authentication settings**, clique em **Set up**. Escolha **Read and write** em App permissions e **Native App** em Type of App, informe a URL do seu site e defina a Callback URI como essa URL seguida de `/redirect`.\n3. Na aba **Keys and tokens**, gere novamente **API Key and Secret** e **Access Token and Secret** e cole os quatro valores abaixo.\n\nFaça o passo 2 antes do passo 3: um Access Token gerado antes mantém o nível de permissão antigo.",+ "Post a new tweet from the connected X account.": "Publique um novo tweet a partir da conta X conectada.",+ "Post a reply to an existing tweet.": "Publique uma resposta a um tweet existente.",+ "Media 1": "Mídia 1",+ "Media 2": "Mídia 2",+ "Media 3": "Mídia 3",+ "Up to 280 characters, or more with X Premium.": "Até 280 caracteres, ou mais com o X Premium.",+ "An image, GIF or video. Add more images under Advanced.": "Uma imagem, GIF ou vídeo. Adicione mais imagens em Avançado.",+ "Another image. GIFs and videos must be posted alone.": "Outra imagem. GIFs e vídeos devem ser publicados sozinhos.",+ "The number at the end of the tweet's link, after /status/.": "O número no fim do link do tweet, depois de /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/ru.json b/packages/pieces/community/twitter/src/i18n/ru.jsonindex a0f354eb5c6..20f5dd082a8 100644--- a/packages/pieces/community/twitter/src/i18n/ru.json+++ b/packages/pieces/community/twitter/src/i18n/ru.json@@ -21,5 +21,20 @@"Tweet ID": "Tweet ID","The text of the tweet": "Текст твита","An image, video or GIF url or base64 to attach to the tweet": "Изображение, видео или GIF url или base64 для прикрепления к твиту",- "The ID of the tweet to reply too.": "ID твита для ответа тоже."+ "The ID of the tweet to reply too.": "ID твита для ответа тоже.",+ "Post tweets and replies on X, formerly Twitter.": "Публикуйте твиты и ответы в X (бывший Twitter).",+ "API Key": "API-ключ",+ "API Key Secret": "Секрет API-ключа",+ "Found under Keys and tokens, next to API Key and Secret.": "В разделе Keys and tokens, рядом с API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "В разделе Keys and tokens, рядом с Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "Чтобы подключиться, создайте ключи для своего приложения в X Developer Portal:\n\n1. Откройте [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) и выберите приложение. Оно должно входить в Project.\n2. На вкладке **Settings** в разделе **User authentication settings** нажмите **Set up**. Выберите **Read and write** для App permissions и **Native App** для Type of App, укажите URL своего сайта и задайте Callback URI как этот URL с `/redirect` на конце.\n3. На вкладке **Keys and tokens** перевыпустите **API Key and Secret** и **Access Token and Secret** и вставьте четыре значения ниже.\n\nВыполните шаг 2 до шага 3: Access Token, созданный раньше, сохраняет прежний уровень доступа.",+ "Post a new tweet from the connected X account.": "Опубликовать новый твит от подключённого аккаунта X.",+ "Post a reply to an existing tweet.": "Опубликовать ответ на существующий твит.",+ "Media 1": "Медиа 1",+ "Media 2": "Медиа 2",+ "Media 3": "Медиа 3",+ "Up to 280 characters, or more with X Premium.": "До 280 символов, с X Premium — больше.",+ "An image, GIF or video. Add more images under Advanced.": "Изображение, GIF или видео. Ещё изображения — в «Расширенные».",+ "Another image. GIFs and videos must be posted alone.": "Ещё одно изображение. GIF и видео публикуются только отдельно.",+ "The number at the end of the tweet's link, after /status/.": "Число в конце ссылки на твит, после /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/i18n/translation.json b/packages/pieces/community/twitter/src/i18n/translation.jsonindex 5437a3d1109..cebcc079746 100644--- a/packages/pieces/community/twitter/src/i18n/translation.json+++ b/packages/pieces/community/twitter/src/i18n/translation.json@@ -1,24 +1,25 @@{- "Social media platform with over 500 million user": "Social media platform with over 500 million user",- "Api Key": "Api Key",- "Api Key Secret": "Api Key Secret",+ "Post tweets and replies on X, formerly Twitter.": "Post tweets and replies on X, formerly Twitter.",+ "API Key": "API Key",+ "API Key Secret": "API Key Secret","Access Token": "Access Token","Access Token Secret": "Access Token Secret",- "The api key": "The api key",- "The api key secret": "The api key secret",- "The access token": "The access token",- "The access token secret": "The access token secret",- "\nIf you don't have the credentials down below, please follow these steps to obtain the required credentials:\n\n1. Go to [https://developer.twitter.com/en/portal/projects-and-apps](https://developer.twitter.com/en/portal/projects-and-apps) and click on your app settings.\n\n2. Under the **Settings** tab then under **User authentication settings** section, click \"Set up\".\n\n3. **This step must be completed before generating the keys**, check on **Read and write** for \"App permissions\" and **Native App** for \"Type": "\nIf you don't have the credentials down below, please follow these steps to obtain the required credentials:\n\n1. Go to [https://developer.twitter.com/en/portal/projects-and-apps](https://developer.twitter.com/en/portal/projects-and-apps) and click on your app settings.\n\n2. Under the **Settings** tab then under **User authentication settings** section, click \"Set up\".\n\n3. **This step must be completed before generating the keys**, check on **Read and write** for \"App permissions\" and **Native App** for \"Type of App\", fill in your website url and let the **Callback URI / Redirect URL** be **(your_website_url)/redirect** .\n\n4. Go back to your app settings page and click the **Keys and tokens** tab.\n\n5. Next to **API key and secret**, click \"Regenerate\" and copy the following values to the inputs below:\n\n **Api Key**\n\n **Api Key Secret**\n\n6. Next to **Access token and secret**, click \"Regenerate\" and copy the following values to the inputs below:\n\n **Access Token**\n\n **Access Token Secret**\n\n\n",+ "Found under Keys and tokens, next to API Key and Secret.": "Found under Keys and tokens, next to API Key and Secret.",+ "Found under Keys and tokens, next to Access Token and Secret.": "Found under Keys and tokens, next to Access Token and Secret.",+ "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key a": "To connect, create keys for your app in the X Developer Portal:\n\n1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.\n2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by `/redirect`.\n3. On the **Keys and tokens** tab, regenerate **API Key and Secret** and **Access Token and Secret**, and paste the four values below.\n\nDo step 2 before step 3: an Access Token generated earlier keeps the old permission level.","Create Tweet": "Create Tweet","Create Reply": "Create Reply",- "Create a tweet": "Create a tweet",- "Reply to a tweet.": "Reply to a tweet.",+ "Get Authenticated User": "Get Authenticated User",+ "Post a new tweet from the connected X account.": "Post a new tweet from the connected X account.",+ "Post a reply to an existing tweet.": "Post a reply to an existing tweet.",+ "Retrieve the X account the connection belongs to.": "Retrieve the X account the connection belongs to.","Text": "Text",- "Media (1)": "Media (1)",- "Media (2)": "Media (2)",- "Media (3)": "Media (3)",+ "Media 1": "Media 1",+ "Media 2": "Media 2",+ "Media 3": "Media 3","Tweet ID": "Tweet ID",- "The text of the tweet": "The text of the tweet",- "An image, video or GIF url or base64 to attach to the tweet": "An image, video or GIF url or base64 to attach to the tweet",- "The ID of the tweet to reply too.": "The ID of the tweet to reply too."+ "Up to 280 characters, or more with X Premium.": "Up to 280 characters, or more with X Premium.",+ "An image, GIF or video. Add more images under Advanced.": "An image, GIF or video. Add more images under Advanced.",+ "Another image. GIFs and videos must be posted alone.": "Another image. GIFs and videos must be posted alone.",+ "The number at the end of the tweet's link, after /status/.": "The number at the end of the tweet's link, after /status/."}\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/index.ts b/packages/pieces/community/twitter/src/index.tsindex 996169da065..a448f3cd5b2 100644--- a/packages/pieces/community/twitter/src/index.ts+++ b/packages/pieces/community/twitter/src/index.ts@@ -9,53 +9,37 @@ import { createTweet } from './lib/actions/create-tweet';import { createReply } from './lib/actions/create-reply';import { xGetAuthenticatedUser } from './lib/actions/x-get-authenticated-user';-const markdownDescription = `-If you don't have the credentials down below, please follow these steps to obtain the required credentials:+const markdownDescription = `To connect, create keys for your app in the X Developer Portal:-1. Go to [https://developer.twitter.com/en/portal/projects-and-apps](https://developer.twitter.com/en/portal/projects-and-apps) and click on your app settings.+1. Open the [X Developer Portal](https://developer.x.com/en/portal/projects-and-apps) and select your app. It must belong to a Project.+2. On the **Settings** tab, under **User authentication settings**, click **Set up**. Choose **Read and write** for App permissions and **Native App** for Type of App, enter your website URL, and set the Callback URI to that URL followed by \`/redirect\`.+3. On the **Keys and tokens** tab, regenerate **API Key and Secret** and **Access Token and Secret**, and paste the four values below.-2. Under the **Settings** tab then under **User authentication settings** section, click "Set up".--3. **This step must be completed before generating the keys**, check on **Read and write** for "App permissions" and **Native App** for "Type of App", fill in your website url and let the **Callback URI / Redirect URL** be **(your_website_url)/redirect** .--4. Go back to your app settings page and click the **Keys and tokens** tab.--5. Next to **API key and secret**, click "Regenerate" and copy the following values to the inputs below:-- **Api Key**-- **Api Key Secret**--6. Next to **Access token and secret**, click "Regenerate" and copy the following values to the inputs below:-- **Access Token**-- **Access Token Secret**---`;+Do step 2 before step 3: an Access Token generated earlier keeps the old permission level.`;export const twitterAuth = PieceAuth.CustomAuth({description: markdownDescription,props: {consumerKey: Property.ShortText({- displayName: 'Api Key',- description: 'The api key',+ displayName: 'API Key',+ description: 'Found under Keys and tokens, next to API Key and Secret.',required: true,}),consumerSecret: Property.ShortText({- displayName: 'Api Key Secret',- description: 'The api key secret',+ displayName: 'API Key Secret',+ description: 'Found under Keys and tokens, next to API Key and Secret.',required: true,}),accessToken: Property.ShortText({displayName: 'Access Token',- description: 'The access token',+ description:+ 'Found under Keys and tokens, next to Access Token and Secret.',required: true,}),accessTokenSecret: Property.ShortText({displayName: 'Access Token Secret',- description: 'The access token secret',+ description:+ 'Found under Keys and tokens, next to Access Token and Secret.',required: true,}),},@@ -84,7 +68,7 @@ export const twitterAuth = PieceAuth.CustomAuth({export const twitter = createPiece({displayName: 'Twitter',- description: 'Social media platform with over 500 million user',+ description: 'Post tweets and replies on X, formerly Twitter.',minimumSupportedRelease: '0.88.2',logoUrl: 'https://cdn.activepieces.com/pieces/twitter.png',categories: [PieceCategory.COMMUNICATION],diff --git a/packages/pieces/community/twitter/src/lib/actions/create-reply.ts b/packages/pieces/community/twitter/src/lib/actions/create-reply.tsindex 25c5692f251..f2099dea23b 100644--- a/packages/pieces/community/twitter/src/lib/actions/create-reply.ts+++ b/packages/pieces/community/twitter/src/lib/actions/create-reply.ts@@ -5,7 +5,7 @@ import {} from '@activepieces/pieces-framework';import { TwitterApi } from 'twitter-api-v2';import { twitterAuth } from '../..';-import { twitterCommon } from '../common';+import { twitterCommon, twitterHelpers } from '../common';import * as z from 'zod/mini'import { propsValidation } from '@activepieces/pieces-common';@@ -15,13 +15,14 @@ export const createReply = createAction({name: 'create-reply',classification: 'WRITE',displayName: 'Create Reply',- description: 'Reply to a tweet.',+ description: 'Post a reply to an existing tweet.',audience: 'both',aiMetadata: { description: 'Posts a reply to an existing tweet on X/Twitter, optionally attaching up to three images. Use this when responding to a specific tweet rather than creating a standalone post; requires the target tweet ID and non-empty reply text. Not idempotent — each call publishes a separate new reply.', idempotent: false },props: {tweet_id: Property.LongText({displayName: 'Tweet ID',- description: 'The ID of the tweet to reply too.',+ description: "The number at the end of the tweet's link, after /status/.",+ placeholder: '1712345678901234567',required: true,}),text: twitterCommon.text,@@ -53,7 +54,7 @@ export const createReply = createAction({media.forEach((m) => {uploadedMedia.push(userClient.v1.uploadMedia(Buffer.from(m.base64, 'base64'), {- mimeType: 'image/png',+ mimeType: twitterHelpers.mediaMimeType(m),target: 'tweet',}));@@ -69,13 +70,11 @@ export const createReply = createAction({}): await userClient.v2.reply(context.propsValue.text, context.propsValue.tweet_id);return response || { success: true };- } catch (error: any) {- throw new Error(- JSON.stringify({- code: error.code,- errors: error.errors,- })- );+ } catch (error) {+ throw twitterHelpers.buildError({+ error: twitterHelpers.asTwitterError(error),+ notFoundHint: 'the tweet you are replying to was not found or is not visible to this account.',+ });}},});\ No newline at end of filediff --git a/packages/pieces/community/twitter/src/lib/actions/create-tweet.ts b/packages/pieces/community/twitter/src/lib/actions/create-tweet.tsindex d8c10802355..dd7f2aaffbb 100644--- a/packages/pieces/community/twitter/src/lib/actions/create-tweet.ts+++ b/packages/pieces/community/twitter/src/lib/actions/create-tweet.ts@@ -4,10 +4,9 @@ import {} from '@activepieces/pieces-framework';import { TwitterApi } from 'twitter-api-v2';import { twitterAuth } from '../..';-import { twitterCommon } from '../common';+import { twitterCommon, twitterHelpers } from '../common';import * as z from 'zod/mini'import { propsValidation } from '@activepieces/pieces-common';-import mime from 'mime-types';export const createTweet = createAction({auth: twitterAuth,@@ -15,7 +14,7 @@ export const createTweet = createAction({name: 'create-tweet',classification: 'WRITE',displayName: 'Create Tweet',- description: 'Create a tweet',+ description: 'Post a new tweet from the connected X account.',audience: 'both',aiMetadata: { description: 'Posts a new tweet to the authenticated X/Twitter account, optionally attaching up to three images. Use this to publish a standalone post (not a reply). Tweet text is required and must be non-empty; this is not idempotent, so each call publishes a separate new tweet.', idempotent: false },props: {@@ -48,7 +47,7 @@ export const createTweet = createAction({media.forEach((m) => {uploadedMedia.push(userClient.v1.uploadMedia(Buffer.from(m.base64, 'base64'), {- mimeType: m.extension ?mime.lookup(m.extension)|| 'image/png':'image/png',+ mimeType: twitterHelpers.mediaMimeType(m),target: 'tweet',}));@@ -64,13 +63,11 @@ export const createTweet = createAction({}): await userClient.v2.tweet(context.propsValue.text);return response || { success: true };- } catch (error: any) {- throw new Error(- JSON.stringify({- code: error.code,- errors: error.errors,- })- );+ } catch (error) {+ throw twitterHelpers.buildError({+ error: twitterHelpers.asTwitterError(error),+ notFoundHint: 'the account or the attached media was not found.',+ });}},});diff --git a/packages/pieces/community/twitter/src/lib/common/index.ts b/packages/pieces/community/twitter/src/lib/common/index.tsindex bde6fd3f3c9..f24766f960b 100644--- a/packages/pieces/community/twitter/src/lib/common/index.ts+++ b/packages/pieces/community/twitter/src/lib/common/index.ts@@ -1,4 +1,6 @@-import { Property } from '@activepieces/pieces-framework';+import { ApFile, Property, isNil } from '@activepieces/pieces-framework';+import mime from 'mime-types';+import { EUploadMimeType } from 'twitter-api-v2';function describeStatus({code,@@ -29,6 +31,19 @@ function asTwitterError(value: unknown): TwitterErrorLike {return { message: String(value) };}+function mediaMimeType(file: ApFile): string {+ const detected = isNil(file.extension) ? false : mime.lookup(file.extension);+ const accepted: string[] = [+ EUploadMimeType.Jpeg,+ EUploadMimeType.Png,+ EUploadMimeType.Gif,+ EUploadMimeType.Webp,+ EUploadMimeType.Mp4,+ EUploadMimeType.Mov,+ ];+ return detected && accepted.includes(detected) ? detected : EUploadMimeType.Png;+}+function buildError({error,notFoundHint,@@ -53,34 +68,34 @@ function buildError({}export const twitterCommon = {- text: Property.LongText({- displayName: 'Text',- description: 'The text of the tweet',- required: true,- }),- image_1: Property.File({- displayName: 'Media (1)',- description:- 'An image, video or GIF url or base64 to attach to the tweet',- required: false,- }),- image_2: Property.File({- displayName: 'Media (2)',- description:- 'An image, video or GIF url or base64 to attach to the tweet',- required: false,- }),- image_3: Property.File({- displayName: 'Media (3)',- description:- 'An image, video or GIF url or base64 to attach to the tweet',- required: false,- }),- };+ text: Property.LongText({+ displayName: 'Text',+ description: 'Up to 280 characters, or more with X Premium.',+ required: true,+ }),+ image_1: Property.File({+ displayName: 'Media 1',+ description: 'An image, GIF or video. Add more images under Advanced.',+ required: false,+ }),+ image_2: Property.File({+ displayName: 'Media 2',+ description: 'Another image. GIFs and videos must be posted alone.',+ required: false,+ advanced: true,+ }),+ image_3: Property.File({+ displayName: 'Media 3',+ description: 'Another image. GIFs and videos must be posted alone.',+ required: false,+ advanced: true,+ }),+};export const twitterHelpers = {buildError,asTwitterError,+ mediaMimeType,};export const twitterFieldSets = {