Create Reddit Feed
User Intent
"How do I sync Reddit posts and comments? Show me Reddit feed configuration."
Operation
SDK Method: createFeed() with FeedTypes.Reddit
Auth: Reddit API credentials
Code Example (TypeScript)
import { Graphlit } from 'graphlit-client';
import { FeedTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
const feed = await graphlit.createFeed({
name: 'r/MachineLearning',
type: FeedTypes.Reddit,
reddit: {
subredditName: 'MachineLearning',
readLimit: 100,
},
// Optional: add workflow for content processing
// workflow: { id: workflow.createWorkflow.id }
});
console.log(`Created Reddit feed: ${feed.createFeed.id}`);Configuration
subreddit: Subreddit name (without r/) readLimit: Number of posts includeComments: Sync post comments sortBy: hot, new, top, rising
Reddit API Setup
Reddit → Preferences → Apps
Create app (script type)
Get client ID and secret
Generate access token
What Gets Synced
Post titles and content
Author information
Upvotes/downvotes
Comments (if enabled)
Post metadata (flair, awards)
Last updated
Was this helpful?