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
import { createAction, Property } from '@activepieces/pieces-framework';
import { zooAuth } from '../../auth'
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
export const getServiceAccountAction = createAction({
name: 'get_service_account',
classification: 'READ',
displayName: 'Get Service Account',
description: 'Retrieve details of a specific service account',
audience: 'both',
aiMetadata: { description: 'Look up one organization service account by its token and return its details. Use when you already have the token; to discover tokens first use the list service accounts action. Read-only and idempotent.', idempotent: true },
auth: zooAuth,
// category: 'Service Accounts',
props: {
token: Property.ShortText({
displayName: 'Token',
required: true,
description: 'Token of the service account to retrieve',
}),
},
async run({ auth, propsValue }) {
const response = await httpClient.sendRequest({
method: HttpMethod.GET,
url: `https://api.zoo.dev/org/service-accounts/${propsValue.token}`,
headers: {
Authorization: `Bearer ${auth.secret_text}`,
},
});
return response.body;
},
});