Set up automations

Features · Updated Oct 20, 2026

Automations run actions for you when something happens in a conversation, like tagging a thread or posting a webhook. Open RagChat and go to Automations in the sidebar.

This page is in the standalone RagChat app. It does not appear inside the Shopify admin.

Create a rule

  1. Open Automations.
  2. Start a new rule from the top of the page. If you have none yet, use the button on the Automate your busywork empty state.
  3. Enter a Name.
  4. Pick a Trigger. That is the event that starts the rule.
  5. Optionally click Add condition under If. All conditions must match. With no conditions, the rule always runs.
  6. Choose when to Run: Immediately, or After a delay. For a delay, enter how long to wait (minutes, hours, or days, up to 30 days).
  7. Click Add action and choose what should happen. A rule needs at least one action, and actions run in order.
  8. Leave Run once per contact on if you do not want the same contact to trigger the rule again.
  9. Leave Enabled on, then click Save automation.

Block spam before the AI replies

When a rule runs Immediately and includes Block the contact, RagChat runs that rule before the AI starts a reply. The sender is already blocked by the time generation would begin, so spam does not burn a reply and does not get an answer.

Rules with a delay still wait as usual. Other immediate actions (tags, webhooks, messages) keep running on the queue as before.

For manual blocks and what a blocked contact sees, see Block a contact.

Conditions on message subject

For inbound email (including mail to your support address), conditions on Message subject match the email's real subject line. Use that with a Message received trigger to tag or block pitches by subject.

Delay

A delay waits after the trigger before the rule runs. Conditions are checked when the trigger fires and again when the delay ends. Turning the rule off cancels runs that are still waiting. Changing the delay reschedules them.

Use a delay with Events since trigger when you care what happened in between. That condition looks at the contact's event timeline between the trigger and the run (not including the triggering event itself). Operators are include and do not include, and the value is an event name such as import_reviews.

Example: nudge after install only if they have not imported yet. Trigger on Event received with Event name equals your install event, set a delay of a few days, and add Events since trigger → do not include → import_reviews.

Events since trigger is empty for an immediate rule, so it only helps when a delay is set.

Proactive chat messages

Send a chat message can reach a contact before they open the widget. They only see the badge, preview, and chime after the widget has connected.

If Email replies is on, that automated message is also emailed only after the contact has emailed you at least once. Chat-only contacts still get the message in the widget. Once they email you, earlier unread automated messages can go out with a real reply. See Send and receive email replies.

A conversation that holds only automated messages (for example an install welcome or a follow-up nudge, with no reply from the contact, your team, or the AI) stays resolved, so it doesn't add to your unresolved count. It reopens as soon as the contact writes back. Because nobody resolved it by hand, it doesn't ask for a satisfaction rating or fire a Conversation resolved trigger.

By default the widget connects when the visitor opens the panel (or when they are a returning visitor). Hosts that embed the widget with a signed identity can connect on page load instead by setting data-auto-connect="true" on the embed script. Without a signed identity the flag is ignored, so anonymous storefront visitors are never connected just from loading a page.

Conversation needs attention

Conversation needs attention starts a rule when a conversation is flagged as needing a human. That is the same moment as the needs-attention alert email.

It fires when:

  • Customer asked for a human (right away)
  • AI could not answer (after a short wait)
  • Waiting with AI off (after a short wait)

If you open the thread during the wait, the rule is cancelled. It runs at most once per conversation until someone opens the thread.

The rule still runs if Notify me when a conversation needs attention is off. The email is optional. The rule is not. See Send and receive email replies.

To handle only one of those three situations, add an If condition on Alert reason.

You can also condition on Waiting messages (how many unread visitor messages are sitting there) and Message text (the newest waiting message).

For every escalation the instant it happens, use Human help requested instead.

You can try the rule from the Playground. Rules run for playground contacts. The alert email does not. See Configure your AI assistant.

Event received

Event received starts a rule when your app (or another connected host) posts a named event for a contact through the events API. Examples include install, uninstall, or import activity from a product that talks to RagChat.

Use an If condition on Event name so the rule only runs for the event you care about. You can also condition on Event data when the payload carries extra detail.

In message templates you can use {{event.name}} and {{event.value}}.

Events also show up in the inbox shopper panel. See Manage conversations in the inbox.

Send a webhook with a bearer token

Send a webhook POSTs the event as JSON to your URL, signed with your identity secret (X-Ragchat-Signature header).

You can add an optional Bearer token. RagChat sends it as an Authorization: Bearer header so your endpoint can authenticate the request.

  • The webhook URL must use https if you set a token.
  • The token is write-only. After you save, the field stays blank and the help text says a token is stored.
  • Leave the field blank to keep the stored token. Changing the Webhook URL clears it.
  • Click Remove token to delete a stored token.

Other triggers and actions

Triggers also include Rating submitted, Conversation resolved, Conversation started, Message received, Lead captured, Human help requested, Contact created, and Custom data changed.

Actions include Send a chat message, Add a tag, Remove a tag, Email me, Send a webhook, Set custom data, and Block the contact.

Custom fields from Settings → Contact attributes can be used in conditions and in Set custom data. See Store custom data on contacts.

Manage rules from an AI client

On a standalone workspace, a connected AI client can list, create, update, and delete the same rules over MCP, and inspect run history. See Manage RagChat from an AI client (MCP).

Still stuck? Message us from the chat widget and we'll help.