Menu icon
  When to Use an AI Task versus a Code Task

When to Use an AI Task versus a Code Task

Updated November 3, 2026
Who can use this feature
Related subproduct  Integrations
Available on  All plans

Process Street gives you two powerful ways to automate logic and decisions inside your workflows: AI Tasks and Code Tasks.

Both can process data, make decisions, and generate outputs, but they work in very different ways. Understanding which one to use will help you design accurate and reliable workflows.

AI Tasks: Great for Reasoning and Language-Based Work

AI Tasks use large language models (LLMs) to understand, interpret, and generate text.

They’re best suited for subjective, flexible, or context-based work that requires reasoning rather than hard rules.

Use an AI Task when your workflow needs to:

  • Summarize, extract, or interpret natural language
  • Generate or classify text (emails, reports, descriptions, insights)
  • Make a judgment call or pattern-based decision (e.g. sentiment, intent, risk rating)
  • Fill gaps in unstructured data
  • Automate repetitive writing or reading tasks

Because AI models are probabilistic, you may see slightly different outputs even with the same input. That’s expected.

Example use cases:

  • Summarizing a customer feedback comment into a short insight
  • Extracting key terms from a legal document
  • Generating an onboarding email based on role and department
  • Classifying a support ticket’s tone or urgency

A Code Task is a better fit if you need explicit control over the logic.

Code Tasks: Great for Precision and Predictability

Code Tasks let you run JavaScript to apply explicit, rule-based logic. They’re best when you need full control over what happens and how the output is calculated.

Use a Code Task when your workflow needs to:

  • Calculate, compare, or transform structured data
  • Validate inputs or apply strict business rules
  • Connect to APIs or external systems with full control over the request
  • Handle numeric or boolean logic (“if this, then that”)
  • Produce repeatable results with rule-based scripts

Example use cases:

  • Checking if a due date is within the next 7 days
  • Calculating tax or pricing logic
  • Validating data before submission
  • Sending data to an external system API

Choosing the Right Task Type

Use Case Best Option Why
Parsing or summarizing free text AI Task Handles natural language with flexibility
Enforcing strict validation or rules Code Task Explicit rules you control completely
Automating creative or judgment-based tasks AI Task Can reason and adapt to context
Data transformations or math Code Task Exact, reliable calculations
Workflow needs to adapt over time AI Task Learns from varied inputs and phrasing
Workflow needs explicit, controlled logic Code Task You control every step of the logic

Design Tip

If the workflow’s success depends on exact, repeatable results, start with a Code Task.

If the workflow depends on understanding or generating text, start with an AI Task.

For complex workflows, combine them. For example, use an AI Task to interpret an answer and then a Code Task to validate or act on it.

Key Takeaways

  • AI Tasks are probabilistic — perfect for flexible reasoning and natural language work.
  • Code Tasks are explicit: your script runs exactly as written, so rule-based logic produces consistent results.
  • Use AI Tasks for interpretation, Code Tasks for enforcement.
  • You can combine both to balance intelligence and control.

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

Choose which optional cookies to allow. You can change or withdraw consent here at any time.