DCKAP Integrator
Getting StartedIntegrator StatusRoadmapRelease Notes
  • Overview
    • Enterprise Integration Platform
    • What is DCKAP Integrator?
    • Integrator Architecture
    • Integrator Security
  • GETTING STARTED
    • Quick Start Guide
    • New User Registration
      • Available Plans
    • Integrator Dashboard
    • Analytics
  • User Guide
    • The Basics
    • Account Management
      • User Groups
      • Account Settings
      • Two-Factor Authentication
    • Projects
      • Add New Project
      • Managing Projects
      • Transfer Project Ownership
    • API Access Keys
    • Project Invitations
    • Help and Support
      • Raise a Ticket
      • Visibility and Collaborators
      • Help and Support - A Quick Overview
    • Exchange
  • PROJECT MANAGER
    • Integrations
      • Add New Pipe
      • Flows and Handlers
      • Mapping and Modifiers
      • Advanced Modifiers
      • Advanced Scheduler
    • Workflows
      • Flow Builder
      • Snippets
      • Actions
        • API Call
        • Console
        • Decision
        • Loop
        • Detail Logger
        • Error Logger
        • Code Runner
        • Formatter
        • Notification
        • Snippet
        • Return
        • Sleep
      • Mock Data
      • FAQs
    • Systems
      • Credentials
      • API Manager
        • API Components
        • Test API
      • Private Systems
      • Authentication Types
        • OAuth 2.0
    • Logs
    • Project Settings
    • Project Analytics
    • Advanced
      • Flows
    • Project Documents
  • TECHNICAL GUIDE
    • Flows & Handlers
      • Add New Flow
      • Simulator
      • Flows: Best Practices
      • Flows: Use Cases
      • Timezone Converter Handler
      • Supported Timezones
    • API and Mapping
  • Tutorials
    • Create a new Integration Pipe
    • Create a new Flow
    • How to Map data?
    • Working with Modifiers
    • Managing User Groups
    • How to use DCKAP Integrator Dynamic URL's?
  • API Documentation
    • Quick Start
    • Projects API
    • Credentials API
    • Templates API
    • Posting and Reading XML data via DCKAP Integrator
    • Commonly used APIs
  • Others
    • Product Roadmap
      • Past Roadmaps
    • Release Notes
      • 4.4.0 April 29, 2025
      • 4.3.0 February 25, 2025
      • 4.2.0 December 19, 2024
      • 4.0.0 August 29, 2024
      • 3.4.8 May 27, 2024
      • 3.4.7 March 14, 2024
      • 3.4.6 January 4, 2024
      • 3.4.5 October 18, 2023
      • 3.4.4 May 16, 2023
      • 3.4.3 March 1, 2023
      • 3.4.2 December 20, 2022
      • 3.4.1 October 4, 2022
      • 3.4.0 August 10, 2022
      • 3.3.6 July 20, 2022
      • 3.3.5a June 23, 2022
      • 3.3.5 May 26, 2022
      • 3.3.4 March 31, 2022
      • 3.3.3 Feb 4, 2022
      • 3.3.2 November 24, 2021
      • 3.3.1 October 22, 2021
      • 3.3.0 August 28, 2021
      • 3.2.7 June 18, 2021
      • 3.2.6 May 11, 2021
      • 3.2.3 and 3.2.4 March 8, 2021
      • 3.2.2 Dec 24, 2020
      • 3.2.1 Nov 12, 2020
      • 3.2.0 - October 7, 2020
      • 3.1.10 - September 16, 2020
      • 3.1.9 - September 3, 2020
      • 3.1.8 - August 15, 2020
      • 3.1.7 - July 19, 2020
      • 3.1.6 - June 21, 2020
      • 3.1.5 - May 15, 2020
      • 3.1.4 - April 27, 2020
      • 3.1.3.0 - April 20, 2020
      • 3.1.3 - April 8, 2020
      • 3.1.2 - March 26, 2020
      • 3.1.1 - March 13, 2020
      • 3.1.0 - March 10, 2020
Powered by GitBook
On this page
  • Restrictions
  • Use Cases
  • "response" Variable
  • Import is restricted
  • Built-in methods
  • Execution Time Limit
  • Modify Duplicate Previous Step Values

Was this helpful?

  1. PROJECT MANAGER
  2. Workflows
  3. Actions

Code Runner

PreviousError LoggerNextFormatter

Last updated 1 year ago

Was this helpful?

Code Runner allows the user to use Python code to perform operations.

The output should be stored in a variable called response at the end of Code Runner.

response = "Hello World"

The previous step responses from Data Hub can be used in Code Runner by enclosing the step number (optionally followed by a dot and variable name in case of nested structure) within double curly brackets.

email = {{1.response.customer.email}}
// Do something here

Restrictions

  • Allowed packages: JSON, datetime, math, re and time

  • Allowed built-in methods: min, max, len, range, all, any, bool, dict, enumerate, filter, float, int, isinstance, list, map, reversed and sum

  • Other than the above-specified packages and built-in methods, no other packages can be imported as Import is restricted.

Use Cases

"response" Variable

Code Runner should have a variable called response which holds the final result. If there is no variable called response, there will be a validation error.

Example 1:

response = {"ids": [1,3,5,6]}

Output:

{"ids": [1,3,5,6]}

Example 2:

def check(email):
    if(re.fullmatch(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b', email)):
        return True
    else:
        return False
response=check("abc@dckap.com")

Output:

True

Import is restricted

Importing other packages/modules is not allowed in Code Runner. If imported, the code will throw an error and will not be executed.

Example:

import pandas as pd
data = {"items": ['pen', 'pencil', 'sharpener'], "quantity": [50, 40, 45]}
df = pd.DataFrame(data)
response = df

Output:

Execution failed because import found in code

Built-in methods

The usage of built-in methods other than the listed methods is not supported.

Example 1: Using an allowed built-in method

a = [1,2,3,4]
response = min(a)

Output:

1

Example 2: Using a not allowed built-in method

a = [1,2,3,4]
response = type(a)

Output:

name 'type' is not defined

If any restricted methods are needed for you, reach out to us with your use case by raising a ticket in the Support Portal.

Execution Time Limit

3 minutes

If the code takes more than that for execution, a timeout occurs and an error is thrown.

Modify Duplicate Previous Step Values

Changing the result of the previous step is restricted in workflows. However, with the help of Code Runner, any previous step from the Data hub can be duplicated and modified. The response of Code Runner can be used where the modified data is needed.