Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(rss): add AI actions and output schemas (#16202)

Kishan Parmar3d3f797047fd
diff --git a/packages/pieces/community/rss/.babelrc b/packages/pieces/community/rss/.babelrc
deleted file mode 100644
index fc2ad0f36c4..00000000000
--- a/packages/pieces/community/rss/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": [["@nx/js/babel", { "useBuiltIns": "usage" }]]
-}
diff --git a/packages/pieces/community/rss/package.json b/packages/pieces/community/rss/package.json
index fa65d8495e2..34a3aaa1efa 100644
--- a/packages/pieces/community/rss/package.json
+++ b/packages/pieces/community/rss/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-rss",
- "version": "0.6.0",
+ "version": "0.7.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"dependencies": {
diff --git a/packages/pieces/community/rss/src/index.ts b/packages/pieces/community/rss/src/index.ts
index beb689d2cff..efb32059172 100644
--- a/packages/pieces/community/rss/src/index.ts
+++ b/packages/pieces/community/rss/src/index.ts
@@ -1,18 +1,17 @@
import { PieceAuth, createPiece } from '@activepieces/pieces-framework';
-import { rssNewItemTrigger } from './lib/triggers/new-item-trigger';
+
+import { rssAiActions } from './lib/actions/ai';
import { rssNewItemListTrigger } from './lib/triggers/new-item-list-triggers';
+import { rssNewItemTrigger } from './lib/triggers/new-item-trigger';
export const rssFeed = createPiece({
- displayName: 'RSS Feed',
- description: 'Stay updated with RSS feeds',
- authors: ["Abdallah-Alwarawreh","kishanprmr","khaledmashaly","abuaboud", "Kevinyu-alan"],
- minimumSupportedRelease: '0.30.0',
- logoUrl: 'https://cdn.activepieces.com/pieces/rss.png',
- categories: [],
- auth: PieceAuth.None(),
- actions: [],
- triggers: [
- rssNewItemTrigger,
- rssNewItemListTrigger
- ],
+ displayName: 'RSS Feed',
+ description: 'Stay updated with RSS feeds',
+ authors: ['Abdallah-Alwarawreh', 'kishanprmr', 'khaledmashaly', 'abuaboud', 'Kevinyu-alan'],
+ minimumSupportedRelease: '0.88.2',
+ logoUrl: 'https://cdn.activepieces.com/pieces/rss.png',
+ categories: [],
+ auth: PieceAuth.None(),
+ actions: [...rssAiActions],
+ triggers: [rssNewItemTrigger, rssNewItemListTrigger],
});
diff --git a/packages/pieces/community/rss/src/lib/actions/ai/find-site-feeds.ts b/packages/pieces/community/rss/src/lib/actions/ai/find-site-feeds.ts
new file mode 100644
index 00000000000..f045502a6be
--- /dev/null
+++ b/packages/pieces/community/rss/src/lib/actions/ai/find-site-feeds.ts
@@ -0,0 +1,139 @@
+import { createAction, PieceAuth, Property, tryCatch } from '@activepieces/pieces-framework';
+
+import { rssFeedClient } from '../../common/feed-client';
+import { rssFindSiteFeedsOutputSchema } from '../../output-schemas';
+
+export const rssFindSiteFeedsAction = createAction({
+ auth: PieceAuth.None(),
+ name: 'rss_find_site_feeds',
+ outputSchema: rssFindSiteFeedsOutputSchema,
+ displayName: 'Find Site Feeds',
+ description: 'Finds the RSS and Atom feeds a website publishes.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Loads a web page (a homepage, blog or article URL) and returns the RSS, RDF and Atom feed URLs it advertises in its <link rel="alternate"> tags; if the URL is itself a feed, returns that feed. Use it to get the feed URL that RSS: Read Feed and RSS: Read Multiple Feeds need. Sites that publish a feed without advertising it in the page are not found.',
+ idempotent: true,
+ },
+ props: {
+ site_url: Property.ShortText({
+ displayName: 'Website URL',
+ description: 'A page on the site, such as its homepage or a blog post.',
+ placeholder: 'https://example.com',
+ required: true,
+ }),
+ },
+ async run({ propsValue }) {
+ const url = propsValue.site_url.trim();
+ const page = await rssFeedClient.fetchPage({ url });
+
+ if (!page.contentType.includes('html')) {
+ const { data } = await tryCatch(() => rssFeedClient.parseFeed({ body: page.body, url }));
+ if (data) {
+ const feeds = [
+ { url: data.feed.feed_url, title: data.feed.title, format: data.feed.format },
+ ];
+ return { feeds, count: feeds.length };
+ }
+ }
+
+ const feeds = findAdvertisedFeeds({ html: page.body, baseUrl: url });
+ return { feeds, count: feeds.length };
+ },
+});
+
+function findAdvertisedFeeds({
+ html,
+ baseUrl,
+}: {
+ html: string;
+ baseUrl: string;
+}): AdvertisedFeed[] {
+ const page = html.replace(NON_MARKUP, '');
+ const baseHref = parseAttributes({ tag: page.match(BASE_TAG)?.[0] ?? '' })['href'];
+ const documentBase = (baseHref && resolveUrl({ href: baseHref, baseUrl })) || baseUrl;
+ const feeds = (page.match(LINK_TAG) ?? [])
+ .map((tag) => parseAttributes({ tag }))
+ .filter(
+ (attrs) =>
+ (attrs['rel'] ?? '').toLowerCase().split(/\s+/).includes('alternate') &&
+ FEED_FORMATS[(attrs['type'] ?? '').toLowerCase()] !== undefined &&
+ Boolean(attrs['href']),
+ )
+ .flatMap((attrs) => {
+ const resolved = resolveUrl({ href: attrs['href'] ?? '', baseUrl: documentBase });
+ return resolved
+ ? [
+ {
+ url: resolved,
+ title: attrs['title'] || null,
+ format: FEED_FORMATS[(attrs['type'] ?? '').toLowerCase()] ?? null,
+ },
+ ]
+ : [];
+ });
+ return feeds.filter((feed, index) => feeds.findIndex((f) => f.url === feed.url) === index);
+}
+
+function parseAttributes({ tag }: { tag: string }): Record<string, string> {
+ return Object.fromEntries(
+ [...tag.matchAll(/([a-zA-Z:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+))/g)].map((match) => [
+ match[1].toLowerCase(),
+ decodeEntities({ text: match[2] ?? match[3] ?? match[4] ?? '' }),
+ ]),
+ );
+}
+
+function decodeEntities({ text }: { text: string }): string {
+ return text.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (entity, name: string) => {
+ if (name.startsWith('#')) {
+ const isHex = name[1] === 'x' || name[1] === 'X';
+ const codePoint = Number.parseInt(name.slice(isHex ? 2 : 1), isHex ? 16 : 10);
+ return codePoint > 0 && codePoint <= 0x10ffff ? String.fromCodePoint(codePoint) : entity;
+ }
+ return NAMED_ENTITIES[name.toLowerCase()] ?? entity;
+ });
+}
+
+function resolveUrl({ href, baseUrl }: { href: string; baseUrl: string }): string | null {
+ try {
+ return new URL(href, baseUrl).toString();
+ } catch {
+ return null;
+ }
+}
+
+const NON_MARKUP = /<!--[\s\S]*?-->|<(script|style|template)\b[\s\S]*?<\/\1\s*>/gi;
+const LINK_TAG = /<link\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi;
+const BASE_TAG = /<base\b(?:[^>"']|"[^"]*"|'[^']*')*>/i;
+
+const NAMED_ENTITIES: Record<string, string | undefined> = {
+ amp: '&',
+ lt: '<',
+ gt: '>',
+ quot: '"',
+ apos: "'",
+ nbsp: ' ',
+ raquo: '»',
+ laquo: '«',
+ ndash: '–',
+ mdash: '—',
+ hellip: '…',
+ rsquo: '’',
+ lsquo: '‘',
+ rdquo: '”',
+ ldquo: '“',
+};
+
+const FEED_FORMATS: Record<string, 'rss' | 'atom' | 'rdf' | undefined> = {
+ 'application/rss+xml': 'rss',
+ 'application/atom+xml': 'atom',
+ 'application/rdf+xml': 'rdf',
+};
+
+type AdvertisedFeed = {
+ url: string;
+ title: string | null;
+ format: 'rss' | 'atom' | 'rdf' | null;
+};
diff --git a/packages/pieces/community/rss/src/lib/actions/ai/index.ts b/packages/pieces/community/rss/src/lib/actions/ai/index.ts
new file mode 100644
index 00000000000..c80f188bf50
--- /dev/null
+++ b/packages/pieces/community/rss/src/lib/actions/ai/index.ts
@@ -0,0 +1,5 @@
+import { rssFindSiteFeedsAction } from './find-site-feeds';
+import { rssReadFeedAction } from './read-feed';
+import { rssReadMultipleFeedsAction } from './read-multiple-feeds';
+
+export const rssAiActions = [rssReadFeedAction, rssReadMultipleFeedsAction, rssFindSiteFeedsAction];
diff --git a/packages/pieces/community/rss/src/lib/actions/ai/read-feed.ts b/packages/pieces/community/rss/src/lib/actions/ai/read-feed.ts
new file mode 100644
index 00000000000..b8f9ece97f4
--- /dev/null
+++ b/packages/pieces/community/rss/src/lib/actions/ai/read-feed.ts
@@ -0,0 +1,39 @@
+import { createAction, PieceAuth } from '@activepieces/pieces-framework';
+
+import { rssFeedClient } from '../../common/feed-client';
+import { feedItemFilters, rssFeedUrl } from '../../common/props';
+import { rssReadFeedOutputSchema } from '../../output-schemas';
+
+export const rssReadFeedAction = createAction({
+ auth: PieceAuth.None(),
+ name: 'rss_read_feed',
+ outputSchema: rssReadFeedOutputSchema,
+ displayName: 'Read Feed',
+ description: "Gets a feed's details and its latest items, newest first.",
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Fetches one RSS, RDF or Atom feed by its feed URL and returns the feed details plus its items, newest first, optionally filtered by publish date or keyword. Use RSS: Read Multiple Feeds for several feeds at once, and RSS: Find Site Feeds first when you only have a website or article URL rather than the feed URL. A feed only carries its most recent entries (often 10–50), so older items are not reachable.',
+ idempotent: true,
+ },
+ props: {
+ rss_feed_url: rssFeedUrl,
+ ...feedItemFilters,
+ },
+ async run({ propsValue }) {
+ const { feed, items } = await rssFeedClient.fetchFeed({ url: propsValue.rss_feed_url });
+ const filtered = rssFeedClient.filterItems({
+ items,
+ publishedAfter: propsValue.published_after,
+ keyword: propsValue.keyword,
+ limit: propsValue.limit,
+ });
+ return {
+ feed,
+ items: filtered,
+ count: filtered.length,
+ total_in_feed: items.length,
+ };
+ },
+});
diff --git a/packages/pieces/community/rss/src/lib/actions/ai/read-multiple-feeds.ts b/packages/pieces/community/rss/src/lib/actions/ai/read-multiple-feeds.ts
new file mode 100644
index 00000000000..e8dc465165d
--- /dev/null
+++ b/packages/pieces/community/rss/src/lib/actions/ai/read-multiple-feeds.ts
@@ -0,0 +1,83 @@
+import { createAction, PieceAuth, tryCatch } from '@activepieces/pieces-framework';
+
+import { rssFeedClient } from '../../common/feed-client';
+import { feedItemFilters, rssFeedUrls } from '../../common/props';
+import { rssReadMultipleFeedsOutputSchema } from '../../output-schemas';
+
+export const rssReadMultipleFeedsAction = createAction({
+ auth: PieceAuth.None(),
+ name: 'rss_read_multiple_feeds',
+ outputSchema: rssReadMultipleFeedsOutputSchema,
+ displayName: 'Read Multiple Feeds',
+ description: 'Gets the latest items from several feeds as one list, newest first.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Fetches up to 20 RSS, RDF or Atom feeds in parallel and merges their items into one list, newest first, each tagged with the feed it came from; filters by publish date or keyword apply after merging, and the limit applies to the merged list. A feed that fails to load is skipped and listed under failed; the action only errors when every feed fails. Use RSS: Read Feed for a single feed.',
+ idempotent: true,
+ },
+ props: {
+ rss_feed_urls: rssFeedUrls,
+ ...feedItemFilters,
+ },
+ async run({ propsValue }) {
+ const urls = [
+ ...new Set(
+ propsValue.rss_feed_urls
+ .filter((url): url is string => typeof url === 'string')
+ .map((url) => url.trim())
+ .filter((url) => url.length > 0),
+ ),
+ ];
+ if (urls.length === 0) {
+ throw new Error('Provide at least one feed URL.');
+ }
+ if (urls.length > MAX_FEEDS) {
+ throw new Error(`Provide at most ${MAX_FEEDS} feed URLs; got ${urls.length}.`);
+ }
+
+ const results = await Promise.all(
+ urls.map(async (url) => ({
+ url,
+ result: await tryCatch(() => rssFeedClient.fetchFeed({ url })),
+ })),
+ );
+
+ const failed = results.flatMap(({ url, result }) =>
+ result.error ? [{ feed_url: url, error: result.error.message }] : [],
+ );
+ const loaded = results.flatMap(({ url, result }) =>
+ result.data ? [{ url, feed: result.data.feed, items: result.data.items }] : [],
+ );
+ if (loaded.length === 0) {
+ throw new Error(
+ `None of the feeds could be loaded: ${failed.map((f) => f.error).join('; ')}`,
+ );
+ }
+
+ const merged = loaded.flatMap(({ url, feed, items }) =>
+ items.map((item) => ({ ...item, feed_title: feed.title, feed_url: url })),
+ );
+ const filtered = rssFeedClient.filterItems({
+ items: merged,
+ publishedAfter: propsValue.published_after,
+ keyword: propsValue.keyword,
+ limit: propsValue.limit,
+ });
+
+ return {
+ items: filtered,
+ count: filtered.length,
+ feeds: loaded.map(({ url, feed, items }) => ({
+ feed_url: url,
+ title: feed.title,
+ site_url: feed.site_url,
+ item_count: items.length,
+ })),
+ failed,
+ };
+ },
+});
+
+const MAX_FEEDS = 20;
diff --git a/packages/pieces/community/rss/src/lib/common/feed-client.ts b/packages/pieces/community/rss/src/lib/common/feed-client.ts
new file mode 100644
index 00000000000..1fb02f07071
--- /dev/null
+++ b/packages/pieces/community/rss/src/lib/common/feed-client.ts
@@ -0,0 +1,243 @@
+import FeedParser from 'feedparser';
+
+import { httpClient, HttpError, HttpMethod } from '@activepieces/pieces-common';
+import { tryCatch } from '@activepieces/pieces-framework';
+
+async function fetchFeed({ url }: { url: string }): Promise<ParsedFeed> {
+ const response = await sendGet<Buffer>({ url, responseType: 'arraybuffer' });
+ return parseFeed({ body: response.body, url });
+}
+
+async function fetchPage({ url }: { url: string }): Promise<FetchedPage> {
+ const response = await sendGet<string>({ url, responseType: 'text' });
+ const contentType = response.headers?.['content-type'];
+ return {
+ body: response.body,
+ contentType: (Array.isArray(contentType) ? contentType[0] : contentType) ?? '',
+ };
+}
+
+async function parseFeed({
+ body,
+ url,
+}: {
+ body: Buffer | string;
+ url: string;
+}): Promise<ParsedFeed> {
+ const { meta, items } = await runFeedParser({ body, url });
+ return {
+ feed: toFeed({ meta, url }),
+ items: items.map(toItem),
+ };
+}
+
+function filterItems({
+ items,
+ publishedAfter,
+ keyword,
+ limit,
+}: {
+ items: FeedItem[];
+ publishedAfter: string | undefined;
+ keyword: string | undefined;
+ limit: number | undefined;
+}): FeedItem[] {
+ const after = publishedAfter ? Date.parse(publishedAfter) : undefined;
+ if (after !== undefined && Number.isNaN(after)) {
+ throw new Error(`"${publishedAfter}" is not a valid date for Published After.`);
+ }
+ const needle = keyword?.trim().toLowerCase();
+ return items
+ .filter(
+ (item) =>
+ after === undefined ||
+ (item.published_at !== null && Date.parse(item.published_at) > after),
+ )
+ .filter(
+ (item) =>
+ !needle ||
+ [item.title, item.summary, item.content].some((text) =>
+ text?.toLowerCase().includes(needle),
+ ),
+ )
+ .sort(compareNewestFirst)
+ .slice(0, clampLimit({ limit }));
+}
+
+export const rssFeedClient = { fetchFeed, fetchPage, parseFeed, filterItems };
+
+async function sendGet<T>({
+ url,
+ responseType,
+}: {
+ url: string;
+ responseType: 'arraybuffer' | 'text';
+}) {
+ const { data, error } = await tryCatch(() =>
+ withDeadline({
+ promise: httpClient.sendRequest<T>({
+ method: HttpMethod.GET,
+ url,
+ responseType,
+ timeout: FETCH_TIMEOUT_MS,
+ }),
+ }),
+ );
+ if (error) {
+ const status = error instanceof HttpError ? ` (HTTP ${error.response.status})` : '';
+ const cause = describeCause({ cause: error.cause });
+ throw new Error(
+ `Could not load ${url}${status}: ${error.message}${cause ? ` (${cause})` : ''}`,
+ );
+ }
+ return data;
+}
+
+function withDeadline<T>({ promise }: { promise: Promise<T> }): Promise<T> {
+ let timer: ReturnType<typeof setTimeout> | undefined;
+ const deadline = new Promise<never>((_, reject) => {
+ timer = setTimeout(
+ () => reject(new Error(`timed out after ${FETCH_TIMEOUT_MS / 1000}s`)),
+ FETCH_TIMEOUT_MS,
+ );
+ });
+ return Promise.race([promise, deadline]).finally(() => clearTimeout(timer));
+}
+
+function describeCause({ cause }: { cause: unknown }): string {
+ if (typeof cause !== 'object' || cause === null) {
+ return '';
+ }
+ if ('code' in cause && typeof cause.code === 'string') {
+ return cause.code;
+ }
+ return cause instanceof Error ? cause.message : '';
+}
+
+function runFeedParser({
+ body,
+ url,
+}: {
+ body: Buffer | string;
+ url: string;
+}): Promise<{ meta: FeedParser.Meta | null; items: FeedParser.Item[] }> {
+ return new Promise((resolve, reject) => {
+ const parser = new FeedParser({ feedurl: url });
+ const items: FeedParser.Item[] = [];
+ let meta: FeedParser.Meta | null = null;
+ parser.on('meta', (parsedMeta: FeedParser.Meta) => {
+ meta = parsedMeta;
+ });
+ parser.on('readable', () => {
+ let item = parser.read();
+ while (item) {
+ items.push(item);
+ item = parser.read();
+ }
+ });
+ parser.on('end', () => resolve({ meta, items }));
+ parser.on('error', (error: Error) =>
+ reject(new Error(`${url} is not a valid RSS or Atom feed: ${error.message}`)),
+ );
+ parser.write(body);
+ parser.end();
+ });
+}
+
+function toFeed({ meta, url }: { meta: FeedParser.Meta | null; url: string }): FeedInfo {
+ return {
+ title: meta?.title || null,
+ description: meta?.description || null,
+ site_url: meta?.link || null,
+ feed_url: meta?.xmlurl || url,
+ language: meta?.language || null,
+ author: meta?.author || null,
+ updated_at: toIso(meta?.date ?? meta?.pubdate ?? null),
+ image_url: meta?.image?.url || null,
+ format: meta?.['#type'] ?? null,
+ };
+}
+
+function toItem(item: FeedParser.Item): FeedItem {
+ return {
+ id: item.guid || item.link || null,
+ title: item.title || null,
+ link: item.origlink || item.link || null,
+ author: item.author || null,
+ published_at: toIso(item.pubdate ?? item.date),
+ updated_at: toIso(item.date),
+ summary: item.summary || null,
+ content: item.description || null,
+ categories: item.categories ?? [],
+ image_url: item.image?.url || null,
+ enclosures: (item.enclosures ?? []).map((enclosure) => ({
+ url: enclosure.url,
+ type: enclosure.type || null,
+ length: enclosure.length ? Number(enclosure.length) : null,
+ })),
+ };
+}
+
+function toIso(date: Date | null): string | null {
+ return date && !Number.isNaN(date.getTime()) ? date.toISOString() : null;
+}
+
+function compareNewestFirst(a: FeedItem, b: FeedItem): number {
+ if (a.published_at === b.published_at) {
+ return 0;
+ }
+ if (a.published_at === null) {
+ return 1;
+ }
+ if (b.published_at === null) {
+ return -1;
+ }
+ return Date.parse(b.published_at) - Date.parse(a.published_at);
+}
+
+function clampLimit({ limit }: { limit: number | undefined }): number {
+ if (limit === undefined || limit === null) {
+ return DEFAULT_LIMIT;
+ }
+ return Math.min(Math.max(Math.floor(limit), 1), MAX_LIMIT);
+}
+
+const DEFAULT_LIMIT = 20;
+const FETCH_TIMEOUT_MS = 20_000;
+const MAX_LIMIT = 100;
+
+type FetchedPage = {
+ body: string;
+ contentType: string;
+};
+
+export type FeedInfo = {
+ title: string | null;
+ description: string | null;
+ site_url: string | null;
+ feed_url: string;
+ language: string | null;
+ author: string | null;
+ updated_at: string | null;
+ image_url: string | null;
+ format: FeedParser.Type | null;
+};
+
+export type FeedItem = {
+ id: string | null;
+ title: string | null;
+ link: string | null;
+ author: string | null;
+ published_at: string | null;
+ updated_at: string | null;
+ summary: string | null;
+ content: string | null;
+ categories: string[];
+ image_url: string | null;
+ enclosures: { url: string; type: string | null; length: number | null }[];
+};
+
+export type ParsedFeed = {
+ feed: FeedInfo;
+ items: FeedItem[];
+};
diff --git a/packages/pieces/community/rss/src/lib/common/props.ts b/packages/pieces/community/rss/src/lib/common/props.ts
index bc342bcc621..dd1379d0b24 100644
--- a/packages/pieces/community/rss/src/lib/common/props.ts
+++ b/packages/pieces/community/rss/src/lib/common/props.ts
@@ -1,15 +1,36 @@
import { Property } from '@activepieces/pieces-framework';
export const rssFeedUrl = Property.ShortText({
- displayName: 'RSS Feed URL',
- description: 'Link to the feed itself, not the site homepage; Atom works too.',
- placeholder: 'https://example.com/feed.xml',
- required: true,
+ displayName: 'RSS Feed URL',
+ description: 'Link to the feed itself, not the site homepage; Atom works too.',
+ placeholder: 'https://example.com/feed.xml',
+ required: true,
});
export const rssFeedUrls = Property.Array({
- displayName: 'RSS Feed URLs',
- description: 'One feed address per row; a feed that fails to load is skipped.',
- required: true,
- defaultValue: [],
-});
\ No newline at end of file
+ displayName: 'RSS Feed URLs',
+ description: 'One feed address per row; a feed that fails to load is skipped.',
+ required: true,
+ defaultValue: [],
+});
+
+export const feedItemFilters = {
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum number of items to return, newest first (1–100). Defaults to 20.',
+ required: false,
+ defaultValue: 20,
+ }),
+ published_after: Property.DateTime({
+ displayName: 'Published After',
+ description:
+ 'Only return items published after this date and time. Items without a publish date are left out.',
+ required: false,
+ }),
+ keyword: Property.ShortText({
+ displayName: 'Keyword',
+ description:
+ 'Only return items whose title, summary or content contains this text (case-insensitive).',
+ required: false,
+ }),
+};
diff --git a/packages/pieces/community/rss/src/lib/output-schemas.ts b/packages/pieces/community/rss/src/lib/output-schemas.ts
index 74d13296a7f..e8eb988f694 100644
--- a/packages/pieces/community/rss/src/lib/output-schemas.ts
+++ b/packages/pieces/community/rss/src/lib/output-schemas.ts
@@ -204,3 +204,108 @@ export const newItemListTriggerOutputSchema: OutputSchema = {
},
],
};
+
+const feedItemFields: OutputSchema['fields'] = [
+ { key: 'id', label: 'Item ID' },
+ { key: 'title', label: 'Title' },
+ { key: 'link', label: 'Link', format: 'url' },
+ { key: 'author', label: 'Author' },
+ { key: 'published_at', label: 'Published At', format: 'datetime' },
+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },
+ { key: 'summary', label: 'Summary', format: 'html' },
+ { key: 'content', label: 'Content', format: 'html' },
+ { key: 'categories', label: 'Categories' },
+ { key: 'image_url', label: 'Image', format: 'image' },
+];
+
+const enclosuresField: OutputSchema['fields'][number] = {
+ key: 'enclosures',
+ label: 'Enclosures',
+ labelKey: 'url',
+ listItems: [
+ { key: 'url', label: 'URL', format: 'url' },
+ { key: 'type', label: 'Media Type' },
+ { key: 'length', label: 'Size', format: 'filesize' },
+ ],
+};
+
+export const rssFindSiteFeedsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'feeds',
+ label: 'Feeds',
+ labelKey: 'title',
+ listItems: [
+ { key: 'url', label: 'Feed URL', format: 'url' },
+ { key: 'title', label: 'Title' },
+ { key: 'format', label: 'Format' },
+ ],
+ },
+ { key: 'count', label: 'Feeds Found', format: 'number' },
+ ],
+};
+
+export const rssReadFeedOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'feed',
+ label: 'Feed',
+ children: [
+ { key: 'title', label: 'Title' },
+ { key: 'description', label: 'Description' },
+ { key: 'site_url', label: 'Site URL', format: 'url' },
+ { key: 'feed_url', label: 'Feed URL', format: 'url' },
+ { key: 'language', label: 'Language' },
+ { key: 'author', label: 'Author' },
+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },
+ { key: 'image_url', label: 'Image', format: 'image' },
+ { key: 'format', label: 'Format' },
+ ],
+ },
+ {
+ key: 'items',
+ label: 'Items',
+ labelKey: 'title',
+ listItems: [...feedItemFields, enclosuresField],
+ },
+ { key: 'count', label: 'Items Returned', format: 'number' },
+ { key: 'total_in_feed', label: 'Total Items in Feed', format: 'number' },
+ ],
+};
+
+export const rssReadMultipleFeedsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'items',
+ label: 'Items',
+ labelKey: 'title',
+ listItems: [
+ ...feedItemFields,
+ { key: 'enclosures', label: 'Enclosures' },
+ { key: 'feed_title', label: 'Feed Title' },
+ { key: 'feed_url', label: 'Feed URL', format: 'url' },
+ ],
+ },
+ { key: 'count', label: 'Items Returned', format: 'number' },
+ {
+ key: 'feeds',
+ label: 'Loaded Feeds',
+ labelKey: 'title',
+ listItems: [
+ { key: 'feed_url', label: 'Feed URL', format: 'url' },
+ { key: 'title', label: 'Title' },
+ { key: 'site_url', label: 'Site URL', format: 'url' },
+ { key: 'item_count', label: 'Items in Feed', format: 'number' },
+ ],
+ },
+ {
+ key: 'failed',
+ label: 'Failed Feeds',
+ labelKey: 'feed_url',
+ listItems: [
+ { key: 'feed_url', label: 'Feed URL', format: 'url' },
+ { key: 'error', label: 'Error' },
+ ],
+ },
+ ],
+};