Read and post to Reddit from any Windmill script, flow or app.
Set up in 3 steps
Create a script app
At reddit.com/prefs/apps, create an app of type script. Note its client id — the string under the app name — and its secret.
Add the resource in Windmill
Open Resources, add a resource of type reddit, and fill clientId, clientSecret, and the username and password of the account the scripts should act as. Set userAgent to something identifying, as Reddit requires.
Run your first script
Fork any script below and read a subreddit before posting anything.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
Trigger everytime a new item post on reddit matches at least one mention
List Comments in a Post
Submit a Comment
List Subreddits by Query
Submit a Post
Search Post
Flows
Multi-step workflows that already wire Reddit to something else.
Trigger flows from Reddit
Reddit is not only a destination. These inbound paths are supported today.
New posts matching a mention (scheduled poll)
The trigger script polls a subreddit's new posts and returns the ones since its last run that match at least one of the phrases you list. To run it, open a flow, add a trigger and choose Scheduled Poll, then pick the trigger script and an interval. Windmill puts the script first in the flow with a loop after it, so the steps you add run once per new item. The cursor is saved per flow: two flows polling the same source each get every item, and test runs keep a cursor of their own.
Resource type
The shape of the credential every script on this page expects.
| Field | Type | Required | What it is |
|---|---|---|---|
| clientId | string | Yes | The client ID for the Reddit app |
| clientSecret | string | Yes | The client secret for the Reddit app |
| password | string | Yes | The password for the Reddit account. |
| userAgent | string | No | The user agent to use for the Reddit API requests. |
| username | string | Yes | The username for the Reddit account. |
Questions
Why does it need my account password?
A script app authenticates with the password grant, exchanging these four fields for a short-lived token on every run. It only works for the one account that owns the app.
My calls are rejected or rate-limited hard
Reddit blocks generic user agents. Set userAgent to something that identifies your app and account, in the form platform:appname:version (by /u/username).
Does two-factor authentication work?
Not with the password grant. Use an account without it for automation.
Are my credentials stored on the hub?
Never. They live only in your own Windmill workspace, encrypted at rest.