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,44 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { scrapegraphaiAuth } from '../../index';
|
||||
|
||||
export const localScraper = createAction({
|
||||
name: 'local_scraper',
|
||||
displayName: 'Local Scraper',
|
||||
description: 'Extract content from HTML content using AI by providing a natural language prompt.',
|
||||
auth: scrapegraphaiAuth,
|
||||
props: {
|
||||
website_html: Property.LongText({
|
||||
displayName: 'HTML Content',
|
||||
description: 'The HTML content to process (max 2MB).',
|
||||
required: true,
|
||||
}),
|
||||
user_prompt: Property.LongText({
|
||||
displayName: 'Extraction Prompt',
|
||||
description: 'Describe what information you want to extract in natural language.',
|
||||
required: true,
|
||||
}),
|
||||
output_schema: Property.Json({
|
||||
displayName: 'Output Schema',
|
||||
description: 'Optional schema to structure the output data.',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run({ auth, propsValue }) {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.scrapegraphai.com/v1/localscraper',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'SGAI-APIKEY': auth.secret_text,
|
||||
},
|
||||
body: {
|
||||
website_html: propsValue.website_html,
|
||||
user_prompt: propsValue.user_prompt,
|
||||
output_schema: propsValue.output_schema,
|
||||
},
|
||||
});
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { scrapegraphaiAuth } from '../../index';
|
||||
|
||||
export const markdownify = createAction({
|
||||
name: 'markdownify',
|
||||
displayName: 'Convert to Markdown',
|
||||
description: 'Convert any webpage into clean, readable Markdown format.',
|
||||
auth: scrapegraphaiAuth,
|
||||
props: {
|
||||
website_url: Property.ShortText({
|
||||
displayName: 'Website URL',
|
||||
description: 'The webpage URL to convert to Markdown',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ auth, propsValue }) {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.scrapegraphai.com/v1/markdownify',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'SGAI-APIKEY': auth.secret_text,
|
||||
},
|
||||
body: {
|
||||
website_url: propsValue.website_url,
|
||||
},
|
||||
});
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { scrapegraphaiAuth } from '../../index';
|
||||
|
||||
export const smartScraper = createAction({
|
||||
name: 'smart_scraper',
|
||||
displayName: 'Smart Scraper',
|
||||
description: 'Extract content from a webpage using AI by providing a natural language prompt.',
|
||||
auth: scrapegraphaiAuth,
|
||||
props: {
|
||||
website_url: Property.ShortText({
|
||||
displayName: 'Website URL',
|
||||
description: 'The webpage URL to scrape.',
|
||||
required: true,
|
||||
}),
|
||||
user_prompt: Property.LongText({
|
||||
displayName: 'Extraction Prompt',
|
||||
description: 'Describe what information you want to extract in natural language.',
|
||||
required: true,
|
||||
}),
|
||||
output_schema: Property.Json({
|
||||
displayName: 'Output Schema',
|
||||
description: 'Optional schema to structure the output data.',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run({ auth, propsValue }) {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.scrapegraphai.com/v1/smartscraper',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'SGAI-APIKEY': auth.secret_text,
|
||||
},
|
||||
body: {
|
||||
website_url: propsValue.website_url,
|
||||
user_prompt: propsValue.user_prompt,
|
||||
output_schema: propsValue.output_schema,
|
||||
},
|
||||
});
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user