• Skip to primary navigation
  • Skip to main content
ShopMagic logo cropped for use as a site icon
WP Desk

WP Desk

WooCommerce Plugins

Flexible Invoices

Flexible Invoices

Automate invoicing

Flexible Coupons

Flexible Coupons

Gift cards and tickets

ShopMagic

  • Pricing
  • Add-ons
  • Docs
  • Support
  • Blog
  • Ideas
  • My account
  • English
How to solve the “Fatal Error While Saving Automation” in ShopMagic – a case study

Published: April 24, 2025 / Updated: December 4, 2025 / Blog

How to solve the “Fatal Error While Saving Automation” in ShopMagic – a case study

Krzysztof Skorupa

ShopMagic is a powerful plugin for WooCommerce that automates actions in your online store, such as sending notifications and managing orders. This article explains how to fix the “Fatal error while saving automation” issue in the ShopMagic plugin and how to set up the plugin properly to avoid future problems.

Error message 'Fatal error while saving automation' in ShopMagic for WooCommerce

Situation/Challenge Description – Fatal Error While Saving Automation

Our client reported an issue when trying to save an email automation in the ShopMagic plugin. The error message “Fatal error while saving automation, Failed to set data for key _action” appeared only when he tried to set up an email with custom HTML (using the “Send Email” or “Raw HTML” options). Emails in “Plain Text” format worked fine.

Client had already changed PHP settings to allow larger packet sizes, but the problem still occurred. He also enabled debugging, but no useful information appeared in the logs.

Case Analysis and Solution for Fatal Error While Saving Automation

Step 1: Understand the Problem
We thought the issue might be related to incorrect database encoding, especially when emojis or special characters were used in the email. These types of errors often occur due to incompatible encoding that does not support certain characters.

Step 2: Test the Solution
We asked the client to perform several tests:

  • Check if the problem still occurs with only WooCommerce and ShopMagic active, while disabling all other plugins.

  • Review the database settings to ensure the encoding supports emojis and other characters.

Step 3: Final Solution
After reviewing the case, we found that the problem was caused by incorrect database encoding. Client used a database with UTF8mb3 encoding, which did not support characters like emojis. Once we changed the database encoding to UTF8MB4, the problem was solved.

Practical Tip:
Before using ShopMagic to send emails with custom HTML, make sure your database uses UTF8MB4 encoding. This encoding supports all characters, including emojis, and prevents issues when saving automations.

Summary and Conclusions

The ShopMagic plugin is an excellent tool for automating processes in your WooCommerce store. It helps save time and improve communication with customers. Make sure to set up your database correctly and use the proper encoding before installing the plugin.

We encourage you to try ShopMagic. If you encounter any issues, our technical support team will help you resolve any problems.

Check all the features of the plugin in our demo.

ShopMagic PRO £69

Free Follow-Up Emails & Marketing Automation for WooCommerce

Add to cart or View Details
WP Desk
10,000+ Active Installations

About Krzysztof Skorupa

  • Terms & Conditions
  • Privacy Policy
  • Support Policy
  • Refund Policy

© 2026 A WP Desk WP Desk Automation

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}