Menu icon
  When to Use a Code Task versus an API Call

When to Use a Code Task versus an API Call

Updated April 7, 2026
Who can use this feature
Related subproduct  Integrations
Available on  All plans

Code Tasks and API Calls are both ways to make your workflows smarter and more automated. They let you process data, apply logic, and connect systems together. The difference is where the work happens.

A Code Task handles logic and data inside Process Street, while an API Call connects your workflow to something outside Process Street.

Knowing which to use helps you keep your workflows efficient, predictable, and easy to maintain.

When to Use a Code Task

A Code Task is best when you need to run logic or data operations that don’t require reaching another system.

It runs directly inside your workflow using JavaScript and is ideal for quick processing or validation.

Use a Code Task when you want to

  • Calculate or compare values
  • Transform or clean up data between steps
  • Parse JSON or text before passing it to another task
  • Validate input or check for missing information
  • Apply conditional logic without calling an external API

Code Tasks are faster and simpler because they don’t depend on an internet request. Everything runs locally inside the workflow run.

Example use cases

  • Checking whether a due date is within seven days
  • Formatting names, numbers, or dates before saving them
  • Validating form responses before submission
  • Extracting part of a string (for example, the domain from an email address)

When to Use an API Call

An API Call is best when your workflow needs to talk to another system. It sends or retrieves data using that system’s API, letting you connect Process Street with your existing stack.

Use an API Call when you want to

  • Send data to another platform such as Salesforce, HubSpot, or Slack
  • Pull information from another tool (like a customer record or project ID)
  • Create or update items in external databases or apps
  • Trigger actions that happen outside Process Street

API Calls require an internet connection and the correct credentials or API keys for the system you’re calling.

Example use cases

  • Sending a notification to Slack when a workflow completes
  • Pushing form data to a CRM record
  • Pulling updated client details from an external database
  • Creating a ticket in a helpdesk system like Zendesk or Jira

Choosing Between the Two

If your task is about logic, calculations, or transformations, use a Code Task.

If it’s about communication or integration, use an API Call.

You can also combine them. A Code Task can prepare or format data, and an API Call can send that data to another tool.

Key Takeaways

  • Code Tasks handle internal logic and data operations.
  • API Calls handle communication with external systems.
  • Code Tasks are faster and self-contained.
  • API Calls extend your workflows across your tech stack.
  • Use both together when you want precision inside Process Street and connectivity beyond it.

Discover Process Street

Use Process Street to make your team processes fun, fast and faultless. We'll help you transform your team's static checklists into powerful interactive workflows!
Is this article helpful?

Help us improve this help center.

Learn more about Process Street

YouTube videos
Deep dive into Process Street with our YouTube video series.
Join a webinar
Effectively record, replicate, and replace your workflow!
See latest releases
Catch up on the latest releases and enhancements.
Join the community
Share with others about how you are using the app day to day.

Take control of your workflows today