Skip to content
Hot Local Business

Custom code steps

Run custom code inside workflows, with AI-assisted code generation.

Why it matters

Handle special cases your process needs.

The HLB difference

Code runs inside the workflow with access to its data.

How it works

Add custom code steps to a workflow, with AI help writing the code, for special cases.

Custom code steps let you run your own JavaScript inside a workflow, for logic the built-in actions do not cover. It is a premium action that gives you more control over complex tasks and lets you connect to services that are not built in.

For a local service business, you might reformat phone numbers or dates, calculate a discount, route leads by specific rules or send data to an outside service.

Key steps

  • In a workflow, click the plus icon, search for Custom Code and add it.
  • Add properties to bring in values from earlier triggers or actions. Enter a key, pick a value with the custom value picker, and use it in your code as inputData.keyName.
  • Write your code in the editor, starting from the sample provided. The output must be a JavaScript object or a list of objects.
  • Use the HTTP Request button to add a request to an outside service (such as GET, POST, PUT or DELETE).
  • Click Run Test. You must test the code, because untested code gives no output to later steps. Console logs are captured to help you find problems.

During a test, only contact information is passed in. Other custom values and properties are not.

Build with AI (beta)

If you would rather not write code yourself, click Build with AI. Describe what you need in plain language, for example converting a date from MM-DD-YYYY to YYYY-MM-DD, and click Generate. The assistant writes the code and adds the input properties it needs. To change it, describe the change and click Regenerate. When you are happy, click Use Code to add it to your workflow.

Ready to put this to work in your business?

Start onboarding with the Max Digital Edge team and get set up on Hot Local Business.

Start onboarding