Skip to main content

Create Word Documents with Trigger Actions

Learn how to use trigger actions to generate personalised Word documents.

Cristina Gruita avatar
Written by Cristina Gruita
Updated over a week ago

Triggers can automatically create Word documents using mail-merge-style placeholders when certain events occur, such as a transaction being added or a constituent being updated.

This is useful for generating thank you letters, event confirmations, and volunteer documents directly from your data.


Create Word Documents with Trigger Actions

Create the Trigger

  1. Go to Data Management, then click Triggers.

  2. Click the plus button on the right to add a new trigger.

  3. Enter a Description for the trigger.

  4. Choose the Trigger Type from the drop-down list (for example, Constituent Added, Transaction Added, RPI Added). Most trigger types can use the Create a Word Document action; see the main triggers article for a full list.

  5. Click Save Changes.

    Set the trigger to Not Active while you add conditions and actions so it does not run before you have finished configuring it.


Add the Conditions

Conditions control which records cause the trigger actions to run. They are based on one or more Lists that filter your data.

  1. In your new trigger, go to the Conditions section, then click Add Condition.

  2. Choose the List Type you want to use (for example, Constituent, All Transactions, Recurring Payment Instruction), then click Add.

  3. Choose whether the constituent or record must be in or not in the selected List.

  4. Open the drop-down list of available Lists, then scroll or start typing to find the List you want to use.

  5. Select the List to link it to the condition.

  6. Repeat steps 1–5 to add any additional Lists needed to refine the trigger.

  7. Click Save Changes.

The List Types you can use depend on the Trigger Type. For example, a Transaction Added trigger can use Constituent and All Transactions Lists.

🤓 Tip: When building Lists for triggers, start the List name with “Triggers” so they are easy to find later.


Prepare the Word Document Template

The template is a standard Word document with placeholders that Donorfy will replace with data from the trigger event.

  1. Open Word and create your letter, acknowledgement, or form text.

  2. Wherever you want Donorfy data to appear, insert a placeholder in curly braces { }.For example:

    • To add the constituent’s label name, use: ​{Label Name}.

    • To add a donation amount, use: ​{Amount}.

  3. Keep placeholder names as close as possible to the actual Donorfy field names so it is easier to map them later.

  4. Save the document template on your computer.

📌 Note: You will map each placeholder to a Donorfy field when you add the action to the trigger.


Add the Create a Word Document Action

  1. In your trigger, go to the Actions section, then click Add Action.

  2. From the list of action types, select Create a Word Document, then click Add.

  3. Enter a clear Name for the action (for example, “Thank You Letter” or “Event Confirmation Letter”).

  4. Upload your Word template by:

    • Dragging and dropping the file into the grey hatched area, or

    • Clicking the area and selecting the file from your computer.

  5. Once uploaded, the document is shown as the current file, and a list of mappings is displayed.

  6. For each item in the mapping list:

    • Click the placeholder name.

    • Select the matching Donorfy field from the drop-down list.

  7. Repeat until all placeholders are mapped.

  8. Click Save Changes.

Optional: Mark Transactions as Acknowledged

If this Word document is being used to thank a transaction, you can set the Acknowledged on Date to today when the document is created.

  1. Close the trigger, then open it again.

  2. Go back to the Actions section.

  3. Click Edit for your Create a Word Document action.

  4. Enable the option This document is to acknowledge a transaction (or equivalent wording).

  5. Click Save Changes.

Optional: Only Run if Previous Actions Succeed

If your trigger has several actions, you can ensure the document is only created when earlier actions succeed.

  1. In the Actions section, click Edit for the document action.

  2. Tick Only run if all previous actions are successful if you want to skip this action when earlier ones fail.

  3. Click Save Changes.

📌 Note: You will map each placeholder to a Donorfy field when you add the action to the trigger.


Activate and Test the Trigger

  1. Once your conditions and actions are configured, open the trigger settings.

  2. Change the trigger from Not Active to Active.

  3. Use test constituents or records that match your List conditions to confirm:

    • The trigger fires as expected.

    • Documents are generated with the correct merged data.

🤓 Tip: Keep a List of test constituents and add it as a condition while testing. Remove that List from the trigger when you are ready to go live.


Print the Documents

When a constituent meets the trigger conditions, a Word document is generated and queued for download.

  1. Go to Data Management, then click Documents to print.

  2. Review the list of available documents. You can filter the list to:

    • Show documents that have already been downloaded.

    • Show documents that are still waiting to be downloaded.

  3. Find the constituent requiring the document.

  4. Click Download for that row to download the merged Word document.

  5. Open the downloaded file on your computer, then print or process it as needed.

Did this answer your question?