DataMagik Script Engine v1.0

DataMagik Script Engine

Programmable Document Generation and Workflow Automation

Transform complex business processes into automated document workflows with custom JavaScript logic. The Script Engine gives you complete programmatic control over document generation—from data transformation and validation to multi-step workflows and external API integrations.

DataMagik Script Engine

DataMagik Script Engine

Execute custom code before rendering to prepare data, enforce business rules, and make dynamic decisions. Run post-processing scripts to trigger notifications, update external systems, or chain additional document generations. With full JavaScript runtime capabilities and seamless integration with DataMagik templates, you can automate even the most demanding document workflows.

Fully Integrated with DataMagik Automations

The Script Engine isn't just a standalone tool; it's a core component of the DataMagik Automations platform. This seamless integration allows you to trigger scripts from any automation workflow, pass data between automation steps and your code, and use your script's output to drive further actions. Combine the power of no-code automation with the flexibility of custom code, all in one unified environment.

HOW IT WORKS:

  1. Build: Write custom JavaScript in the web-based editor to fetch and transform your data.
  2. Configure: Set up test data, link credentials, and enable document generation settings.
  3. Execute: Run your script manually, trigger it via an API call, or schedule it for automated execution.
  4. Monitor: Review detailed logs, return values, and generated documents for every execution.
  5. Iterate: Utilize the built-in version history to update and manage your automation scripts safely.

KEY USE CASES:

  • Industry Specific Shippers and Documents
  • Complex compliance report generation
  • Multi-tenant SaaS applications
  • Invoice generation with external data lookups
  • Any scenario where template logic alone isn't enough

FEATURES:

Powerful Code Editor

Write, test, and deploy your automation scripts in a feature-rich, browser-based IDE. The editor features syntax highlighting, error checking, and a familiar interface, enabling you to construct complex logic, retrieve data from external APIs, and transform JSON payloads with ease.

Advanced Script Settings

Fine-tune every aspect of your script's execution. Configure settings like:

  • Script Name & Description: Keep your automations organized.
  • Test Input Context: Simulate real-world data payloads for robust testing.
  • Document Generation: Natively enable and configure PDF or other document outputs directly from your script.
  • Credentials & Security: Securely manage API keys and credentials.
  • Allowed Domains: Enforce security by whitelisting domains your scripts can interact with.

Robust Scheduling

Move beyond on-demand execution. Our flexible scheduler lets you run scripts at any interval:

  • Create new schedules with a powerful cron expression builder.
  • Manage all scheduled tasks from a central dashboard.
  • View next run times, last run status, and toggle schedules on or off.
  • Set specific time zones, timeouts, and retry logic for reliable execution.

Detailed Execution History

Gain complete visibility into every script run. Our detailed execution history logs every execution, whether scheduled or manually triggered. Quickly identify and troubleshoot issues by reviewing:

  • Run status (e.g., completed, failed)
  • Execution duration and start time
  • Type of run (e.g., scheduled, test)
  • Number of retries

In-Depth Run Analysis

Drill down into any single execution to see exactly what happened. The execution detail panel gives you access to:

  • Console Logs: View all console.log outputs from your script.
  • Return Value: Inspect the final JSON data returned by your script.
  • Generated Documents: Instantly access and download any documents (like PDFs) that were created during the run.

Complete Version Control

Develop with confidence. The Script Engine automatically saves a new version of your script with every change.

  • View a complete history of all versions.
  • See "Compare with Previous" to identify precisely what changed.
  • Instantly revert to any previous version with a single click.