Reddit

Communication Script app credentials

Read and post to Reddit from any Windmill script, flow or app.

Set up in 3 steps

1

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.

2

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.

3

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.

Submit a script →

Flows

Multi-step workflows that already wire Reddit to something else.

All flows →

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.

FieldTypeRequiredWhat it is
clientIdstringYesThe client ID for the Reddit app
clientSecretstringYesThe client secret for the Reddit app
passwordstringYesThe password for the Reddit account.
userAgentstringNoThe user agent to use for the Reddit API requests.
usernamestringYesThe 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.