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 } from '@activepieces/pieces-framework';
import { mailjetTemplateLockOutputSchema } from './output-schemas';
import { mailjetAuth } from '../../../auth';
import { mailjetAiProps } from '../../../common/ai-props';
import { mailjetApi } from '../../../common/api';
export const mailjetLockTemplateContentAction = createAction({
auth: mailjetAuth,
name: 'mailjet_lock_template_content',
outputSchema: mailjetTemplateLockOutputSchema,
displayName: 'Lock Template Content',
description: 'Locks the content of a template against edits.',
audience: 'ai',
classification: 'WRITE',
aiMetadata: {
description: 'Locks the template content so it cannot be edited until unlocked.',
idempotent: true,
},
props: {
templateId: mailjetAiProps.id({
displayName: 'Template ID',
description: 'Numeric template ID, from List Templates or Create Template.',
}),
},
async run(context) {
const p = context.propsValue;
await mailjetApi.post({
auth: context.auth,
path: `/v1/REST/templates/${encodeURIComponent(p.templateId)}/contents/lock`,
body: {},
});
return { locked: true };
},
});