Extracting Reddit Data to Airtable Using Byteline's No-Code Platform
Tags: airtable, nocode
Published: 2021-03-20 21:17:52

## Introduction
In the world of information exchange, nerds and nitwits love Reddit alike. The popularity of Reddit is not only because of being an infinite source of user-generated content for pretty much every field of human knowledge, but also for the fact that Reddit manages spam unlike any other social media channels. 

The prominence of Reddit is apparent with its sheer number of users who not only access informative content by visiting the site, but also extract that info to be used with another source. To do so, Reddit offers an API that can be used to pull subreddit data of posts, comments, media, and votes. Though it sounds like a great idea, often there are challenges to convert the API skeleton into a full-fledged data churning machine. This is usually because using the Reddit API requires decent technical development skills before actually starting to use it for data extraction. 

In this article today, we are covering the solution of how Byteline’s **no-code platform** can be used to pull data through the Reddit API without writing a single line of code. While Byteline offers an out-of-the-box solution of extracting Reddit data to export into a wide list of applications, we are considering a use-case of importing the fetched data into an **Airtable Base** for this article. 

>For the uninitiated, Airtable is a popular no-code database that is steadily gaining popularity as a data organizing tool - simple like a spreadsheet, with features of a relational database. 

Byteline offers a No-Code Airtable Upsert (Update and Insert) service which you may use to pull data from an external source, and then feed it into your Airtable base. It intelligently figures out whether to update or insert a record without requiring any user input. For items requiring an update, it automatically figures out the record ID. Compare this to a complicated no-code logic required in other no-code platforms to figure out the right Item ID to update. All this, without writing a single line of code!
To understand this better, let us simplify the sources involved in the workflow - 

**Data Source** - Reddit

**Data Extraction and API Handling** - Reddit API through Byteline’s No-Code Platform

**Data Publish Target** - Airtable

Here is the list of a few simple steps that you can use to extract data from subreddits, and then publish on an Airtable base.

## Fetching Reddit data
The first step to get started is to configure the API that will be used to pull data from Reddit. Byteline allows you to configure the Reddit API through its Flow Designer, using a simple user interface without writing a single line of code. To know more on the list of Byteline's list of integrations and features, [click here](https://www.byteline.io/integrations).
**Quick Tip** - Byteline's Flow is a logical flow of steps with easy-to-use buttons for quick configuration.

**Step - 1:** Start with creating a flow design that has the HTTP API as the first (trigger) node and Reddit node as the second. Here is detailed information on [HTTP trigger nodes](https://docs.byteline.io/article/mc2e71arj9-running-a-flow#method_2_http_api).

For more detail on creating Byteline's Flow Designer, visit: [How to Create your First Flow](https://docs.byteline.io/article/1miq8f4e99-create-flow-design) help doc.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cqnaq94lvjmowvr7hvkr.png)
Here the **Grey** indicator shows that the Reddit node is not configured, which we will configure in the steps to follow.

**Step - 2:** Click on the **Edit** button of the Reddit node for configuration.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0nl1cz5nsvvcxbunu6n.png)
**Step - 3:** Click on the **Sign-in** button of the configuration window to connect your Reddit account with the node to fetch data. This will open the Reddit authentication page in another browser tab.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2t46p9xz0x3zo4thzsil.png)
**Step - 4:** Once logged into your Reddit account, click on the Refresh button to update the connection status. Enter the **Subreddit** name you want to access in the text field of the configuration window as shown.

**Step - 5:** Once done, click on the **Save** button to save the Reddit node's configuration.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvop3h8m3zek2ilk3n6g.png)
The green indicators show the Reddit node is configured successfully.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j7amrxb5gb1if1utzvv.png)
**Step - 6:** Hit the **Deploy** button at the top-left corner of the console to deploy the flow created.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0qx3rfbm7pafk3x0etg.png)
**Step - 7:** As the last step of this part of the flow, click on the **Run** button to execute the flow. Even though you will [run your flow](https://docs.byteline.io/article/mc2e71arj9-running-a-flow) from different sources, it can be tested by flow designer to make sure its functionality is working fine. With this, the Flow Designer is configured with the Reddit node to start extracting data through the HTTP API trigger.  
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zy2b25vo5hxm7n51chsg.png)
## Pushing Reddit data to Airtable
Once the initial stage of Flow Designer is configured, the next stage is to push the extracted Reddit data to Airtable records.

**Quick Tip:** Byteline offers a no-code integration solution with multiple platforms, including WebFlow, Airtable, etc. If you have a specific platform with which you would like Byteline to integrate with, [leave us a request here](https://www.byteline.io/contact-us).

**Step - 1:** Add Airtable node to the existing flow.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k519z6wx6p4e9uja7pgx.png)
**Step - 2:** Once the Airtable node is added, the **Grey** indicator on the Airtable node shows that the node is not yet configured. To configure the node, hit the **edit** button of the **Airtable -Upsert** node for configuration.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5edy5trh0uibwf9a407z.png)
**Step - 3:** Enter the **Base Id**, **Table name**, and **View** in the text field of the Airtable configuration window.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80jsp1f6qydzuc2papky.png)
**Quick Tip:** To find details of your Airtable Base, please refer the image below: 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87upl103sapwi037q4qz.png)
**Step - 4:** Once details of your Airtable Base have been entered, click on the **loop over** checkbox to apply loop to a JSON array. Refer to our [loop over documentation](https://docs.byteline.io/article/wleqk06swt-loop-over) to understand this concept.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4u6urwgt3a5feajucvm2.png)
**Step - 5:**  Click on **Select Variable Tool** to view the data model.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6klqk7pj8wubhd61r3d4.png)
**Step - 6:** Click on the **Grey** button of an array to pick the path.

**Quick Tip:** This is an important step to note and select the variables that you want to pull into the workflow. Here is the documentation on [understanding flow variables](https://docs.byteline.io/article/wfxjfup2x2-understanding-flow-variables).
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41znvrvde9zcapzjntkz.png)

**Step - 7:** Enter the **JSON array** path in the loop over the text field to execute loop over the array.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvejzj7tm61e8pncdi8i.png)
**Step - 8:** Enter the variable in the text field with the syntax **@.data.created | datetime.** Here, **@** is used to fetch the current value of the variable, and **|** [pipe converter](https://docs.byteline.io/article/qc97d19gkc-data-converter) is used to convert data to acceptable format.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8f3tamewnhp1eoi837e.png)
**Step - 9:** Click on the **Save** button to save the Airtable configuration. Once done, the **Green** indicator shows that the Airtable node is configured successfully. You can now test this flow by deploying and running as we did in the previous section of configuring the Reddit node.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dclrdl3ulob98rt9a7bv.png)
**Step - 10:** Before you can use the Airtable node, you need to configure the API Key to access your Airtable account. You can follow the steps [here](https://docs.byteline.io/article/g8urzsag0j-update-or-insert-airtable-records#configure_airtable_api_key) to do that. The connection page screenshot is below.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6slz4g81rxbm2mpyrn3.png)
With this, your Byteline Flow Designer is now fully setup to fetch data from the Reddit and add or update into Airtable Base records.

## Conclusion ##
In this article today, we covered how one can use Byteline's Reddit API to extract and feed into an Airtable Base. While there might be numerous use-cases of doing so, the reason is always the same - which is to leverage Reddit's vast amount of informational content.

While Reddit is known for its user-generated stories, Airtable is a unique platform that blends the features of a spreadsheet and database. To connect both of these together, Byteline through its no-code platform helps you generate an extract-to-load workflow in a few simple steps without writing a single line of code.

Try it once, and let us know if you have any feedback.

If you have a platform with which you would like a Byteline integration, you can [request us here](https://www.byteline.io/contact-us).

*This article was originally published on https://www.byteline.io/blog/extracting-reddit-data-to-airtable and has been authorized by Byteline for a republish.*