DataMagik Automate

Updated Dec 5, 2025
DataMagik Automate

DataMagik Automations Guide

Create browser-based automations that trigger actions from any web page using the DataMagik Extend browser extension.

Table of Contents

  1. Overview
  2. Getting Started
  3. Creating Automations
  4. Action Types
  5. Parameter Configuration
  6. Permissions & Roles
  7. DataMagik Extend Browser Extension
  8. Use Cases
  9. Best Practices

1. Overview

DataMagik Automations extends your ERP and business applications with custom actions accessible directly from your browser. When installed, the DataMagik Automate browser extension adds custom buttons and actions to web pages based on the automations you configure.

Key Features:

  • Browser Integration — Adds buttons to existing web applications
  • Context-Aware — Actions can use URL parameters from the current page
  • Multiple Action Types — Navigation, webhooks, scripts, and AI chat
  • Permission-Based — Control who can access which automations
  • Parameter Passing — Pass data from page URLs to automation endpoints

Use Cases:

  • Add a "Print Label" button to your ERP order page
  • Create a "Generate Report" action that opens in a new tab
  • Trigger a webhook when clicking a custom button
  • Execute DataMagik scripts from any web page

2. Getting Started

Prerequisites

  1. DataMagik Account — Access to the DataMagik platform
  2. Browser Extension — DataMagik Automate installed in Chrome/Edge
  3. Permissions — Appropriate permissions to create automations

Installation Steps

  1. Navigate to DataMagik → Automations
  2. Install the DataMagik Automate browser extension (see Section 7)
  3. Configure the extension with your DataMagik credentials
  4. Create your first automation

3. Creating Automations

Step 1: Navigate to Automations

Go to DataMagik → Automations in the main menu.

Step 2: Click "Add Automation"

Click the blue Add Automation button in the top right.

Step 3: Configure Automation

Field Description Example:

Automation Name: Display name for the buttonPrint Shipping Label

Action Description: What this automation doesGenerates and prints a shipping label for the current order

Step 4: Add Actions

After creating the automation, click Edit to add actions.

4. Action Types

Each automation can have one or more actions. There are four main action types:

4.1 Navigation Actions

Navigate to a URL in a new window, tab, or the current window.

Configuration:

FieldDescriptionNavigation URLThe URL to navigate toOpen in new windowOpens in a pop-up windowOpen in new tabOpens in a new browser tabCopy current paramsPass URL parameters from current pageEnvironment-aware redirectHandles plex.com domain switching

Example - Open Order Details:

Navigation URL: https://app.datamagik.com/orders/view
Open in new tab: ✓
URL Parameters to Pass:
  - Source: order_id → Target: id

4.2 Webhook Actions

Call an external API or internal webhook endpoint.

Configuration:

FieldDescriptionWebhook URLThe endpoint to callAuthentication TypeNone, API Key, Bearer Token, or Basic AuthAPI KeyAPI key value (if using API Key auth)Bearer TokenToken value (if using Bearer auth)Username/PasswordCredentials (if using Basic auth)Response Header NameHeader to capture from response

Authentication Types:

Type Description

None No authentication

API Key Sent as X-API-Key header

Bearer Token Sent as Authorization: Bearer <token>

Basic Auth Username:password encoded in header

Example - Trigger Label Print:

Webhook URL: https://api.datamagik.com/automation/print-label
Authentication: Bearer Token
Token: sk_live_xxxxx
URL Parameters to Pass:
  - Source: order_id → Target: orderId
Static Values:
  - Key: format → Value: 4x6

4.3 Script Actions

Execute a DataMagik Script Engine script.

Configuration:

FieldDescriptionScript TemplateSelect from available scriptsDescriptionWhat the script doesParametersValues to pass to the script

The script receives parameters in the context object:

function main(context) {
  // Access URL parameters passed from automation
  const orderId = context.orderId;
  const customerId = context.customerId;

  // Execute your logic
  const order = tables.get("orders", orderId);
  documents.generate("Order Summary", order);

  return { success: true };
}

4.4 AI Chat Actions

Open an AI chat interface with context from the current page.

Configuration:

FieldDescriptionInitial PromptPre-filled message for the chatContext ParametersData to include in chat context

This allows users to interact with AI assistants while providing relevant context from their current work.

5. Parameter Configuration

Parameters allow automations to capture data from the current page URL and pass it to actions.

Required URL Parameters

Specify parameters that must be present in the current URL for the automation button to appear:

FieldDescriptionParameter NameURL parameter key (e.g., order_id)

Description Display name for the parameter

Example: If you add order_id as required, the automation button will only show on pages with ?order_id=123 in the URL.

URL Parameters to Pass

Map parameters from the current URL to your action:

FieldDescriptionSourceParameter name in current URLTargetParameter name to send to action

Example:

  • Source: user_id → Target: userId
  • Current URL: ?user_id=456
  • Passed to action: userId=456

Static Values

Add fixed values to every request:

FieldDescriptionKeyParameter nameValueFixed value

Example:

  • Key: source → Value: automation
  • Key: format → Value: json

6. Permissions & Roles

Control who can access automations through roles and permissions.

Managing Roles

Navigate to Manage Roles (visible to users with DataMagik - Security permission).

Creating a Role:

  1. Click Add Role
  2. Enter role name and description
  3. Assign permissions to the role
  4. Save

Managing Permissions

Navigate to Manage Permissions to see all available permissions.

Assigning Permissions to Automations:

  1. Edit an automation
  2. Go to the Permissions tab
  3. Select which roles can access this automation
  4. Save

User Role Assignment

Assign roles to users in the User Management section to control their automation access.

7. DataMagik Automate Browser Extension

The browser extension displays automation buttons on web pages.

Installation

Chrome/Edge:

  1. Go to the Chrome Web Store or Edge Add-ons
  2. Search for "DataMagik Automate"
  3. Click Add to Chrome / Add to Edge
  4. Pin the extension for easy access

Configuration

  1. Click the extension icon in your browser
  2. Enter your DataMagik credentials
  3. Configure settings:

Using the Extension

Once configured:

  1. Navigate to a web page with matching URL parameters
  2. Automation buttons appear in the extension popup
  3. Click a button to execute the automation
  4. View results in notifications or new windows

8. Use Cases

Use Case 1: Print Labels from ERP

Scenario: Add a "Print Label" button to your ERP's order detail page.

Setup:

  1. Create automation: "Print Shipping Label"
  2. Add required parameter: order_no
  3. Add webhook action:
  • URL: https://your-api.com/print-label
  • Auth: Bearer Token
  • Parameters: order_no → orderNumber

Result: When viewing an order in your ERP (?order_no=12345), clicking the button triggers label printing.

Use Case 2: Generate Report in New Tab

Scenario: Open a custom report page with context from current view.

Setup:

  1. Create automation: "View Sales Report"
  2. Add navigation action:
  • URL: https://app.datamagik.com/reports/sales
  • Open in new tab: ✓
  • Parameters: customer_id → customerIddate → reportDate

Result: Opens sales report for the current customer in a new tab.

Use Case 3: Execute Script from Any Page

Scenario: Run a data synchronization script from any ERP page.

Setup:

  1. Create automation: "Sync Inventory"
  2. Add script action:
  • Script: "Inventory Sync Script"
  • Parameters: warehouse_id → warehouseId

Result: Clicking the button executes the inventory sync for the current warehouse.

Use Case 4: Multi-Step Automation

Scenario: Print label AND open tracking page.

Setup:

  1. Create automation: "Ship Order"
  2. Add webhook action (print label)
  3. Add navigation action (open tracking)

Result: One button click prints the label and opens the tracking page.

9. Best Practices

Naming Conventions

  • Be descriptive — "Print Shipping Label" not "Print"
  • Use verbs — Start with action words (Print, Generate, View, Sync)
  • Include context — "Print Order Label" not just "Print Label"

Security

  • Use authentication — Always secure webhook endpoints
  • Limit permissions — Only grant access to necessary roles
  • Review regularly — Audit automation access periodically
  • Use Bearer tokens — Rotate tokens periodically

Parameter Design

  • Keep it simple — Only require necessary parameters
  • Use consistent naming — Match parameter names across automations
  • Document parameters — Add descriptions for clarity

Testing

  • Test with valid URLs — Verify buttons appear correctly
  • Test authentication — Confirm webhooks authenticate properly
  • Test edge cases — Missing parameters, network errors
  • Test permissions — Verify role-based access works

Performance

  • Avoid heavy operations — Keep webhook responses fast
  • Use async when possible — Queue long-running tasks
  • Monitor failures — Track and resolve automation errors

Maintenance

  • Document automations — Use the description field
  • Version control scripts — Track changes to automation scripts
  • Clean up unused — Remove automations no longer in use
Was this page helpful?