You are currently viewing How to Post PDF Attachments via Email on a WordPress Website

How to Post PDF Attachments via Email on a WordPress Website

(Or How I Stopped Worrying And Learned to Love the VT Open Meeting Law)

Show the Backstory?


[EDITED: This process no longer works due to changes Google made to the API IFTTT used.]

The Process: or “The 10 Steps You Need to Know To Deal with V.O.M.L.!”

Requirements: A website that runs on WordPress or is hosted by wordpress.com or the willingness to switch to one and then follow this guide.

      1. Create a new Gmail account (gmail.com) to use for this service. It is my opinion that it is better to use a clean Gmail address, dedicated to this processes, than a shared account.Note: It is possible to use this process with an existing Gmail account, but I recommend using more Google search operators in the search filter TRIGGERS mention in Step 6. Also, consider using an easy-to-remember email address such as yourtownname@gmail.com.
      1. Create a new If This Then That (ifttt.com) account. Consider using the email created in Step 1 to register for the free account. Again, making this a process that is self-contained has many upsides.
      1. Before the recipe can be used, the Gmail “Channel” as well as the WordPress Channel must be activated in IFTTT. In order to activate the WordPress Channel the username and password for an active account in the WordPress install must be known. Once a channel is verified, click on the “Use Recipe” button.
      1. Now that the IFTTT recipe is active, it can be edited to suit individual needs. Under the TRIGGER there is a link on how to use the Google Search Operators to customize the recipe.

        The rest of this article will focus on a basic setup.

        Notes: It is my suggestion to use PDFs rather than Word or other document types; however, other attachement types will work. If you wish to limit the type of file types that can be used to PDF it may be possible to edit the recipe by using the filename: operator. Also, it is recommended that one create individual recipes for each committee, and to use the from: Google search operator as described in Step 7 below. Employing this extra feature will mean that only approved people can post the minutes to the website. Thus limiting the chance for accidental posts from spam.

      1. In the TRIGGER section of the recipe, change the default search in the IFTTT recipe — being sure to switch the emails in the example below — to your town’s email in the to: and the from: to the email address of the person who will be contributing minutes.to:yourtownname@gmail.com has:attachment from:approvedsender@email.com
IFTTT Action Section [Click to enlarge]
IFTTT Action Section [Click to enlarge]
  • In the ACTION section (see image at right), change the Categories and Tags to suit individual needs. Consider using Minutes for the category, and a generous number of tags. Doing so will allow for custom searches and filters in WordPress — if desired — to display the posts in various ways (ex, by committee name, etc) to make it easier for citizens. So flexible!
  • The Body section of the ACTION can be formatted to suit individual needs. Note that some HMTL is allowed, such as formatting in bold or italics. The default recipe linked in Step 3 is designed to show something like the sample below, all of which comes from the sections of the email: Subject, Body, attachment. The Categories and tags are included by WordPress via the IFTTT recipe, which you can see in the image above.Note: Train people of this format early, and let them know everything they include in the email will go on the web! Signature files should be removed accordingly. If it is not clear, the recipe strips any HTML from the body of the email before posting.

    Selectboard Minutes for October 2, 2014
    Meeting minutes [PDF]:October 2, 2014: 7:22pm

    This is an example of the text that Committee members would include in their email, along with the attachment. It could be used to convey other information such as changes to a meeting schedule. Also, if the minutes aren’t official yet, they can be marked accordingly based on this line for the Vermont Open Meeting Law: “If it is not possible to provide the final approved minutes in five days, then a draft that is marked with words such as ‘subject to approval’ should be posted and made available.”
    Yours,
    Committee Secretary

    Category: Minutes
    Tags: selectboard, minutes, meetings, VOML, democracy works

  • As for the section of the recipe titled “Post Status”, consider changing the default setting to Save As Draft until the testing process is completed. Then change it back to Publish Immediately when ready.
  • To test the script, follow the instructions below in the “Using the Process” section. In order to trigger the recipe manually, click on the chasing arrow (second button from left in example below). One should see the “triggered x times” change if it was successful. Then check the website to confirm the item was posted — or is in the drafts section of your WordPress site.
Recipe Screenshot [Click to Enlarge]
Recipe Screenshot [Click to Enlarge]

Using the Process

In order to use this, contributors send an email to the town address created in Step 1 above. Contributors should include information in the Subject line that identifies from which committee the minutes come, as well as the date of the meeting. For example, “Selectboard Minutes (October 2, 2014)”. In the body, the contributors should include any information they think the citizens need to know, including whether the minutes are official or “subject to approval.” They should sign their email so that citizens know who added the minutes, and, most importantly they must include the minutes as an attachment.


Other Methods Using WordPress

WordPress does offer the ability to post directly to a website via the Jetpack plugin; however, it does add a layer of complexity to the process that I was attempting to avoid. If you would like to learn more about this method, please visit the Jetpack support page for this topic: http://jetpack.me/support/post-by-email/


More

Above are the very basics of this process, and have been written with the intention of making them understandable to as many people as possible. I offer the process freely to everyone who may find them useful. However, if a town is interested in implementing the process but does not feel comfortable doing so without assistance, I am available for hire. Please feel free to contact me in that case.