Email notification for new patient registrations

Language: English

In this tutorial we set up an automation that emails the program coordinator each time a new patient is registered, entirely within ActivityInfo — no external workflow tool required.

We assume the role of a database administrator for a health program. Field teams register patients in a Patient Registration form throughout the day, and the program coordinator wants to be notified of each new registration as it happens.

What you need

  • A database with a Patient Registration form (any form will do — adjust the field references to yours). Ours has a text field Full Name with the code NAME, a quantity field Age with the code AGE, and a single-selection field Status with the code STATUS.
  • Permission to design the database.
  • The coordinator must be a user of the database, since email steps address database users and roles.

Step 1: Add the automation

  1. Open the database and select the Patient Registration form.
  2. Select Automations in the form's detail pane.
  3. Select Add automation.
  4. Name the automation "New patient registered".

Step 2: Choose the trigger

  1. Select Click here to get started.
  2. From the list of trigger types, choose On record added.
  3. Give the trigger a label, for example "Patient registered".
  4. Select Select form, choose the Patient Registration form, and confirm with Select form.
  5. Select Done.

Step 3: Add the email step

  1. Select Add a new step, then Action, then Send email.
  2. Give the step a label, for example "Notify coordinator".

Step 4: Choose the recipients

  1. Select Manage recipients.
  2. Add the program coordinator. You can add individual users, or a role — a role reaches everyone who holds it, including people added to the role later.
  3. Confirm your selection.

Step 5: Write the email

  1. Select Edit content.

  2. Enter the subject:

    New patient registered: ${NAME}
    
  3. Enter the body. The body is markdown, and ${...} references are filled in from the record that fired the automation — the field list on the right inserts them for you:

    ## New patient registration
    
       **${NAME}**, age ${AGE}, was registered by ${_user.name}.
    
       Status: ${STATUS}
    
  4. Select Done to close the content editor, and Done again to close the step.

Step 6: Save and test

  1. Select Save. The automation is now active.
  2. Add a test record to the Patient Registration form.
  3. Within moments, the coordinator receives an email with the patient's details and a View record button that opens the new record directly.

Going further

  • Notify only for some registrations: add a filter step between the trigger and the email — for example AGE < 5 to notify only for under-five registrations.
  • Notify on status changes instead: use the On record edited trigger with the filter STATUS != _previous.STATUS, and include both values in the email: Status changed from ${_previous.STATUS} to ${STATUS}.
  • Send the registration to another system instead of (or in addition to) email: add a webhook step.
Next item
Send a message to Google Chat when a record is added