Automations
Automations allow you to define event-driven rules and take automated actions, such as email alerts, tag changes, or policy switches. This feature is particularly useful for organizations managing large fleets of devices, offering a more responsive and observable IoT experience.
For an overview of Automations as an emnify platform feature, see Automations.
Events log
You can view event logs under the Events log tab of the new Automations section. This helps you to investigate device and SIM activity. You can also customize the table view, giving you full control over how your event data is displayed.
The following information is available:
For each event, click anywhere on the table row to open the event details.
Filter events
Filters allow you to query events based on one or more properties (for example, time period or country). For more information and available filters, see Filter tables in the emnify Portal.
Export the events log
You can download the event logs as a CSV file for offline analysis. See Export the events log for step-by-step instructions.
Custom events in the events log
Custom events are displayed alongside system events in the events log. They are shown with a dedicated custom event icon and the configured parameter metadata in the event description.
Rules
You can add automation Rules based on a selection of connectivity events. The Choose event type dropdown lists every event that can trigger a rule in your Workspace. Not every emnify system event can trigger a rule, and the dropdown names don’t always match the system event names. Rules are built in the emnify Portal, accessible under the Rules tab of the new Automations section.
Available events
The following events can trigger a rule. emnify adds new events regularly, so check the Choose event type dropdown for the latest events. Pre-release events are available only to certain Workspaces, so your dropdown might not show all of them.
The IMEI does not match event applies only to devices with IMEI lock enabled. You can set its Do not repeat for period to between 5 minutes and 7 days. The periods are fixed and aligned to UTC, so they don’t start at the last event. For example, with a period of 24 hours, a device that’s blocked at 23:59 UTC and again at 00:01 UTC triggers two events. A period of 7 days runs from Thursday to Thursday.
Scheduled rules
A rule with the Scheduled date event runs at a time you set instead of reacting to device or network activity. Every scheduled rule needs a time, and depending on how often it runs, a date or day as well:
The Portal converts the time you set from your selected time zone to UTC, and the rule runs at that UTC time. Recurring scheduled rules don’t adjust for daylight saving time, so the local time they run at shifts by an hour when daylight saving time starts or ends. A One Time rule runs at the local time you set, because the Portal converts it with the offset that applies on the date you pick.
A daily schedule can undo what another rule does each day. For example, to cap data usage in an expensive coverage area per day, pair a Daily usage in coverage area rule that restricts devices with a Daily scheduled rule that lifts the restriction. A scheduled rule acts on every device that matches its target, so target it at the devices the first rule restricts, for example by the coverage policy that rule switches them to. Without the second rule, the devices stay restricted past the day that triggered the first one, unless the first rule’s action switches them back automatically sooner. Daily usage resets at midnight UTC, so schedule the second rule for shortly after midnight UTC.
Custom events
In addition to emnify system events, Automations now support custom events.
How custom events differ from system events:
- System events are predefined by emnify and require no configuration.
- Custom events introduce configurable event parameters, such as thresholds or severity levels depending on the event template.
Event parameters
Unlike system events, custom events require additional configuration. Depending on the selected custom event template, you may need to set parameters such as:
- Usage limits
- Severity level
- Other event-specific thresholds
Custom event parameters cannot be edited after the rule is created.
If you need to change a threshold or severity later, you must:
- Duplicate the rule
- Configure the new parameters
- Delete the old rule if no longer needed
Predefined targets
Most events require you to define a device target. However, some custom events come with the target already predefined as part of the event template. In those cases, targeting cannot be modified.
Device targeting
Targeting allows you to define specific groups of devices to which the rules should apply. Rules can apply to:
- All devices
- Devices filtered by Service Policy, Coverage Policy, or Tags
The Service policy modified and Coverage policy modified events aren’t tied to a device, so their rules target service policies or coverage policies instead.
Available actions
When a rule triggers, it runs the actions you added to it. Besides email alerts, every rule can run up to 3 actions. The Choose an action dropdown lists only the actions that the rule’s event supports. If the event supports none, you can’t select an action, and hovering over the field shows No actions available for this event. Pre-release actions are available only to certain Workspaces, so your dropdown might not show all of them.
Each action runs on the device that triggered the event. The actions log records the result of every action, including actions that did nothing and why.
Email alerts
You can configure email notifications to be sent when a rule is triggered.
- Up to 10 subscribers per rule
- Recipients don’t need to be registered emnify users, but they need to verify their email address.
- Email content uses emnify-provided templates for consistency and clarity.
- A global daily limit of 20 emails per rule is enforced to prevent spam or flooding.
Each notification email includes a footer with unsubscribe instructions.
Change a policy Pre-release
The Change Coverage Policy and Change Service Policy actions switch the device to the policy you select. Then the device’s data session resets, without detaching the device from the network, so the new policy applies right away. Events such as Daily data threshold and Daily usage in coverage area offer both actions, but not every event that reports a device does.
To switch the device back automatically, select Switch back automatically and set Switch back after in hours or days, from 1 hour to 31 days. At that time, the device returns to the policy it was on before the action ran, and its data session resets again. The time counts from when the action ran, not from midnight UTC, so to lift a restriction at the start of the next UTC day, pair the rule with a scheduled rule instead. If you don’t set a time, the device stays on the new policy until you assign it to another policy.
The actions follow these rules:
- If the device is already on the selected policy, the action changes nothing and doesn’t reset the device’s data session.
- If the data session reset fails, the policy still changes and applies the next time the device attaches to a network. The actions log records that the data session wasn’t reset.
- If the device has no coverage policy when Change Coverage Policy runs, the action switches it but can’t switch it back.
- If you set a switch-back time, each action plans one switch back for each device at a time. If the rule triggers again for the same device before the switch back, the switch-back time is calculated again from the new trigger, but it only moves if the new time is later. The device still returns to the policy it was on before the first switch.
- If you change the action’s policy while a switch back is pending, the action skips the device until that switch back has run.
- At the switch-back time, the device returns to its earlier policy even if someone moved it to another policy in the meantime.
- The switch back still runs if you pause or delete the rule before the time is up.
- If the switch back fails, it’s tried two more times, 15 minutes apart. If all three tries fail, the actions log records that the switch back was given up, so check the device’s policy and change it back yourself.
Block current network Pre-release
The Block current network action blocks the network the device was using when the event triggered. It adds that network to the device’s Blocked networks list, the same list you can edit on the Device Details page. You can add this action to rules that use the Device stopped sending data or Device keeps reconnecting event. Pre-release actions are available only to certain Workspaces, so your rule might not offer this action.
To unblock the network automatically, select Unblock network automatically and set Unblock after in hours or days, from 1 hour to 31 days. If you don’t set a time, the network stays blocked until you remove it from the list.
The action follows these rules:
- If the event doesn’t say which network the device was using, the action blocks the network the device is attached to when the action runs. If the device isn’t attached to any network either, the action blocks nothing, and the actions log records why.
- If the network isn’t in the device’s coverage policy, or the coverage policy already blocks it, the action does nothing, and the actions log records why.
- If you set an unblock time, each rule blocks one network at a time for each device. If the rule triggers again for the same device before the network is unblocked, the action doesn’t block a second network. If it triggers again on the network it already blocked, the unblock time is calculated again from the new trigger, but it only moves if the new time is later.
- Without an unblock time, each trigger blocks the network the device was using, so one rule can block several networks for the same device.
- At the unblock time, the network is unblocked even if it was already on the device’s list before the action ran, for example because you blocked it yourself. If you unblock the network yourself before the time is up, it stays unblocked.
- The unblock still runs if you pause or delete the rule before the time is up.
- If the unblock fails, it’s tried two more times, 15 minutes apart. If all three tries fail, the actions log records that the unblock was given up, so check the device’s Blocked networks list and remove the network yourself.
The action blocks the network even if it’s the last network available to the device in that country. The device then has no network in that country until the network is unblocked.
Rule management
Rules can be:
- Paused, which immediately stops the rule’s notifications and actions without deleting the rule. A pending unblock or switch back still runs.
- Edited, to change the rule’s name, target, actions, and notification subscribers.
You cannot change the triggering event once the rule is added.
- Duplicated, allowing quick setup of similar automations.
- Deleted, when it’s no longer needed.
How automations work
User flow for configuring an automation:
- Select Event
Choose a supported system event or custom event to act as the rule’s trigger. - Configure Parameters (custom events only)
Set required parameters specific to the selected custom event template. - Define Target
Specify targeting conditions (for example, device policies or tags) if not predefined. - Add Actions
Choose from the actions available for the event, such as an email notification, a change of the device’s coverage policy, or blocking the device’s current network. Then, provide the required parameters, such as the email address.
Backend flow:
- Events are filtered and enriched with parameters.
- Matching automations are triggered.
- Actions are executed via a dedicated event bus.
- The status of each action is updated in the backend.
Email verification workflow
To maintain deliverability and ensure user consent, emnify enforces a verification step for non-registered email recipients:
- When a new email is added to a rule, emnify checks whether it is verified.
- Recipients already associated with verified emnify accounts don’t require confirmation.
- If unverified, the recipient is sent a confirmation email with a link to approve notifications.
- This confirmation is required only once per email address, regardless of how many rules it’s added to.
- Until verified, no notifications are sent to that recipient.
All alert emails come from a dedicated sender: automations-do-not-reply@emnify.com
This separation improves deliverability and keeps transactional emails (such as MFA) unaffected.
Email verification status
You can view and manage the verification status of each email recipient directly in the Rules configuration UI.
The following statuses are shown next to each email address:
If an email is Blocked, an inline error appears below the tag list to inform you that action is needed.
Revoke and resend emails
You can:
- Revoke an email address at any time by removing it from the recipient list. This immediately prevents any future emails.
- Resend Verification for addresses with Verification Expired status. This resets the status to Pending Verification and issues a new 7-day token.
The Resend verification button only appears if expired addresses are present.
New addresses trigger a verification email automatically.
Email delivery limits
To ensure reliable delivery and avoid spam filtering by email providers, emnify enforces a global email throttling mechanism:
- A maximum of 20 emails per day can be sent for each automation rule.
- If the limit is exceeded, no additional emails are sent for that rule until the next day.
- The email count resets every day at midnight UTC.
- Emails with multiple aggregated notifications still count as one email.
- The system continues to log rule executions, but failed emails are marked in the actions log with:
- Status:
FAILED - Reason:
Mailing limit reached for automation: ${automationId}
- Status:
- This limit applies only to email actions, not to other types of automation actions.
This helps protect your and emnify’s sender reputation with email providers.
Key concepts
- Action: An operation performed when an event matches a rule (for example, send email, reset connectivity)
- Target: A filter defining which devices a rule applies to
- Workflow: A structured, multi-step execution path for complex actions. Pre-defined by emnify or custom-defined per customer
- Workflow attributes: Input parameters required for a workflow to run (for example, ICCID, device tag)
- Actions log: A record of executed actions for troubleshooting and transparency. Failed email actions that exceed the daily send limit are included here.
- Automation resource: The stored configuration linking an event trigger, a target, and one or more actions
- Email status: The verification or delivery eligibility state of a rule notification recipient (for example, verified, pending, expired, blocked).
Automations are new to emnify, so feedback and suggestions are very welcome. Please open a ticket on Canny.