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
- Overview
- Getting Started
- Creating Automations
- Action Types
- Parameter Configuration
- Permissions & Roles
- DataMagik Extend Browser Extension
- Use Cases
- 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
- DataMagik Account — Access to the DataMagik platform
- Browser Extension — DataMagik Automate installed in Chrome/Edge
- Permissions — Appropriate permissions to create automations
Installation Steps
- Navigate to DataMagik → Automations
- Install the DataMagik Automate browser extension (see Section 7)
- Configure the extension with your DataMagik credentials
- 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:
- Click Add Role
- Enter role name and description
- Assign permissions to the role
- Save
Managing Permissions
Navigate to Manage Permissions to see all available permissions.
Assigning Permissions to Automations:
- Edit an automation
- Go to the Permissions tab
- Select which roles can access this automation
- 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:
- Go to the Chrome Web Store or Edge Add-ons
- Search for "DataMagik Automate"
- Click Add to Chrome / Add to Edge
- Pin the extension for easy access
Configuration
- Click the extension icon in your browser
- Enter your DataMagik credentials
- Configure settings:
Using the Extension
Once configured:
- Navigate to a web page with matching URL parameters
- Automation buttons appear in the extension popup
- Click a button to execute the automation
- 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:
- Create automation: "Print Shipping Label"
- Add required parameter:
order_no - 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:
- Create automation: "View Sales Report"
- Add navigation action:
- URL:
https://app.datamagik.com/reports/sales - Open in new tab: ✓
- Parameters:
customer_id→customerId,date→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:
- Create automation: "Sync Inventory"
- 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:
- Create automation: "Ship Order"
- Add webhook action (print label)
- 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