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.

Go to site

Node API Integrations

Build and run workflows using the Node API. Use 1000s of source-available triggers and actions across 2,000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

Develop, run and deploy your Node.js code in Pipedream workflows, using it between no-code steps, with connected accounts, or integrate Data Stores and File Stores.

This includes installing NPM packages, within your code without having to manage a package.json file or running npm install.

Below is an example of installing the axios package in a Pipedream Node.js code step. Pipedream imports the axios package, performs the API request, and shares the response with subsequent workflow steps:

1
2
3
4
5
6
7
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
  async run({ steps, $ }) {
    // Return data to use it in future steps
    return steps.trigger.event
  },
})

Choose an API to Connect with Node API

1
-
24
of
2,000+
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.
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.
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 models like ChatGPT, DALL-E, and Whisper.
Salesforce (REST API)
Salesforce (REST API)
Web services API for interacting with Salesforce
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify Developer App
Shopify Developer App
Shopify is a user-friendly e-commerce platform that helps small businesses build an online store and sell online through one streamlined dashboard.
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Snowflake
Snowflake
A data warehouse built for the cloud
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
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.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.

Getting Started

To add a Node.js code step, open a new workflow and include a step.

  1. Select the Node app:

Node.js app being chosen in Pipedream's new step selector screen.

  1. Then select the Run Node Code action:

Selecting the 'Run Node Code' action from the Node app in the Pipedream interface.”

Now you’re ready to write some code!

On the right, you'll see the default code provided by Pipedream:

// To use any npm package, just import it
// import axios from "axios"

export default defineComponent({
  async run({ steps, $ }) {
    // Reference previous step data using the steps object and return data to use it in future steps
    return steps.trigger.event
  },
})

You can write your custom code within the run function. run is called when this step executes in your workflow.

When you click Test on the Node.js code step, it will display the event data from your trigger step. For instance, if your trigger is an HTTP request, then the HTTP request data will be returned.

This step can execute any Node.js code. However, the run function, a special Pipedream callback, must be set up correctly to return data. Otherwise, you can run arbitrary code that:

Developing pre-built actions and triggers

Pipedream’s pre-built actions and triggers (a.k.a. Sources) are built using Node.js. These components allow you to quickly build workflows by reusing logic with different inputs (also known as props).

These components are open source. You can fork the Pipedream repository and modify these components to your needs. You can even publish private actions and sources to your workspace for you and your team’s own use.

You can also contribute actions and triggers to Pipedream’s Registry which are published on Pipedream’s App Marketplace. Publishing your app on Pipedream integrates it for use with code steps as well as streamlined integrations with your own pre-built actions and triggers.

Components can be deployed to your workspace by using the Pipedream CLI, or within your workflows Node.js code steps directly.

To get started:

AI code generation

Generate Pipedream compatible Node.js code within your workflow with human language.

To get started, open a Node.js step and select the Edit with AI button.

Initiating an AI code generation session from a Node.js code step in the Pipedream workflow editor.

Then, enter your prompt to generate code. Selecting a specific app generates the necessary integration code for API requests.

For example, select the Slack app and use the prompt:

Send a message to a public channel

This prompt will generate the corresponding code to send an API request to Slack and perform the action using your connected Pipedream account.

Run Node Code with Node API on New Requests from HTTP / Webhook API
HTTP / Webhook + Node
 
Try it
Run Node Code with Node API on New product added to custom collection from Shopify (Developer App) API
Shopify Developer App + Node
 
Try it
Run Node Code with Node API on New Calendar Event Update (Instant) from Microsoft Outlook Calendar API
Microsoft Outlook Calendar + Node
 
Try it
Run Node Code with Node API on New Item in Feed from RSS API
RSS + Node
 
Try it
Run Node Code with Node API on New Message from Discord API
Discord + Node
 
Try it
Run Node Code with the Node API

Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.

 
Try it

Troubleshooting

Pipedream will show your error traces within your individual steps, under the Logs section.

Traces across all of your workflows are also available within the Event History in your Pipedream workspace. This gives a global view of all failed executions, and gives you the tools to filter by workflow, time occurred and more.

Pipedream Specific Errors

If there’s an issue with a specific Pipedream level construct, you’ll see specific error messages within the step itself.

Configuration Error

A ConfigurationError can occur if the props for the code step are invalid. For example, if you’re attempting to update a Google Calendar event, but the end_date is before the start_date, then the action may throw a specific ConfigurationError to signal this action isn’t possible.

As a Pipedream action or source developer, you can also leverage ConfigurationErrors to guide users of your action or source to pass appropriate data to props in order for the component to function properly.

For more details, visit the Configuration Error documentation.

Active Handle Error

If your code is performing an asynchronous action that is not properly awaited, you may see an error.

This error means that control has moved onto the next step, but there were unresolved promises within your Node.js code.

To keep Pipedream from moving onto the next step, use await on your promises to hold execution until the promise finishes.

Read our docs on implementing asynchronous code in Node.js code steps.

Authentication

The Node API does not require authentication.

Community Posts

Automate checking a ticket system's availability with Node.js and Pipedream
Automate checking a ticket system's availability with Node.js and Pipedream
How I used Node.js and Pipedream to automatically scrape a ticket booking site and notify me if availability had changed.