fluentcrm_create_campaign
Create email campaigns in FluentCRM by specifying title, subject, template, and recipient lists for targeted marketing communications.
Instructions
Tworzy nową kampanię email
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Tytuł kampanii | |
| subject | Yes | Temat emaila | |
| template_id | No | ID szablonu | |
| recipient_list | No | ID list |
Implementation Reference
- src/fluentcrm-mcp-server.ts:203-206 (handler)The main handler function in FluentCRMClient class that implements the tool logic by making a POST request to the '/campaigns' endpoint with the input data.async createCampaign(data: any) { const response = await this.apiClient.post('/campaigns', data); return response.data; }
- src/fluentcrm-mcp-server.ts:979-980 (handler)The MCP server request handler switch case that dispatches the tool call to the client.createCampaign method.case 'fluentcrm_create_campaign': return { content: [{ type: 'text', text: JSON.stringify(await client.createCampaign(args as any), null, 2) }] };
- src/fluentcrm-mcp-server.ts:697-709 (registration)Registers the tool in the MCP server's tools list, including name, description, and input schema.name: 'fluentcrm_create_campaign', description: 'Tworzy nową kampanię email', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Tytuł kampanii' }, subject: { type: 'string', description: 'Temat emaila' }, template_id: { type: 'number', description: 'ID szablonu' }, recipient_list: { type: 'array', items: { type: 'number' }, description: 'ID list' }, }, required: ['title', 'subject'], }, },
- src/fluentcrm-mcp-server.ts:699-707 (schema)Defines the input schema for validating tool arguments: requires title and subject, optional template_id and recipient_list.inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Tytuł kampanii' }, subject: { type: 'string', description: 'Temat emaila' }, template_id: { type: 'number', description: 'ID szablonu' }, recipient_list: { type: 'array', items: { type: 'number' }, description: 'ID list' }, }, required: ['title', 'subject'],
- src/fluentcrm-mcp-server.ts:478-482 (helper)Instantiates the FluentCRMClient instance used by all tool handlers, configured with API credentials.const client = new FluentCRMClient( FLUENTCRM_API_URL, FLUENTCRM_API_USERNAME, FLUENTCRM_API_PASSWORD );