Skip to main content
Glama

mcp-google-sheets

delete-campaign.ts1.5 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { httpClient, HttpMethod } from '@activepieces/pieces-common'; import { kallabotAuth } from '../..'; export const deleteCampaignAction = createAction({ name: 'delete-campaign', displayName: 'Delete Campaign', description: 'Delete a campaign with optional contact list deletion.', auth: kallabotAuth, props: { campaign_id: Property.ShortText({ displayName: 'Campaign ID', description: 'The ID of the campaign to delete.', required: true }), delete_contact_list: Property.Checkbox({ displayName: 'Delete Contact List', description: 'Also delete the associated contact list (optional).', required: false, defaultValue: false }) }, async run(context) { const params = new URLSearchParams(); if (context.propsValue.delete_contact_list) { params.append('delete_contact_list', 'true'); } const url = `https://api.kallabot.com/campaign/${context.propsValue.campaign_id}${params.toString() ? '?' + params.toString() : ''}`; const response = await httpClient.sendRequest({ method: HttpMethod.DELETE, url: url, headers: { 'Authorization': `Bearer ${context.auth}`, 'Content-Type': 'application/json' } }); return response.body; } });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server