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

When to Use an AI Task versus a Code Task

Updated November 5, 2025
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 identical outputs every time.

Code Tasks: Great for Precision and Predictability

Code Tasks execute scripts in JavaScript using exact, deterministic logic. They’re best when accuracy must be 100% consistent every time a workflow runs.

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 where output must not vary
  • Handle numeric or boolean logic (“if this, then that”)
  • Guarantee identical results for the same input

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 Predictable, deterministic outcomes
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 must always behave identically Code Task Same output for the same input, every time

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 deterministic — perfect for precise, rule-based logic.
  • 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