SMTP and Mailhook: Out-of-Hours Auto-Reply Template

Build a Spojit workflow that catches mail arriving outside business hours and replies from your own mail server with a friendly note about when the customer can expect a response.

What It Builds

This template wires a Mailhook trigger to a Condition node and an SMTP connector. When a message lands at your Mailhook address, a Connector node on the date connector reads the current hour in your timezone, the Condition node checks whether it falls outside your opening times, and if it does, the SMTP connector sends an out-of-office style reply from your own domain to {{ input.replyTo }}. Mail that arrives during business hours simply ends the run with no reply, so your team handles it normally.

The Prompt

Paste this into Miraxa, the intelligent layer across your automation, and it builds the workflow and connects the tools for you:

Build a workflow with a Mailhook trigger. When an email arrives, use the date connector to get the current hour and weekday in the Australia/Sydney timezone. Add a Condition node that is true when the time is before 9am, after 5pm, or on a weekend. On the true branch, use the SMTP connector to send a reply to the email's reply-to address from support@yourdomain.com, with the subject "We received your message" and a body that says we are currently outside business hours (Mon-Fri, 9am-5pm) and will respond on the next business day.

Connectors Used

  • Mailhook (trigger) - generates a unique Spojit address; any mail sent to it starts a run, with no mailbox or sign-in required.
  • date - the parts and now tools read the current hour and weekday in your chosen timezone so the Condition can branch on business hours.
  • smtp - the send-email tool sends the auto-reply from your own mail server and address, not a shared Spojit sender.

Customize It

Change Australia/Sydney to your own IANA timezone, and adjust the opening hours in the Condition (for example, before 8am, after 6pm) to match your team. Swap the From address and the reply copy for your brand voice, and tighten who can trigger the reply by adding a From allowlist or Subject regex on the Mailhook trigger so internal or automated mail does not receive an auto-reply.

Tips

  • Use Direct mode on both the date and smtp Connector nodes. The logic is deterministic, so Direct mode keeps the run predictable and free of AI cost.
  • Always reply to {{ input.replyTo }} rather than {{ input.from }}, since the reply-to address is where the sender wants responses to land.
  • Verify your SMTP connection once with the verify-connection tool before going live so a bad password or host does not silently swallow replies.

Common Pitfalls

  • Forgetting the timezone: the date connector returns server time unless you pass your IANA zone, which can make a 5pm Sydney email look like a 7am one and skip the reply.
  • Auto-reply loops: if your Mailhook receives bounce notices or other auto-replies, a loop can form. Keep a From allowlist or Subject regex filter so only real customer mail triggers a reply.
  • Sending from an unverified domain: if your SMTP provider rejects the From address, the reply fails. Confirm the address is authorised on your mail server first.

Related Articles

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.