Skip to main content
Glama

mcp-google-sheets

stop-timer.ts1.09 kB
import { HttpMethod } from '@activepieces/pieces-common'; import { createAction } from '@activepieces/pieces-framework'; import { clockifyAuth } from '../../index'; import { clockifyApiCall } from '../common/client'; import { workspaceId } from '../common/props'; export const stopTimerAction = createAction({ auth: clockifyAuth, name: 'stop-timer', displayName: 'Stop Timer', description: 'Stops currently running timer on specified workspace.', props: { workspaceId: workspaceId({ displayName: 'Workspace', required: true, }), }, async run(context) { const { workspaceId } = context.propsValue; const currentUserResponse = await clockifyApiCall<{ id: string; email: string }>({ apiKey: context.auth, method: HttpMethod.GET, resourceUri: `/user`, }); const userId = currentUserResponse.id; const response = await clockifyApiCall({ apiKey: context.auth, method: HttpMethod.PATCH, resourceUri: `/workspaces/${workspaceId}/user/${userId}/time-entries`, body: { end: new Date().toISOString(), }, }); return response; }, });

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