Share via


CustomJS (Preview)

Execute custom JavaScript code in workflows with NPM module support. Generate PDFs, capture screenshots, transform data, parse files (CSV, XML, JSON, Excel), and integrate with any API. Secure execution environment. Get your API key at https://www.customjs.space

This connector is available in the following products and regions:

Service Class Regions
Copilot Studio Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name CustomJS Support
URL https://www.customjs.space
Email h@customjs.io
Connector Metadata
Publisher TechnologyCircle GmbH
Website https://www.customjs.space
Privacy policy https://www.customjs.space/terms-and-conditions/
Categories IT Operations;Productivity

CustomJS

Publisher: TechnologyCircle GmbH

Unlock new possibilities for your workflows: Execute JavaScript with NPM modules, create PDFs, capture screenshots, and more.

Prerequisites

You will need the following to proceed:

Supported Operations

The connector supports the following operations:

Execute JavaScript Code

Execute custom JavaScript code with your input data. The code can reference NPM modules and use the 'input' variable.

Parameters:

  • Input Value: The input string that will be available as the 'input' variable in your JavaScript code
  • JavaScript Code: Your JavaScript code to execute. Reference the input using the 'input' variable

Example:

// Input: "hello"
// Code:
return 'prefix ' + input + ' suffix';
// Result: "prefix hello suffix"

How to get credentials

  1. Visit https://www.customjs.space
  2. Sign up for a free or paid account
  3. Navigate to your dashboard
  4. Generate an API key
  5. Copy the API key for use in creating your connection

Get started with your connector

Once you have your API key:

  1. In Power Automate, create a new connection to CustomJS
  2. Enter your API key when prompted
  3. Use the "Execute JavaScript Code" action in your flows
  4. Provide your input value and JavaScript code
  5. The action will return the result of your code execution

Known Issues and Limitations

  • JavaScript execution is subject to timeout limits (typically 30 seconds)
  • Code must return a value to see results in your flow
  • Some NPM modules may not be available depending on your CustomJS subscription plan
  • Rate limits apply based on your CustomJS subscription tier

For the most up-to-date information on capabilities and limitations, please visit our documentation at https://www.customjs.space

Common Errors and Troubleshooting

"Unauthorized" Error

  • Verify your API key is correct
  • Check that your CustomJS subscription is active
  • Ensure the API key hasn't expired

"Execution Failed" Error

  • Check your JavaScript code for syntax errors
  • Verify that the input format matches what your code expects
  • Ensure your code returns a value

Timeout Errors

  • Optimize your JavaScript code for better performance
  • Consider breaking complex operations into smaller steps
  • Check if your code has infinite loops or blocking operations

FAQ

Q: What JavaScript features are supported?
A: CustomJS supports modern JavaScript (ES2020+) with access to many NPM modules. Check the CustomJS documentation for the complete list of available modules.

Q: Can I use external APIs in my JavaScript code?
A: Yes, you can make HTTP requests and call external APIs from your JavaScript code.

Q: How do I debug my JavaScript code?
A: Use console.log() statements in your code. The output will be available in the action results.

Q: What's the maximum execution time?
A: The default timeout is 30 seconds. Contact CustomJS support if you need longer execution times.

Deployment Instructions

  1. Search for "CustomJS" in the Power Automate or Power Apps connector gallery
  2. Create a new connection using your API key
  3. Start building flows with the Execute JavaScript Code action

Support and Additional Resources

For technical support or questions about the connector, please contact h@customjs.io

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
api_key securestring The api_key for this api True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Execute JavaScript Code

Runs JavaScript code remotely via your CustomJS API key. The code can reference the input variable and use NPM modules.

Execute JavaScript Code

Runs JavaScript code remotely via your CustomJS API key. The code can reference the input variable and use NPM modules.

Parameters

Name Key Required Type Description
Input Value
input True string

User-provided input string that can be referenced in your JavaScript code.

JavaScript Code
code True string

JavaScript code to execute. Reference the input using the input variable.

Returns

The result of the JavaScript execution

response
string

Definitions

string

This is the basic data type 'string'.