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>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { gotifyAuth } from '../../';
|
||||
|
||||
export const sendNotification = createAction({
|
||||
auth: gotifyAuth,
|
||||
name: 'send_notification',
|
||||
displayName: 'Send Notification',
|
||||
description: 'Send a notification to gotify',
|
||||
props: {
|
||||
title: Property.ShortText({
|
||||
displayName: 'Title',
|
||||
description: 'The title of the notification',
|
||||
required: true,
|
||||
}),
|
||||
message: Property.LongText({
|
||||
displayName: 'Message',
|
||||
description: 'The message to send',
|
||||
required: true,
|
||||
}),
|
||||
priority: Property.Number({
|
||||
displayName: 'Priority',
|
||||
description:
|
||||
'The priority of the notification (0-10). 0 is lowest priority.',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run({ auth, propsValue }) {
|
||||
const baseUrl = auth.props.base_url.replace(/\/$/, '');
|
||||
const appToken = auth.props.app_token;
|
||||
|
||||
const title = propsValue.title;
|
||||
const message = propsValue.message;
|
||||
const priority = propsValue.priority;
|
||||
|
||||
return await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${baseUrl}/message?token=${appToken}`,
|
||||
body: {
|
||||
title,
|
||||
message,
|
||||
...(priority && { priority: +priority }),
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user