Skip to main content
Glama

mcp-google-sheets

add-video-to-showcase.ts1.65 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { vimeoAuth } from '../auth'; import { apiRequest, userVideoDropdown } from '../common'; import { HttpMethod } from '@activepieces/pieces-common'; export const addVideoToShowcase = createAction({ name: 'add_video_to_showcase', displayName: 'Add Video to Showcase', description: 'Adds an existing video to a user\'s showcase', auth: vimeoAuth, props: { videoId: userVideoDropdown, showcaseId: Property.Dropdown({ displayName: 'Showcase ID', description: 'ID of the showcase to add the video to', required: true, refreshers: [], options: async ({ auth }) => { const response = await apiRequest({ auth, path: '/me/albums', method: HttpMethod.GET, queryParams: { per_page: '100', }, }); const showcases = response.body.data.map((folder: any) => ({ value: folder.uri.split('/').pop(), label: folder.name, })); return { options: showcases, }; }, }), }, async run({ auth, propsValue }) { const { videoId, showcaseId } = propsValue; // require a access token with `edit` scope const response = await apiRequest({ auth, path: `/me/albums/${showcaseId}/videos/${videoId}`, method: HttpMethod.PUT, }); if(response.status === 204){ return { success: true, message: `Video '${videoId}' added to showcase '${showcaseId}' successfully` }; } return { success: false, 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