Files
smoothschedule/activepieces-fork/packages/pieces/community/videoask/src/index.ts
poduck 3aa7199503 Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece
- Create integrations app with Activepieces service layer
- Add embed token endpoint for iframe integration
- Create Automations page with embedded workflow builder
- Add sidebar visibility fix for embed mode
- Add list inactive customers endpoint to Public API
- Include SmoothSchedule triggers: event created/updated/cancelled
- Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 22:59:37 -05:00

53 lines
1.9 KiB
TypeScript

import { createPiece } from "@activepieces/pieces-framework";
import { createContact } from "./lib/actions/create-contact";
import { videoaskAuth } from "./lib/common/auth";
import { createCustomApiCallAction, HttpMethod } from "@activepieces/pieces-common";
import { makeRequest } from "./lib/common/client";
import { PieceCategory } from "@activepieces/shared";
import { formContactMessage } from "./lib/triggers/form-contact-message";
import { formTranscribed } from "./lib/triggers/form-transcribed";
import { newFormResponse } from "./lib/triggers/new-form-response";
import { newFormAuthorResponse } from "./lib/triggers/new-form-author-response";
import { addTagToContact } from "./lib/actions/add-tag-to-contact";
import { removeTagFromContact } from "./lib/actions/remove-tag-from-contact";
import { searchForm } from "./lib/actions/search-form";
import { updateContact } from "./lib/actions/update-contact";
import { organizationIdDropdown } from "./lib/common/props";
export const videoask = createPiece({
displayName: "VideoAsk",
auth: videoaskAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: "https://cdn.activepieces.com/pieces/videoask.png",
authors: ['sanket-a11y'],
categories: [PieceCategory.FORMS_AND_SURVEYS],
actions: [
addTagToContact,
createContact,
removeTagFromContact,
searchForm,
updateContact,
createCustomApiCallAction({
auth: videoaskAuth,
baseUrl: () => "https://api.videoask.com",
authMapping: async (auth, propsValue) => {
return {
Authorization: `Bearer ${auth.access_token}`,
"Content-Type": "application/json",
"organization-id": propsValue['organizationId'],
};
},
extraProps: {
organizationId: organizationIdDropdown,
}
})
],
triggers: [
formContactMessage,
formTranscribed,
newFormResponse,
newFormAuthorResponse
],
});