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(pieces): see which account each connection belongs to on 7 more pieces (#16897)
Kishan Parmarfddbfcce8650
diff --git a/bun.lock b/bun.lockindex 8cb8eaf02c2..e85faa0140d 100644--- a/bun.lock+++ b/bun.lock@@ -2070,7 +2070,7 @@},"packages/pieces/community/cloudconvert": {"name": "@activepieces/piece-cloudconvert",- "version": "0.2.1",+ "version": "0.3.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -3745,7 +3745,7 @@},"packages/pieces/community/gitea": {"name": "@activepieces/piece-gitea",- "version": "0.1.2",+ "version": "0.2.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -6438,7 +6438,7 @@},"packages/pieces/community/netlify": {"name": "@activepieces/piece-netlify",- "version": "0.2.1",+ "version": "0.2.2","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -7732,7 +7732,7 @@},"packages/pieces/community/raindrop": {"name": "@activepieces/piece-raindrop",- "version": "0.1.2",+ "version": "0.1.3","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -8856,7 +8856,7 @@},"packages/pieces/community/square": {"name": "@activepieces/piece-square",- "version": "1.0.1",+ "version": "1.0.2","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -9429,7 +9429,7 @@},"packages/pieces/community/truelayer": {"name": "@activepieces/piece-truelayer",- "version": "0.2.1",+ "version": "0.2.2","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -9932,7 +9932,7 @@},"packages/pieces/community/webex": {"name": "@activepieces/piece-webex",- "version": "0.1.1",+ "version": "0.1.2","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/cloudconvert/package.json b/packages/pieces/community/cloudconvert/package.jsonindex 4a3c457e93e..9d17661d2d7 100644--- a/packages/pieces/community/cloudconvert/package.json+++ b/packages/pieces/community/cloudconvert/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-cloudconvert",- "version": "0.2.1",+ "version": "0.3.0","type": "commonjs","main": "./dist/src/index.js","types": "./dist/src/index.d.ts",diff --git a/packages/pieces/community/cloudconvert/src/lib/common/auth.ts b/packages/pieces/community/cloudconvert/src/lib/common/auth.tsindex 5ee519548a7..21462f34fde 100644--- a/packages/pieces/community/cloudconvert/src/lib/common/auth.ts+++ b/packages/pieces/community/cloudconvert/src/lib/common/auth.ts@@ -1,5 +1,6 @@import { OAuth2GrantType } from '@activepieces/pieces-framework';import { PieceAuth, Property } from '@activepieces/pieces-framework';+import { httpClient, HttpMethod } from '@activepieces/pieces-common';export const cloudconvertAuth = PieceAuth.OAuth2({description: 'Connect your CloudConvert account using OAuth2',@@ -7,7 +8,7 @@ export const cloudconvertAuth = PieceAuth.OAuth2({tokenUrl: 'https://cloudconvert.com/oauth/token',required: true,grantType: OAuth2GrantType.AUTHORIZATION_CODE,- scope: ['task.read', 'task.write'],+ scope: ['task.read', 'task.write', 'user.read'],props: {region: Property.StaticDropdown({displayName: 'Region',@@ -22,5 +23,20 @@ export const cloudconvertAuth = PieceAuth.OAuth2({},defaultValue: 'auto'})- }+ },+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const response = await httpClient.sendRequest<CloudConvertUser>({+ method: HttpMethod.GET,+ url: 'https://api.cloudconvert.com/v2/users/me',+ headers: { Authorization: `Bearer ${auth.access_token}` },+ timeout: 5000,+ });+ return response.body?.data?.email || response.body?.data?.username || undefined;+ } catch {+ return undefined;+ }+ },});++type CloudConvertUser = { data?: { email?: string; username?: string } };diff --git a/packages/pieces/community/gitea/package.json b/packages/pieces/community/gitea/package.jsonindex f2bf70f74d9..1762f22aea5 100644--- a/packages/pieces/community/gitea/package.json+++ b/packages/pieces/community/gitea/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-gitea",- "version": "0.1.2",+ "version": "0.2.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/gitea/src/lib/auth.ts b/packages/pieces/community/gitea/src/lib/auth.tsindex 8a5785de553..b242b829240 100644--- a/packages/pieces/community/gitea/src/lib/auth.ts+++ b/packages/pieces/community/gitea/src/lib/auth.ts@@ -1,4 +1,5 @@import { PieceAuth, Property } from '@activepieces/pieces-framework';+import { httpClient, HttpMethod } from '@activepieces/pieces-common';export const giteaAuth = PieceAuth.OAuth2({description: 'To connect Gitea, create an OAuth2 application in your Gitea instance: **Settings → Applications → Manage OAuth2 Applications → Create Application**. Set the redirect URI to the one provided by Activepieces, then copy the Client ID and Client Secret here.',@@ -13,5 +14,21 @@ export const giteaAuth = PieceAuth.OAuth2({authUrl: '{baseUrl}/login/oauth/authorize',tokenUrl: '{baseUrl}/login/oauth/access_token',required: true,- scope: ['read:repository', 'write:repository', 'read:issue', 'write:issue'],+ scope: ['read:repository', 'write:repository', 'read:issue', 'write:issue', 'read:user'],+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const instanceUrl = auth.props?.['baseUrl'] || 'https://gitea.com';+ const response = await httpClient.sendRequest<GiteaUser>({+ method: HttpMethod.GET,+ url: `${instanceUrl.replace(/\/$/, '')}/api/v1/user`,+ headers: { Authorization: `Bearer ${auth.access_token}` },+ timeout: 5000,+ });+ return response.body?.email || response.body?.login || undefined;+ } catch {+ return undefined;+ }+ },});++type GiteaUser = { email?: string; login?: string };diff --git a/packages/pieces/community/netlify/package.json b/packages/pieces/community/netlify/package.jsonindex dc9c816319f..67e8d4d28a0 100644--- a/packages/pieces/community/netlify/package.json+++ b/packages/pieces/community/netlify/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-netlify",- "version": "0.2.1",+ "version": "0.2.2","type": "commonjs","main": "./dist/src/index.js","types": "./dist/src/index.d.ts",diff --git a/packages/pieces/community/netlify/src/lib/common/auth.ts b/packages/pieces/community/netlify/src/lib/common/auth.tsindex af8d9901671..31fb85eb0b4 100644--- a/packages/pieces/community/netlify/src/lib/common/auth.ts+++ b/packages/pieces/community/netlify/src/lib/common/auth.ts@@ -1,4 +1,6 @@import { PieceAuth } from "@activepieces/pieces-framework";+import { HttpMethod } from "@activepieces/pieces-common";+import { netlifyClient } from "./client";export const netlifyAuth = PieceAuth.OAuth2({description: `@@ -17,4 +19,19 @@ To authenticate with Netlify:tokenUrl: "https://api.netlify.com/oauth/token",required: true,scope: [],+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const response = await netlifyClient.request<NetlifyUser>({+ auth,+ method: HttpMethod.GET,+ path: '/user',+ timeout: 5000,+ });+ return response.body?.email || response.body?.full_name || undefined;+ } catch {+ return undefined;+ }+ },});++type NetlifyUser = { email?: string; full_name?: string };diff --git a/packages/pieces/community/netlify/src/lib/common/client.ts b/packages/pieces/community/netlify/src/lib/common/client.tsindex 0b449c97cc2..c131c0822b6 100644--- a/packages/pieces/community/netlify/src/lib/common/client.ts+++ b/packages/pieces/community/netlify/src/lib/common/client.ts@@ -108,6 +108,7 @@ async function request<T = unknown>({body,redactBody,extraHeaders,+ timeout,}: {auth: NetlifyAuthValue;method: HttpMethod;@@ -116,6 +117,7 @@ async function request<T = unknown>({body?: Record<string, unknown> | Record<string, unknown>[];redactBody?: boolean;extraHeaders?: Record<string, string>;+ timeout?: number;}): Promise<{ status: number; body: T }> {const hasBody = body !== undefined && method !== HttpMethod.GET && method !== HttpMethod.DELETE;const headers: Record<string, string> = {@@ -132,7 +134,7 @@ async function request<T = unknown>({headers,queryParams: buildQuery(query),body: hasBody ? body : undefined,- timeout: REQUEST_TIMEOUT_MS,+ timeout: timeout ?? REQUEST_TIMEOUT_MS,followRedirects: false,redactBodyInErrors: redactBody === true,}, { dispatcher });diff --git a/packages/pieces/community/raindrop/package.json b/packages/pieces/community/raindrop/package.jsonindex 34c6412241f..ba1625dc7bf 100644--- a/packages/pieces/community/raindrop/package.json+++ b/packages/pieces/community/raindrop/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-raindrop",- "version": "0.1.2",+ "version": "0.1.3","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/raindrop/src/lib/auth.ts b/packages/pieces/community/raindrop/src/lib/auth.tsindex 29530b22d2e..8a7c1baa693 100644--- a/packages/pieces/community/raindrop/src/lib/auth.ts+++ b/packages/pieces/community/raindrop/src/lib/auth.ts@@ -1,4 +1,5 @@import { PieceAuth } from '@activepieces/pieces-framework';+import { httpClient, HttpMethod } from '@activepieces/pieces-common';export const raindropAuth = PieceAuth.OAuth2({required: true,@@ -6,4 +7,19 @@ export const raindropAuth = PieceAuth.OAuth2({tokenUrl: 'https://raindrop.io/oauth/access_token',scope: [],extra: {},+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const response = await httpClient.sendRequest<RaindropUser>({+ method: HttpMethod.GET,+ url: 'https://api.raindrop.io/rest/v1/user',+ headers: { Authorization: `Bearer ${auth.access_token}` },+ timeout: 5000,+ });+ return response.body?.user?.email || response.body?.user?.fullName || undefined;+ } catch {+ return undefined;+ }+ },});++type RaindropUser = { user?: { email?: string; fullName?: string } };diff --git a/packages/pieces/community/square/package.json b/packages/pieces/community/square/package.jsonindex 6f8fb1fc09a..ca745bcfbfa 100644--- a/packages/pieces/community/square/package.json+++ b/packages/pieces/community/square/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-square",- "version": "1.0.1",+ "version": "1.0.2","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/square/src/lib/auth.ts b/packages/pieces/community/square/src/lib/auth.tsindex 83874b421a8..2f9cfc0b4a0 100644--- a/packages/pieces/community/square/src/lib/auth.ts+++ b/packages/pieces/community/square/src/lib/auth.ts@@ -1,4 +1,6 @@import { PieceAuth } from '@activepieces/pieces-framework';+import { httpClient, HttpMethod } from '@activepieces/pieces-common';+import { squareClient } from './common/client';export const SQUARE_SCOPES = ['MERCHANT_PROFILE_READ',@@ -22,4 +24,23 @@ export const squareAuth = PieceAuth.OAuth2({tokenUrl: 'https://connect.squareup.com/oauth2/token',required: true,scope: SQUARE_SCOPES,+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const merchantId = auth.data['merchant_id'] || 'me';+ const response = await httpClient.sendRequest<SquareMerchant>({+ method: HttpMethod.GET,+ url: `${squareClient.BASE_URL}/v2/merchants/${encodeURIComponent(merchantId)}`,+ headers: {+ Authorization: `Bearer ${auth.access_token}`,+ 'Square-Version': squareClient.SQUARE_VERSION,+ },+ timeout: 5000,+ });+ return response.body?.merchant?.business_name || undefined;+ } catch {+ return undefined;+ }+ },});++type SquareMerchant = { merchant?: { business_name?: string } };diff --git a/packages/pieces/community/truelayer/package.json b/packages/pieces/community/truelayer/package.jsonindex 7587b605c7f..32d73af2af8 100644--- a/packages/pieces/community/truelayer/package.json+++ b/packages/pieces/community/truelayer/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-truelayer",- "version": "0.2.1",+ "version": "0.2.2","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/truelayer/src/lib/common/index.ts b/packages/pieces/community/truelayer/src/lib/common/index.tsindex 1796f2d600c..a8d651d86b8 100644--- a/packages/pieces/community/truelayer/src/lib/common/index.ts+++ b/packages/pieces/community/truelayer/src/lib/common/index.ts@@ -1,4 +1,5 @@import { PieceAuth } from '@activepieces/pieces-framework';+import { httpClient, HttpMethod } from '@activepieces/pieces-common';export const trueLayerCommon = {baseUrl: 'https://api.truelayer.com',@@ -19,5 +20,20 @@ export const trueLayerCommon = {'signupplus','verification'],+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const response = await httpClient.sendRequest<TrueLayerInfo>({+ method: HttpMethod.GET,+ url: 'https://api.truelayer.com/data/v1/info',+ headers: { Authorization: `Bearer ${auth.access_token}` },+ timeout: 5000,+ });+ return response.body?.results?.[0]?.full_name || undefined;+ } catch {+ return undefined;+ }+ },})-};\ No newline at end of file+};++type TrueLayerInfo = { results?: { full_name?: string }[] };\ No newline at end of filediff --git a/packages/pieces/community/webex/package.json b/packages/pieces/community/webex/package.jsonindex 3086621486b..b74fbd68f91 100644--- a/packages/pieces/community/webex/package.json+++ b/packages/pieces/community/webex/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-webex",- "version": "0.1.1",+ "version": "0.1.2","type": "commonjs","main": "./dist/src/index.js","types": "./dist/src/index.d.ts",diff --git a/packages/pieces/community/webex/src/lib/common/auth.ts b/packages/pieces/community/webex/src/lib/common/auth.tsindex 500ed3790a3..ff803fe3b0a 100644--- a/packages/pieces/community/webex/src/lib/common/auth.ts+++ b/packages/pieces/community/webex/src/lib/common/auth.ts@@ -1,4 +1,6 @@import { PieceAuth } from '@activepieces/pieces-framework';+import { httpClient, HttpMethod } from '@activepieces/pieces-common';+import { BASE_URL } from './client';export const webexAuth = PieceAuth.OAuth2({description: 'Connect your Webex account',@@ -6,4 +8,19 @@ export const webexAuth = PieceAuth.OAuth2({tokenUrl: 'https://webexapis.com/v1/access_token',required: true,scope: ['spark:all', 'meeting:schedules_read'],+ getConnectionIdentifier: async ({ auth }) => {+ try {+ const response = await httpClient.sendRequest<WebexPerson>({+ method: HttpMethod.GET,+ url: `${BASE_URL}/people/me`,+ headers: { Authorization: `Bearer ${auth.access_token}` },+ timeout: 5000,+ });+ return response.body?.emails?.[0] || response.body?.displayName || undefined;+ } catch {+ return undefined;+ }+ },});++type WebexPerson = { emails?: string[]; displayName?: string };