← Google Sheets + Reddit integrations

List Subreddits by Query with Reddit API on New Row Added (Instant) from Google Sheets API

Pipedream makes it easy to connect APIs for Reddit, Google Sheets and 1400+ other apps remarkably fast.

Trigger workflow on
New Row Added (Instant) from the Google Sheets API
Next, do this
List Subreddits by Query with the Reddit API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Google Sheets trigger and Reddit action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Row Added (Instant) trigger
    1. Connect your Google Sheets account
    2. Configure Push notification renewal schedule
    3. Select a Spreadsheet
    4. Select one or more Worksheet(s)
  3. Configure the List Subreddits by Query action
    1. Connect your Reddit account
    2. Select a Subreddit
    3. Optional- Configure Limit
    4. Optional- Configure Before
    5. Optional- Configure After
    6. Optional- Configure Count
    7. Optional- Select a Sort
    8. Optional- Configure Include subreddit details?
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new events each time a row or rows are added to the bottom of a spreadsheet. To use this source with a spreadsheet in a [Shared Drive](https://support.google.com/a/users/answer/9310351), use the **New Row Added (Shared Drive, Instant)** source instead.
Version:0.1.1
Key:google_sheets-new-row-added

Google Sheets Overview

Some examples of things you can build using the Google Sheets API include:

  • A web app that lets users input data into a Google Sheet
  • A script that automatically updates a Google Sheet with data from another
    source
  • A tool that generates graphs and charts from data in a Google Sheet
  • A service that sends data from a Google Sheet to another API or application

Trigger Code

import httpBase from "../common/http-based/sheet.mjs";
import newRowAdded from "../common/new-row-added.mjs";

export default {
  ...httpBase,
  ...newRowAdded,
  key: "google_sheets-new-row-added",
  name: "New Row Added (Instant)",
  description: "Emit new events each time a row or rows are added to the bottom of a spreadsheet. To use this source with a spreadsheet in a [Shared Drive](https://support.google.com/a/users/answer/9310351), use the **New Row Added (Shared Drive, Instant)** source instead.",
  version: "0.1.1",
  dedupe: "unique",
  type: "source",
  props: {
    ...httpBase.props,
    ...newRowAdded.props,
  },
  methods: {
    ...httpBase.methods,
    ...newRowAdded.methods,
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Google SheetsgoogleSheetsappThis component uses the Google Sheets app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
Push notification renewal scheduletimer$.interface.timer

The Google Drive API requires occasionally renewal of push notification subscriptions. This runs in the background, so you should not need to modify this schedule.

SpreadsheetsheetIDstringSelect a value from the drop down menu.
Worksheet(s)worksheetIDsstring[]Select a value from the drop down menu.

Trigger Authentication

Google Sheets uses OAuth authentication. When you connect your Google Sheets account, Pipedream will open a popup window where you can sign into Google Sheets and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google Sheets API.

Pipedream requests the following authorization scopes when you connect your account:

emailprofilehttps://www.googleapis.com/auth/drive

About Google Sheets

With Google Sheets, you can create, edit, and collaborate wherever you are

Action

Description:List subreddits based on a search criteria. [See the docs here](https://www.reddit.com/dev/api/#GET_subreddits_search)
Version:0.1.0
Key:reddit-list-subreddits-by-query

Reddit Overview

  1. You could build a tool that monitors specific subreddits and notifies you
    when new posts match certain criteria.
  2. You could build a tool that analyzes the posts and comments in a given
    subreddit to generate statistics or visualizations about the topic.
  3. You could build a bot that automatically posts or comments in response to
    certain keywords or phrases.
  4. You could build a tool that helps manage your Reddit account by automating
    tasks like posting, messaging, or voting.
  5. You could build a tool that extracts data from Reddit posts and comments for
    use in other applications.

Action Code

import reddit from "../../reddit.app.mjs";
import { axios } from "@pipedream/platform";

export default {
  type: "action",
  key: "reddit-list-subreddits-by-query",
  version: "0.1.0",
  name: "List Subreddits by Query",
  description: "List subreddits based on a search criteria. [See the docs here](https://www.reddit.com/dev/api/#GET_subreddits_search)",
  props: {
    reddit,
    subreddit: {
      propDefinition: [
        reddit,
        "subreddit",
      ],
      description: "Type to search for a subreddit or enter a custom expression to search subreddits by title.",
    },
    limit: {
      propDefinition: [
        reddit,
        "limit",
      ],
    },
    before: {
      propDefinition: [
        reddit,
        "before",
      ],
    },
    after: {
      propDefinition: [
        reddit,
        "after",
      ],
    },
    count: {
      propDefinition: [
        reddit,
        "count",
      ],
    },
    sort: {
      propDefinition: [
        reddit,
        "sort",
      ],
    },
    srDetails: {
      propDefinition: [
        reddit,
        "includeSubredditDetails",
      ],
    },
  },
  async run({ $ }) {
    const params = {
      q: this.subreddit?.value || this.subreddit,
      limit: this.limit,
      sort: this.sort,
      sr_detail: this.srDetails,
      before: this.before,
      after: this.after,
      count: this.count,
    };

    const res = await axios($, this.reddit._getAxiosParams({
      method: "GET",
      path: "/subreddits/search",
      params,
    }));

    $.export("$summary", "Subreddits successfully fetched");
    return res;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
RedditredditappThis component uses the Reddit app.
SubredditsubredditstringSelect a value from the drop down menu.
Limitlimitinteger

Default to 25. The maximum number of items desired

Beforebeforestring

Only one of after and before should be specified. These indicate the fullname of an item in the listing to use as the anchor point of the slice.

Afterafterstring

Only one of after and before should be specified. These indicate the fullname of an item in the listing to use as the anchor point of the slice.

Countcountinteger

The number of items already seen in this listing. On the html site, the builder uses this to determine when to give values for before and after in the response.

SortsortstringSelect a value from the drop down menu:relevanceactivity
Include subreddit details?srDetailsboolean

If set to true, subreddit details will be expanded/included.

Action Authentication

Reddit uses OAuth authentication. When you connect your Reddit account, Pipedream will open a popup window where you can sign into Reddit and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Reddit API.

Pipedream requests the following authorization scopes when you connect your account:

accountidentityedithistoryreadsubmitmysubredditssubscribe

About Reddit

Reddit is a network of communities based on people's interests. Find communities you're interested in, and become part of an online community!

More Ways to Connect Reddit + Google Sheets

Get Values in Range with Google Sheets API on New comments on a post from Reddit API
Reddit + Google Sheets
 
Try it
Get Values with Google Sheets API on New comments on a post from Reddit API
Reddit + Google Sheets
 
Try it
Add Multiple Rows with Google Sheets API on New comments on a post from Reddit API
Reddit + Google Sheets
 
Try it
Add Single Row with Google Sheets API on New comments on a post from Reddit API
Reddit + Google Sheets
 
Try it
Clear Cell with Google Sheets API on New comments on a post from Reddit API
Reddit + Google Sheets
 
Try it
New Row Added (Instant) from the Google Sheets API

Emit new events each time a row or rows are added to the bottom of a spreadsheet. To use this source with a spreadsheet in a Shared Drive, use the New Row Added (Shared Drive, Instant) source instead.

 
Try it
New Row Added (Shared Drive, Instant) from the Google Sheets API

Emit new events each time a row or rows are added to the bottom of a spreadsheet in a shared drive

 
Try it
New Updates (Instant) from the Google Sheets API

Emit new event each time a row or cell is updated in a spreadsheet. To use this source with a spreadsheet in a Shared Drive, use the New Updates (Shared Drive, Instant) source instead.

 
Try it
New Updates (Shared Drive, Instant) from the Google Sheets API

Emit new event each time a row or cell is updated in a spreadsheet in a shared drive

 
Try it
New Worksheet (Instant) from the Google Sheets API

Emit new event each time a new worksheet is created in a spreadsheet. To use this source with a spreadsheet in a Shared Drive, use the New Worksheet (Shared Drive, Instant) source instead.

 
Try it
Add Single Row with the Google Sheets API

Add a single row of data to Google Sheets

 
Try it
Add Multiple Rows with the Google Sheets API

Add multiple rows of data to a Google Sheet

 
Try it
Get Values with the Google Sheets API

Get all values from a sheet.

 
Try it
Get Values in Range with the Google Sheets API

Get values from a range of cells using A1 notation.

 
Try it
Clear Cell with the Google Sheets API

Delete the content of a specific cell in a spreadsheet

 
Try it

Explore Other Apps

1
-
12
of
1400+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Beta
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Beta
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
Telegram Bot
Telegram Bot
Telegram is a cloud-based instant messaging and voice over IP service
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular apps like ChatGPT and DALL·E 2.
Google Sheets
Google Sheets
With Google Sheets, you can create, edit, and collaborate wherever you are
Discord
Discord
Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.