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 { PieceAuth, Property } from '@activepieces/pieces-framework';
import { knackApiCall } from './client';
import { HttpMethod } from '@activepieces/pieces-common';
import { AppConnectionType } from '@activepieces/pieces-framework';
export const knackAuth = PieceAuth.CustomAuth({
props: {
apiKey: PieceAuth.SecretText({
displayName: 'API Key',
description: 'Your Knack API Key available in the Settings section of the Builder.',
required: true,
}),
applicationId: Property.ShortText({
displayName: 'Application ID',
description: 'Your Application ID available in the Settings section of the Builder.',
required: true,
}),
},
validate: async ({ auth }) => {
try {
await knackApiCall({
method: HttpMethod.GET,
auth: {
type: AppConnectionType.CUSTOM_AUTH,
props: auth,
},
resourceUri: '/objects',
});
return { valid: true };
} catch (e) {
return {
valid: false,
error: 'Invalid API Key or Application ID',
};
}
},
required: true,
});