Snowflake

A data warehouse built for the cloud

Integrate the Snowflake API with the X (Twitter) API

Setup the Snowflake API trigger to run a workflow which integrates with the X (Twitter) API. Pipedream's integration platform allows you to integrate Snowflake and X (Twitter) remarkably fast. Free for developers.

Search Tweets with Twitter API on New Database from Snowflake API
Snowflake + X (Twitter)
 
Try it
Search Tweets with Twitter API on New Deleted Role from Snowflake API
Snowflake + X (Twitter)
 
Try it
Search Tweets with Twitter API on New Deleted User from Snowflake API
Snowflake + X (Twitter)
 
Try it
Search Tweets with Twitter API on New Role from Snowflake API
Snowflake + X (Twitter)
 
Try it
Search Tweets with Twitter API on New Schema from Snowflake API
Snowflake + X (Twitter)
 
Try it
New Row from the Snowflake API

Emit new event when a row is added to a table

 
Try it
New Query Results from the Snowflake API

Run a SQL query on a schedule, triggering a workflow for each row of results

 
Try it
Failed Task in Schema from the Snowflake API

Emit new events when a task fails in a database schema

 
Try it
New Database from the Snowflake API

Emit new event when a database is created

 
Try it
New Deleted Role from the Snowflake API

Emit new event when a role is deleted

 
Try it
Search Tweets with the X (Twitter) API

Retrieve Tweets from the last seven days that match a query. See the documentation

 
Try it
Add User To List with the X (Twitter) API

Add a member to a list owned by the user. See the documentation

 
Try it
Create Tweet with the X (Twitter) API

Create a new tweet. See the documentation

 
Try it
Insert Multiple Rows with the Snowflake API

Insert multiple rows into a table

 
Try it
Delete Tweet with the X (Twitter) API

Remove a posted tweet. See the documentation

 
Try it

Overview of Snowflake

Snowflake offers a cloud database and related tools to help developers create robust, secure, and scalable data warehouses. See Snowflake's Key Concepts & Architecture.

Getting Started

1. Create a user, role and warehouse in Snowflake

Snowflake recommends you create a new user, role, and warehouse when you integrate a third-party tool like Pipedream. This way, you can control permissions via the user / role, and separate Pipedream compute and costs with the warehouse. You can do this directly in the Snowflake UI.

We recommend you create a read-only account if you only need to query Snowflake. If you need to insert data into Snowflake, add permissions on the appropriate objects after you create your user.

2. Enter those details in Pipedream

Visit https://pipedream.com/accounts. Click the button to Connect an App. Enter the required Snowflake account data.

You'll only need to connect your account once in Pipedream. You can connect this account to multiple workflows to run queries against Snowflake, insert data, and more.

3. Build your first workflow

Visit https://pipedream.com/new to build your first workflow. Pipedream workflows let you connect Snowflake with 1,000+ other apps. You can trigger workflows on Snowflake queries, sending results to Slack, Google Sheets, or any app that exposes an API. Or you can accept data from another app, transform it with Python, Node.js, Go or Bash code, and insert it into Snowflake.

Learn more at Pipedream University.

Connect Snowflake

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { promisify } from 'util'
import snowflake from 'snowflake-sdk'

export default defineComponent({
  props: {
    snowflake: {
      type: "app",
      app: "snowflake",
    }
  },
  async run({steps, $}) {
    const connection = snowflake.createConnection({
      ...this.snowflake.$auth,
      application: "PIPEDREAM_PIPEDREAM",
    })
    const connectAsync = promisify(connection.connect)
    await connectAsync()
    
    async function connExecuteAsync(options) {
      return new Promise((resolve, reject) => {
        connection.execute({
          ...options,
          complete: function(err, stmt, rows) {
            if (err) {
              reject(err)
            } else {
              resolve({stmt, rows})
            }
          }
        })
      })
    }
    
    // See https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html#executing-statements
    const { rows } = await connExecuteAsync({
      sqlText: `SELECT CURRENT_TIMESTAMP()`,
    })
    return rows
  },
})

Connect X (Twitter)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { axios } from "@pipedream/platform"
import twitter from "@pipedream/twitter"
export default defineComponent({
  props: {
    twitter
  },
  async run({steps, $}) {
    const config = {
      url: `https://api.twitter.com/2/users/me`,
      params: {
        "user.fields": `created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld`,
        expansions: `pinned_tweet_id`,
      },
    }
    const headers = this.twitter._getAuthHeader(config)
    return await axios($, {
      ...config,
      headers
    })
  },
})
Using Event Sources and Workflows: Analyze Twitter Sentiment in Real-Time and Save to Google Sheets
Using Event Sources and Workflows: Analyze Twitter Sentiment in Real-Time and Save to Google Sheets
Learn how you can use Pipedream event sources and serverless workflows to listen for new Twitter mentions, analyze the sentiment of each Tweet using the npm sentiment package (https://www.npmjs.com/package/sentiment), and then save that data to Google Sheets in real-time.
Entering Data in Params Forms
Entering Data in Params Forms
Learn about the new model to enter expressions and reference previous step exports in params forms.
Managing the Concurrency and Execution Rate of Workflow Events
Managing the Concurrency and Execution Rate of Workflow Events
Managing the Concurrency and Execution Rate of Workflow Events.

Community Posts

A Look at Pipedream
A Look at Pipedream
I'm going to build a workflow that will search Twitter every hour for a keyword. It will take the results, format them nicely, and then email it.
Building a Google Sheets Twitter Bot with Pipedream
Building a Google Sheets Twitter Bot with Pipedream
This is something that's been kicking around my head for a week or so and today I thought I'd try it. It ended up taking about 20 minutes total and 10 lines of code, of which 5 are a function I copied and pasted. While what I built is kind of trivial, I'm blown away by how much was done by built-in functions with Pipedream and how little work I had to do myself. In fact, most of my time was spent in setting stuff up outside of Pipedream itself. Alright, so what did I build?
Building a Twitter Bot in Pipedream
Building a Twitter Bot in Pipedream
I did this by parsing information from the GI Joe wikipedia site and implementing it on Pipedream's platform. I'm going to share how I built it, but be aware that roughly 95% of the work was involved in getting my random character. The aspects that pertain to Pipedream were incredibly simple - which is what you want in a platform.
Using State in Pipedream Workflows
Using State in Pipedream Workflows
I did this by parsing information from the GI Joe wikipedia site and implementing it on Pipedream's platform. I'm going to share how I built it, but be aware that roughly 95% of the work was involved in getting my random character. The aspects that pertain to Pipedream were incredibly simple - which is what you want in a platform.
Building a Twitter Scheduling System with Pipedream and Google Sheets
Building a Twitter Scheduling System with Pipedream and Google Sheets
A few months ago, I blogged about how I used Pipedream and Google Sheets to create a Twitter bot. The idea was simple - read a sheet - select a random row - and use that as the source of a new Tweet. I was thinking about this recently and how useful Google Sheets can be as a "light weight CMS" and figured out another interesting use case - Twitter scheduling.
A demo of using the Twitter API, via Pipedream, to render the images from a Twitter account.