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,6 @@
|
||||
{
|
||||
"A social news website": "Eine Social-News-Website",
|
||||
"Fetch Top Stories": "Top Geschichten abrufen",
|
||||
"Fetch top stories from hackernews": "Top-Geschichten von Hackernews abrufen",
|
||||
"Number of Stories": "Anzahl der Geschichten"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "Un sitio web de noticias sociales",
|
||||
"Fetch Top Stories": "Obtener Historias Principales",
|
||||
"Fetch top stories from hackernews": "Obtener historias destacadas de hackernews",
|
||||
"Number of Stories": "Número de historias"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "Un site d'actualités sociales",
|
||||
"Fetch Top Stories": "Récupérer les meilleures histoires",
|
||||
"Fetch top stories from hackernews": "Récupérer les meilleures histoires des hackernews",
|
||||
"Number of Stories": "Nombre d'histoires"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "ソーシャルニュースのウェブサイト",
|
||||
"Fetch Top Stories": "トップストーリーを取得",
|
||||
"Fetch top stories from hackernews": "ハッカーニュースからトップストーリーを取得",
|
||||
"Number of Stories": "ストーリー数"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "Een sociale nieuws website",
|
||||
"Fetch Top Stories": "Top verhalen ophalen",
|
||||
"Fetch top stories from hackernews": "Topverhalen van hackernews ophalen",
|
||||
"Number of Stories": "Aantal verhalen"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "Site de noticias sociais",
|
||||
"Fetch Top Stories": "Buscar as melhores histórias",
|
||||
"Fetch top stories from hackernews": "Buscar histórias mais recentes de hackernews",
|
||||
"Number of Stories": "Número de histórias"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Hacker News": "Новости хакера",
|
||||
"A social news website": "Новости соцсетей",
|
||||
"Fetch Top Stories": "Получить лучшие истории",
|
||||
"Fetch top stories from hackernews": "Получить топ историй из хакерентов",
|
||||
"Number of Stories": "Количество историй"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "A social news website",
|
||||
"Fetch Top Stories": "Fetch Top Stories",
|
||||
"Fetch top stories from hackernews": "Fetch top stories from hackernews",
|
||||
"Number of Stories": "Number of Stories"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Hacker News": "Hacker News",
|
||||
"A social news website": "A social news website",
|
||||
"Fetch Top Stories": "Fetch Top Stories",
|
||||
"Fetch top stories from hackernews": "Fetch top stories from hackernews",
|
||||
"Number of Stories": "Number of Stories"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"A social news website": "A social news website",
|
||||
"Fetch Top Stories": "Fetch Top Stories",
|
||||
"Fetch top stories from hackernews": "Fetch top stories from hackernews",
|
||||
"Number of Stories": "Number of Stories"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { PieceAuth, createPiece } from '@activepieces/pieces-framework';
|
||||
import { fetchTopStories } from './lib/actions/top-stories-in-hacker-news';
|
||||
|
||||
export const hackernews = createPiece({
|
||||
displayName: 'Hacker News',
|
||||
description: 'A social news website',
|
||||
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/hackernews.png',
|
||||
auth: PieceAuth.None(),
|
||||
categories: [],
|
||||
authors: ["kishanprmr","AbdulTheActivePiecer","khaledmashaly","abuaboud"],
|
||||
actions: [fetchTopStories],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const fetchTopStories = createAction({
|
||||
name: 'fetch_top_stories', // Must be a unique across the piece, this shouldn't be changed.
|
||||
displayName: 'Fetch Top Stories',
|
||||
description: 'Fetch top stories from hackernews',
|
||||
props: {
|
||||
// Properties to ask from the user, in this ask we will take number of
|
||||
number_of_stories: Property.Number({
|
||||
displayName: 'Number of Stories',
|
||||
description: undefined,
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(configValue) {
|
||||
const HACKER_NEWS_API_URL = 'https://hacker-news.firebaseio.com/v0/';
|
||||
const topStoryIdsResponse = await httpClient.sendRequest<string[]>({
|
||||
method: HttpMethod.GET,
|
||||
url: `${HACKER_NEWS_API_URL}topstories.json`,
|
||||
});
|
||||
const topStoryIds: string[] = topStoryIdsResponse.body;
|
||||
const topStories: Record<string, unknown>[] = [];
|
||||
for (
|
||||
let i = 0;
|
||||
i <
|
||||
Math.min(configValue.propsValue['number_of_stories'], topStoryIds.length);
|
||||
i++
|
||||
) {
|
||||
const storyId = topStoryIds[i];
|
||||
const storyResponse = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${HACKER_NEWS_API_URL}item/${storyId}.json`,
|
||||
});
|
||||
topStories.push(storyResponse.body);
|
||||
}
|
||||
return topStories;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user