Rules
Automation Rules run actions automatically when subscribers join or leave a list, when campaigns send, or when autoresponder emails go out.
What Rules do
Rules (Automation Rules) connect an event (trigger) to a response (action). When the event happens, MailStalk runs every enabled rule that matches that event.
Examples:
• POST subscriber data to your CRM when someone joins a list.
• Email your team when a campaign finishes sending.
• Remove a new subscriber from a second list when they join your main list.
Rules are brand-specific. Open Rules from the sidebar under Others.
Rules page layout
The Rules page has three main areas:
1. Info banner — short explanation of automation.
2. Create a new rule — opens the rule builder panel above the table.
3. Rules table — lists all rules with Rule name (linked list, campaign scope, or autoresponder), Trigger, Action, Status toggle, and row actions (edit, delete).
If you have no rules yet, an empty state message appears. The table supports column sorting (except Status and Actions columns) and pagination when you have many rules.
Triggers (events)
A trigger is what must happen before an action runs. MailStalk supports five triggers:
On subscribe — fires when a new subscriber is added to a specific list (signup form, import, API, etc.). You must pick which list.
On unsubscribe — fires when someone unsubscribes from a specific list. You must pick which list.
When campaign starts sending — fires once when any campaign in this brand begins sending. Applies to all campaigns in the brand; no list selection.
On campaign sent — fires when any campaign in this brand has finished sending. Applies to all campaigns in the brand.
On autoresponder email sent — fires when a specific autoresponder email is sent to a subscriber. You pick the list, then the autoresponder on that list.
Note: Rules do not support open, click, or date-based triggers. Automation is tied to subscribe/unsubscribe events and send events only.
Actions (responses)
After you choose a trigger (and list or autoresponder when required), you pick one action:
Trigger webhook — MailStalk sends an HTTP POST request to your URL with event data as form-encoded parameters. Use this to sync with Zapier, your CRM, a custom API, or any service that accepts webhooks.
Send email notification — MailStalk sends a formatted HTML email to the address you enter (defaults to your brand From email). Content depends on the trigger (new subscriber, unsubscribe, campaign sending, campaign sent, or autoresponder sent).
Unsubscribe from list — available only when the trigger is On subscribe. After someone subscribes to the watched list, MailStalk unsubscribes them from a different list you choose. Useful for moving contacts between lists or preventing duplicates across lists.
Building a new rule
Click Create a new rule. The builder uses a left-to-right flow: Trigger → (List) → (Autoresponder) → Action → details.
Step-by-step:
1. Select a trigger from the first dropdown.
2. For subscribe, unsubscribe, or autoresponder triggers — select the list.
3. For autoresponder trigger only — select the autoresponder (loaded after you pick the list).
4. Select an action.
5. Fill in the action detail: webhook URL, notification email, or target list for unsubscribe.
6. Click Add to save.
Cancel closes the panel and resets the form. Required fields are validated before save (empty webhook URL, email, or unsubscribe list shows a red border).
- Click Create a new rule.
- Choose trigger → list (if needed) → autoresponder (if needed) → action.
- Enter webhook URL, notification email, or unsubscribe target list.
- Click Add. The rule appears in the table and is active by default.
Rules table columns
Rule name — shows what the rule applies to: a list name (link to subscribers), “Any campaign in this brand”, or an autoresponder name (link to autoresponder emails).
Trigger — the event label (e.g. On subscribe, On campaign sent).
Action — the response (webhook, email notification, or unsubscribe from list). For webhook rules, an info icon opens the webhook payload reference for that trigger.
Status — on/off toggle. Disabled rules are dimmed and do not run.
Actions — edit (pencil) updates webhook URL, notification email, or unsubscribe list inline; delete (trash) removes the rule permanently.
Enable, edit, and delete
Status toggle — click to enable or disable a rule without deleting it. Disabled rules stay in the list but will not fire.
Edit — click the pencil on a row. An inline field opens for that rule’s configurable value (webhook URL, notification email, or unsubscribe list dropdown). Save applies immediately; Close dismisses without leaving the page.
Delete — click trash, confirm in the modal. If your account uses strict delete, you must type DELETE before confirming.
Deleting a list from MailStalk also deletes rules tied to that list.
Webhook payloads
Webhooks use HTTP POST with application/x-www-form-urlencoded data (http_build_query). Click the info icon on a webhook rule to see fields for that trigger.
On subscribe / On unsubscribe:
trigger, name, email, list_id (encrypted), list_name, list_url, gravatar, plus any custom fields defined on that list.
When campaign starts sending / On campaign sent:
trigger, campaign_title, subject, from_name, from_email, reply_to, sent, no_of_recipients, webversion, campaign_id, brand_id, report_url.
On autoresponder email sent:
trigger, subject, from_name, from_email, reply_to, to_name, to_email, sent, webversion, list_name, ares_name, list_id, ares_id, ares_email_id, report_url.
Webhook calls time out after 10 seconds. Each attempt is logged (rule id, endpoint, payload, HTTP status, error message, timestamp). Logs older than 30 days are removed automatically. View history at Webhooks log if enabled for your install.
Email notifications
Notification emails are HTML templates with key details for the event:
Subscribe — subject “[New subscriber] List: {name}”; includes subscriber name, email, custom fields, and link to the list.
Unsubscribe — subject “[User unsubscribed] List: {name}”; includes name, email, custom fields, and list link.
Campaign starts sending — subject “[Campaign now sending] {subject}”; brand, campaign title, recipient count, web version, report link.
Campaign sent — subject “[Campaign sent] {subject}”; same campaign summary with sent confirmation.
Autoresponder sent — subject “[Autoresponder email sent] {subject}”; autoresponder name, list, recipient, web version, report link.
When a new brand is created, MailStalk may add a default On campaign sent → Send email notification rule to the brand From email. Brand settings can also control whether the main account user is BCC’d on campaign-sent notifications when no notify rule exists.
Sub-user and privilege limits
Team sub-users may see fewer triggers depending on their permissions:
Campaigns-only restriction — cannot create or see rules for campaign sending or campaign sent triggers.
Lists-only restriction — cannot create or see rules for subscribe, unsubscribe, or autoresponder sent triggers.
Sub-users restricted to one brand are redirected to that brand’s Rules page.
Common use cases
- Notify Slack or CRM on new subscriber — On subscribe + Trigger webhook to your integration URL.
- Alert manager when newsletter sends — On campaign sent + Send email notification.
- Start external workflow when sending begins — When campaign starts sending + Trigger webhook.
- Keep VIP list in sync — On subscribe on List A + Unsubscribe from List B (removes them from B when they join A).
- Track autoresponder deliveries — On autoresponder email sent + Trigger webhook with subscriber and email metadata.
Common questions
Can I trigger a rule when someone opens or clicks an email?
No. Rules only support subscribe, unsubscribe, campaign send start, campaign sent, and autoresponder sent events. Use Reports for open and click analytics.
Do campaign rules apply to one campaign only?
No. Campaign sending and campaign sent rules apply to every campaign in the brand.
Can I have multiple rules for the same list and trigger?
Yes. All enabled matching rules run when the event occurs.
Why is “Unsubscribe from list” missing from actions?
That action is only available when the trigger is On subscribe.
My webhook failed — where do I debug?
Check Webhooks log for HTTP status codes and error messages. Verify your endpoint accepts POST form data and responds within 10 seconds.
Does disabling a rule delete it?
No. Toggle off to pause; use delete to remove permanently.