Webforms: Attach a File or Document to a Webform Email Notification

Send a single file to users who have completed your webform.

Summary

Webforms provide online forms accessible to website visitors. When a user submits a Webform, you can send them a confirmation email. This tutorial explains how to attach a file to the confirmation email sent by the Webform. 

Example Use Case

You are having an Event. You want people to register for the Event by submitting a Webform. You want to send a confirmation email to the registrants that includes an .ical or .ics meeting invitation to sync with their work calendar. 

Note: This is a basic guide. For a hands-on class on how to create Webforms, Web Managers should register for and attend a Digital Commons training session for this module. Classes are offered for Webform basics and advanced Webform use. Submit a Support Request for help with Webforms

Audience

Web Managers

How to Attach a File or Document to a Webform Email Notification

  • 1

    Create the File

    Create the file using the appropriate software application. Make sure that the document is accessible to people using assistive technology

    Accordion
    Tab/Accordion Items

    TextSpreadsheetCalendarWeb, Media, & Other
    • .doc
    • .docx
    • .pdf
    • .ppt
    • .pptx
    • .rtf
    • .txt
    • .csv
    • .xls
    • .xlsx
    • .ical
    • .ics
    • .eps
    • .json
    • .kmz
    • .mp3
    • .xml
    • .zip

    Calendar .ics files can be created in one of two ways: 

    How to Get an .ics File from a Digital Commons Event

    Hand cursor selecting the Outlook icon on a Digital Commons Event
    Enlarge Image
    1. Navigate to the desired Event.
    2. Find Add to calendar: and select the Outlook icon.
    3. An .ics file will download to your computer. Most web browsers will display the downloaded item in the top right corner of the window under Downloads, as shown below. If you cannot find the file there, check the Downloads folder on your device.
    Example of an .ics Event downloaded to Chrome from Digital Commons
    Downloads as they appear in the Chrome browser.
  • 2

    Upload the File to the Media Library

    • Navigate to Content > Media > Add Media > Document
    • Fill all required fields marked with an asterisk(*).
      • Name*- Enter a name for the document.
      • Document*- Choose File to upload.
    • Complete Document Organization fields as desired. Contact your agency Web Manager for guidance.
    • Select the Save button.
  • 3

    Customize Webform Email Handlers

    • Navigate to Admin > Structure >Webform
    • Find and select the desired Webform.
    • Select Settings > Emails/Handlers.
    • Under Title/Description, find the desired confirmation email and select Edit.
    • In the right panel, go to the Message section.
    • For Body*, select Custom body...
    • Go to the Text Editor.

    Create a Link

    • Text Editor- Add a link with or without button styling using the Text Editor. Be sure to use link text appropriate for the document being downloaded. Examples:

    Save & Test

    • Save the Email Notification Handler.
    • Save the Webform.
    • Test the Webform.
    Accordion
    Tab/Accordion Items

    Second Sidebar
    April 8, 2024

    Configuring Email Notifications for Your Webform

    This video walks through the process of setting up a webform so end users and agency contacts will receive an email notification when data is submitted.