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 { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { villageAuth, VILLAGE_API_BASE_URL } from '../../common/auth';
export const enrichPerson = createAction({
auth: villageAuth,
name: 'enrich_person',
classification: 'READ',
displayName: 'Enrich Person',
description:
'Get detailed profile information (name, headline, current company, location, photo, LinkedIn URL) for a person identified by LinkedIn URL or generic URL.',
audience: 'both',
aiMetadata: {
description:
'Read-only profile lookup for one person you can already identify by their LinkedIn URL (or a generic url to auto-detect; supply exactly one). Use when you have the URL and want their profile attributes; to find candidates by criteria use Search People, and to get someone\'s email use Enrich Person Email (Bulk). Pure query, safe to retry.',
idempotent: true,
},
props: {
linkedin_url: Property.ShortText({
displayName: 'LinkedIn URL',
description:
'LinkedIn profile URL, e.g. https://linkedin.com/in/johndoe (provide this OR url)',
required: false,
}),
url: Property.ShortText({
displayName: 'URL',
description: 'Generic URL — auto-detected (provide this OR linkedin_url)',
required: false,
}),
},
async run(context) {
const { linkedin_url, url } = context.propsValue;
if (!linkedin_url && !url) {
throw new Error('Provide one of: linkedin_url, url');
}
if (linkedin_url && url) {
throw new Error('Provide only one of: linkedin_url, url');
}
const identifier = linkedin_url ? { linkedin_url } : { url };
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: `${VILLAGE_API_BASE_URL}/v2/people/enrich`,
headers: { Authorization: `Bearer ${context.auth.secret_text}` },
body: identifier,
});
return response.body;
},
});