Skip to main content
Glama

mcp-google-sheets

create-file.ts1.02 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { encodings } from '../common/encodings'; export const createFile = createAction({ // auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication, name: 'createFile', displayName: 'Create file', description: 'Create file from content', props: { content: Property.LongText({ displayName: 'Content', required: true }), fileName: Property.ShortText({ displayName: 'File name', required: true }), encoding: Property.StaticDropdown({ displayName: 'Encoding', required: true, defaultValue: 'utf8', options: { options: encodings, }, }), }, async run({ propsValue, files }) { const encoding = propsValue.encoding as BufferEncoding ?? 'utf8'; const fileUrl = await files.write({ fileName: propsValue.fileName, data: Buffer.from(propsValue.content, encoding), }); return { fileName: propsValue.fileName, url: fileUrl }; }, });

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