Skip to main content
Glama

mcp-google-sheets

push-message.ts1.17 kB
import { Property, createAction } from '@activepieces/pieces-framework'; import { lineAuth2 } from '../..'; import { AuthenticationType, HttpMethod, httpClient, } from '@activepieces/pieces-common'; export const pushMessage = createAction({ name: 'push_message', // Must be a unique across the piece, this shouldn't be changed. auth: lineAuth2, displayName: 'Push Message', description: 'Push message to the line account', props: { userId: Property.ShortText({ displayName: 'User Id', description: 'The user id can be obtained from the webhook payload', required: true, }), text: Property.ShortText({ displayName: 'Text', required: true, }), }, async run(context) { return httpClient.sendRequest({ method: HttpMethod.POST, url: `https://api.line.me/v2/bot/message/push`, authentication: { type: AuthenticationType.BEARER_TOKEN, token: context.auth, }, body: { to: context.propsValue.userId, messages: [ { type: 'text', text: context.propsValue.text, }, ], }, }); }, });

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