🥳 Celebrate Our Launch With a $200 LIFETIME Discount OFF The Premium Plan Use: BIRTHDAY2024

This offer expires 9/30/2024, at 11:59 PM EST

BizStackPro all-in-one digital marketing platform dashboard.
Workflow Premium Action: Custom Code – BizStackPro Help

Workflow Premium Action: Custom Code

Unlock advanced automation logic with custom JavaScript, external API calls, and AI-generated code inside workflows.

Extending Automation Beyond Built-In Features Instead of Accepting Workflow Limitations

Most business automation needs can be handled using standard workflow actions, but some situations require custom calculations, unique business rules, advanced integrations, or specialized data processing that cannot be accomplished through prebuilt tools alone.

BizStackPro's Custom Code workflow action allows businesses to execute JavaScript directly inside workflows, creating opportunities to build highly customized automation logic, interact with external APIs, transform data, and support advanced business processes.

Without custom workflow logic, businesses may encounter limitations when integrating specialized systems, implementing unique operational requirements, automating complex calculations, or building workflows that extend beyond standard automation capabilities.

This guide explains how the Custom Code action works, how workflow data can be passed into code, and how businesses can create advanced automation solutions inside BizStackPro.

Before writing custom workflow code, it helps to understand how workflow variables, JavaScript execution, API integrations, data transformation, asynchronous processing, business logic, and automation architecture work together inside BizStackPro.

Overview

Custom Code is a Premium Workflow Action that allows you to write custom JavaScript directly inside BizStackPro workflows. It’s designed for advanced automation scenarios where pre-built actions aren’t flexible enough—like custom calculations, data transformations, or calling external APIs.

When should you use Custom Code?

  • When built-in actions can’t meet your logic requirements
  • When advanced calculations or transformations are required
  • When integrating with third-party APIs
  • When building reusable, scalable automation logic

Good to know: Custom Code is best used for targeted logic. If a standard action can do the job, keep it simple and use the standard action first.

How to use the Custom Code action

  1. Identify the logic that cannot be handled by standard workflow actions.
  2. Open the Workflow Builder and add a new action.
  3. Select Custom Code from Premium Actions.
  4. Write your JavaScript logic in the editor.
  5. Map values using Input Data.
  6. Test the code.
  7. Save and publish the workflow.

Using Input Data

Values from previous steps can be passed into Custom Code using Property fields. These values are accessible through the InputData object.

Example

const email = InputData.email;
const score = InputData.leadScore;

Tip: Name your properties clearly (example: leadScore, orderTotal, source) so your code stays readable.

Asynchronous logic

Custom Code supports async functions and return statements, allowing API calls and asynchronous operations to pass results to the next workflow step.

Best practice: Always handle errors (try/catch) so a failed request doesn’t break your workflow unexpectedly.

External HTTP requests

You can make outbound HTTP requests directly from Custom Code using supported methods:

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS

Security note: Avoid logging secrets (API keys, tokens) in console.log(). Use environment-safe storage where available.

AI-powered code generation

The Build with AI feature can generate starter JavaScript logic from plain-language descriptions, helping you move faster without writing code from scratch.

Prompt example

“Take InputData.orderTotal, calculate tax at 7.5%, then return an object with subtotal, tax, and total.”

Testing and debugging

  • Testing is required before publishing workflows
  • Only contact data is passed during tests
  • console.log() output is displayed in the test panel
  • Logs help validate logic and troubleshoot errors

Debug tip: Log only what you need (input values and final output) so the test panel stays clean and readable.

Important reminders

  • Custom values are not included during testing
  • Output must return an object or an array of objects
  • Always test before enabling workflows in production

Workflow planning: If downstream actions need values from your code, return them in a consistent object structure so they’re easy to reference later.

Build advanced automations with confidence

Custom Code gives you full control when standard workflow actions aren’t enough.

Frequently Asked Questions

What is Custom Code in workflows?

Custom Code allows you to write tailored JavaScript logic inside workflows to perform tasks not possible with pre-built actions.

Can I use asynchronous functions in Custom Code?

Yes. You can use async functions with return statements to handle asynchronous operations efficiently.

How do I pass data into Custom Code?

Use the Input Data (Property fields) to map values from previous triggers or actions into the InputData object.

Does Custom Code support HTTP requests?

Yes. Custom Code supports external HTTP requests including GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.

Is testing required before using Custom Code?

Yes. Testing is mandatory to ensure reliability and compatibility with subsequent workflow actions.

Unlock the highest level of workflow flexibility

When you need custom logic, API integrations, or advanced transformations, Custom Code can power the exact behavior you want— as long as you test thoroughly and return clean output for the next steps.

✅ View Plans & Features

More control. Better automation.

Disclaimer: This site is NOT endorsed by Google, Facebook or YouTube in ANY WAY. All trademarks & Logo / branding are the property of their respective owners. Please Note: This site was created in BizStackPro by Ken George II (An Affiliate of BizStackPro) and may contain affiliate links.

All About BizStackpro


Copyrights 2024 | AllAboutBizStackPro.Com | Pricing | About | Features | All Rights Reserved.