This integration runs every hour and checks for new posts and comments in a specified subreddit. This data will be added to your Orbit workspace as new activities.
If you are a developer and want to incorporate this integration into your existing applications then please check out the standalone JavaScript library.
-
Go to your repository created during your first-time setup and click on the Actions tab.
-
Click "set up a workflow yourself" and call it reddit.yml - delete the content so it is blank.
-
Copy the contents of reddit.yml into your new workflow.
-
At a minimum, replace line 12 and 13 with at least one subreddit. Then uncomment this section in order for the workflow to work. Make sure to replace the default values, otherwise you will be importing activity from these subreddits.
-
This automation requires credentials from Reddit to be added to your GitHub repository secrets.
- Head to your Reddit App Preferences.
- Create a new app with the following settings:
- Name:
orbit-community-integration
- Type:
script
- Description:
orbit.love community integration
- About URL:
https://github.com/orbit-love/community-js-reddit-orbit
- Redirect URI:
https://orbit.love
- Name:
- Take note of your
Client ID
which is just below your app name, and yourClient Secret
. - Follow the steps in the GitHub Actions Templates First Time Setup Guide and add
REDDIT_CLIENT_ID
,REDDIT_CLIENT_SECRET
,REDDIT_USERNAME
, andREDDIT_PASSWORD
values.
PLEASE NOTE: For this to work, your Reddit account should have 2FA disabled AND needs to have a passwords set.
- If you used your Google or Apple account to sign up to Reddit and don't have an account you can disconnect it and then you'll be able to set an account (an reconnect your Google or Apple account after).
- If you want to have 2FA enabled on your main Reddit account (you probably should): create an additional acocunt to just set up this integration and don't use your main account.
You can pass in a --filter=term
flag to filter the results by a single term. To do this, find the line in the template which starts npx @orbit-love/reddit
and add a space and --filter="your term"
to the end.
- For posts this will match if the post title, url or body text contain the term.
- For comments this will match if it was left on a post with a title containing the term, or the comment itself contains the term.
- For both the filter term is not case sensitive.
Once the workflow and credentials have been added to your GitHub repository, the workflow will be activated. You do not need to do anything else to activate it.
You may want to perform a one-time historical import to fetch all your previous Reddit interactions and bring them into your Orbit workspace. Set the hours tag to 720 for 30 days of import to do so.
Change the hours
value on line 20 in your orbit-integrations/actions/workflows/reddit.yml
. Then head to your actions and re-run the workflow manually. Once run successfully, disable the current workflow, change the hours
value back to 1, and find the workflow in the actions tab and enable it.