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

48 lines
1.8 KiB
TypeScript

import { PieceAuth, createPiece } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { createPhotoPost } from './lib/actions/create-photo-post';
import { createPost } from './lib/actions/create-post';
import { createVideoPost } from './lib/actions/create-video-post';
const markdown = `
To Obtain a Client ID and Client Secret:
1. Go to https://developers.facebook.com/
2. Register for a Facebook Developer account.
3. Once login, click "Make a new app" button.
4. Select "Other" for use cases.
5. Choose "Business" as the type of app.
6. Provide application details: custom name and associated email.
7. Once your application is created, you need to add a new "product".
8. Configure a new product of type "Facebook Login Settings".
9. Default settings should be fine, you only need to provide the Redirect URL in "Valid OAuth Redirect URIs" and your domain name in "Allowed Domains for the JavaScript SDK".
10. Finally, get your application ID and application secret from your app dashboard in Settings > Basic.
`;
export const facebookPagesAuth = PieceAuth.OAuth2({
description: markdown,
authUrl: 'https://graph.facebook.com/oauth/authorize',
tokenUrl: 'https://graph.facebook.com/oauth/access_token',
required: true,
scope: [
'pages_show_list',
'pages_manage_posts',
'business_management',
'pages_read_engagement',
],
});
export const facebookPages = createPiece({
displayName: 'Facebook Pages',
description: 'Manage your Facebook pages to grow your business',
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/facebook.png',
categories: [PieceCategory.MARKETING],
authors: ["kishanprmr","MoShizzle","khaledmashaly","abuaboud"],
auth: facebookPagesAuth,
actions: [createPost, createPhotoPost, createVideoPost],
triggers: [],
});