Pipedream
Automate customer workflow
By combining Nile’s tenant-aware database with Pipedream’s workflow automation, you can build these integrations quickly and reliably, without getting lost in integration code. Pipedream has hundreds of integrations (over 2400 per their website), so you can truly connect your tenants to anything.
Integration Types
Pipedream supports two types of integrations with Nile:
- Nile as a trigger: Pipedream can run a query every few minutes and initialize a workflow based on the results. Perhaps updating your CRM when a tenant modifies their account in your application or email tenants after the create their 10th user.
- Nile as an action: Use this when you want to create a tenant, a user or run a query in Nile as a result of a trigger. Maybe you want to create a tenant when your sales team creates a new customer in Salesforce, or update tenant’s status based on payment events from Stripe.
Setting Up Your First Workflow
Lets start with a very simple example that you can try without having access to Stripe or Salesforce accounts. To try this out, you’ll need credentials for a Nile database and a Pipedream account.
Create a workflow
In Pipedream, create a workspace or choose an existing one. Then click on new to create a new workflow.
Set up HTTP trigger
We’ll use HTTP trigger, since those are simple to test. Click on Add trigger and then select New HTTP / Webhook Requests. Selecting a trigger
You can leave all the defaults as is and just click Save and continue. Click on Generate test event. This will send a simple HTTP request and Pipedream will show you all the available information about HTTP events. All these fields will be available in the workflow. HTTP event fields
Add Nile action
Now lets add Nile action to the workflow. Click on the + icon in the flow diagram, search for Nile and pick Execute Query action.
In the Action configuration, under Nile Database Account click on Connect Account. This will redirect you to Nile, where you’ll be able to give Pipedream access to your workspaces and databases. This is control-plane access. Pipedream will still require credentials to access any specific database.
Once you gave Pipedream access to Nile, you’ll be able to pick your workspace and database from the dropdown menus. Then, provide username and password credentials to the database you picked. Nile configuration
Configure the query
Finally, we tell Pipedream what query to run. Lets say that we simply want to log the HTTP request in a shared table. We can use the following query. Note how we use the values exported by the trigger in our query:
Before testing the pipeline, you’ll want to make sure the pipe table exists, otherwise the insert statement will fail:
Test the workflow
As the last step, click on Test and then check the pipe table in your database. If all went well, you’ll see something like this:
Hopefully this was fun. While HTTP triggers may not be what you are after, you can use the exact same steps to build all kinds of integrations. Simply pick a trigger, run a test to examine the available fields, and then add actions that use these fields. Each workflow can have as many triggers and actions as you need, so you can get quite fancy!
Real-World Integration Examples
Let’s look at a few useful B2B workflows that you can build with Nile and Pipedream:
New Customer (From product):
- Trigger: Nile
- Event: New tenant
- Actions: Add new customer in Hubspot
- Actions: Update team via Slack
New Customer (From sales team):
- Trigger: Hubspot
- Event: New Deal in Stage. Configure the source to only trigger on “won” deals.
- Actions: Create tenant in Nile
- Actions: Send welcome email via SendGrid
Support Ticket
- Trigger: Zendesk
- Event: New ticket
- Actions: Query Nile for more information about tenant - subscription type, number of users, etc.
- Actions: Update tenant metadata in Zendesk
- Actions: If ticket is high priority, send Slack message to customer success team
Subscription Cancelled
- Trigger: Stripe
- Event: Cancelled subscription
- Actions: Update tenant status in Nile
- Actions: Notify customer success team via Slack
Tips
When building these integrations, keep these tips in mind:
- Always Preserve Tenant Context: Make sure you’re passing tenant IDs through your entire workflow, especially when executing queries againt tenant data in Nile. Pipedream makes this easy by exporting event variables in each step.
- Handle Errors Gracefully: Things will go wrong. Set up proper error handling and notifications.
Was this page helpful?