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 { AppConnectionValueForAuthProperty, createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { fountainAuth } from '../auth';
import { getAuthHeaders, getApiUrl } from '../common/auth';
import { PiecePropValueSchema } from '@activepieces/pieces-framework';
async function getApplicantsDropdown(auth: AppConnectionValueForAuthProperty<typeof fountainAuth>): Promise<{ label: string; value: string }[]> {
try {
const response = await httpClient.sendRequest({
method: HttpMethod.GET,
url: getApiUrl(auth, '/applicants'),
headers: getAuthHeaders(auth),
queryParams: { per_page: '50' },
});
const applicants = response.body?.applicants || [];
return applicants.map((applicant: any) => ({
label: `${applicant.name} (${applicant.email})`,
value: applicant.id,
}));
} catch (error) {
return [];
}
}
export const fountainGetApplicantDetails = createAction({
name: 'get_applicant_details',
auth: fountainAuth,
displayName: 'Get Applicant Details',
description: 'Get complete applicant information',
audience: 'both',
aiMetadata: { description: 'Retrieves the full record for a single applicant by their applicant ID. Use to look up a candidate\'s details, contact info, and current pipeline state. Read-only and idempotent.', idempotent: true },
props: {
id: Property.Dropdown({
displayName: 'Applicant',
description: 'The applicant to delete (shows 50 most recent applicants)',
required: true,
refreshers: [],
auth: fountainAuth,
options: async ({ auth }) => {
if (!auth) return { disabled: true, options: [], placeholder: 'Connect account first' };
return { disabled: false, options: await getApplicantsDropdown(auth as any) };
},
}),
},
async run(context) {
const applicantId = context.propsValue.id;
const response = await httpClient.sendRequest({
method: HttpMethod.GET,
url: getApiUrl(context.auth, `/applicants/${applicantId}`),
headers: getAuthHeaders(context.auth),
});
return response.body;
},
});