Files
smoothschedule/activepieces-fork/packages/pieces/community/moxie-crm/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

59 lines
1.9 KiB
TypeScript

import { createCustomApiCallAction } from '@activepieces/pieces-common';
import {
createPiece,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { moxieCreateClientAction } from './lib/actions/create-client';
import { moxieCreateProjectAction } from './lib/actions/create-project';
import { moxieCreateTaskAction } from './lib/actions/create-task';
import { moxieCRMTriggers } from './lib/triggers';
export const moxieCRMAuth = PieceAuth.CustomAuth({
required: true,
description: `
To obtain your Moxie CRM token, follow these steps:
1. Log in to your Moxie CRM account and click on **Workspace Settings** (Bottom left).
2. Click on **Connected Apps** and navigate to **Integrations** tab.
3. Now, under "Custom Integration", click on **Enable Custom Integration**.
4. Copy **API Key** and **Base URL** and click on Save button.
`,
props: {
apiKey: PieceAuth.SecretText({
displayName: 'API Key',
description: 'The API Key of the Moxie CRM account',
required: true,
}),
baseUrl: Property.ShortText({
displayName: 'Base URL',
description: 'The Base URL of the Moxie CRM account',
required: true,
}),
},
});
export const moxieCrm = createPiece({
displayName: 'Moxie',
description: 'CRM build for the freelancers.',
auth: moxieCRMAuth,
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/moxie-crm.png',
authors: ["kishanprmr","MoShizzle","abuaboud"],
categories: [PieceCategory.SALES_AND_CRM],
actions: [
moxieCreateClientAction,
moxieCreateTaskAction,
moxieCreateProjectAction,
createCustomApiCallAction({
baseUrl: (auth) => (auth?.props.baseUrl ?? ''),
auth: moxieCRMAuth,
authMapping: async (auth) => ({
'X-API-KEY': (auth.props.apiKey),
}),
}),
],
triggers: moxieCRMTriggers,
});