Quick start guide
We'll show you how to setup a workflow that stores Stripe customer updates in a MongoDB cluster

Extract events

The first thing we need to do is extract events from our team's APIs and DBs. To do so, you can choose from a suite of available Connectors:
In this quick start example, we're going to extract events from a Stripe account:

Add a Connection

  1. 1.
    In the Connections panel, click the +new button
  2. 2.
    Open the Source category and select Stripe
  3. 3.
    Add your Stripe Secret Key
  4. 4.
    Click Connect
  5. 5.
    Select the events you'd like to subscribe to
  6. 6.
    Click Subscribe

Assign a trigger event

  1. 1.
    Select an existing workflow or create a new one
  2. 2.
    Attach an event as the trigger
Assigning the customer.created event as the trigger for a workflow
Once assigned, the selected event will always trigger the workflow while the trigger is enabled.

Transform the data

Now that you have your trigger connected, you can do whatever you want to your event data using actions. Actions are written in regular JavaScript. To add custom logic, like conditionals or other functions, you can use our custom Serverless, Axios and GraphQL action blocks.

Action the data

Once your data is the way you want it, you can choose from over 3,000+ API templates to action it. To view a full list of templates, view our catalog:
In this example, we're going to use a MongoDB Insert Document action to load the data into an existing MongoDB cluster.

Add a Connection

  1. 1.
    In the Databases panel, click the +new button
  2. 2.
    Select the MongoDB type
  3. 3.
    Choose the Connect Existing option
  4. 4.
    Add your MongoDB URI
  5. 5.
    Click Connect
When adding Database Connectors, make sure you whitelist Buildable's IP so we can successfully connect to the instance.

Add an action

  1. 1.
    In your Workflow, click the + new action button
  2. 2.
    Open the MongoDB category
  3. 3.
    Select the Insert Document action

Grab the data

Using the event payload, we can see the data structure sent from Stripe. The data we want is found in data.object.
So, to grab the customer data we want in our MongoDB action, we'll open the Input section and use $body.data.object.name and $body.data.object.email
const nodeInput = ({ $body, $headers, $env, $actions }) => {
return {
MONGODB_CONNECTION_KEY: $env.MONGODB_CONNECTION_KEY, // Required
collection: "customers", // Required
name: $body.data.object.name,
email: $body.data.object.email
};
};

Watch the full demo