Automation
Day 15 - Automatically post to Mastodon or other remote APIs
The ECA Helper module provides an action to make an arbitrary HTTP post to any URL. That's all that's necessary to post to Mastodon from Drupal, if you have a Mastodon account. I've been using this functionality to automatically post these advent calendar posts for the past week.
Day 14 - Control access to particular pages, fields with ECA
Drupal has long had a variety of access control modules, to make it so you can easily control who can view or edit particular pages. There are actually several different layers of APIs to control this in Drupal core -- the modules generally provide a user interface to let you control access by content type, by tagging content with particular terms, through their position on a menu, or through a group. The Field Permissions module lets you control access to particular fields on an entity.
Day 13 - Change the display of an event after it happens
Event Calendars seem to be very common on the Drupal sites we build. One of the best ways of improving engagement on a site is to add content about the event after it happens. People who attended an event might come back for a recap, or to see pictures or notes from other participants, while people who did not attend can get a sense of what a future event might be like based on your past events.
Day 12 - Create a deep redirect in a headless site
One of our clients has a custom surveying application built with a Drupal back end, and a VueJS/headless front end. They use this application to record observations in various buildings and sites that don't meet accessibility requirements.
They give their clients access to the front end. This application organizes observations into particular sites, in particular projects, grouped by the requirement. Each observation can have photos attached, along with notes and recommended solutions.
Day 11 - Cache-bust pages containing embedded content
The saying goes, there are two hard problems in computer science: caching, naming things, and off-by-1 errors. While Drupal certainly has not solved the naming things, it has made a valiant attempt at a decent caching strategy. And for the most part it works great, allowing millions of lines of code to load up quickly the vast majority of the time.
This is more a tip about our favorite automation tool, the Events, Conditions, and Actions (ECA) module, and how it can get you out of a bind when Drupal caching goes too far.
Day 10 - Use AI to write alt text for your images
Hot off the presses! A brand new module, AI Image Alt Text, uses your configured AI engine to write Alt text for your images, based on AI vision models. When you turn this on, you get a "Generate with AI" button next to image fields, where you can easily get AI to analyze your image and come up with alternative text.
With some quick tests, I'm finding it's describing the image better than I typically do.
Day 9 - Send a roster of event attendees to staff
One of our clients is an art gallery that has a daily light show with limited seating. Reservations are free, but the show is popular enough that you need to reserve a month out.
Each day, they print a list of reservations for the staff to use when admitting guests.
Day 8 - Automatically show future and past events in a region
Another automation we did for Programming Librarian, a site for librarians to plan educational programs, involved events. They wanted to always feature 3 events on the home page, and the most important events were in the future. If their schedule is full, they wanted 2 future and 1 past event visible -- but they don't always have upcoming events, so there might be 0, 1 or 2 future events, and 3, 2, or 1 past events.
Day 7 - Remind customers of abandoned carts
Sometimes a simple reminder can spur a sale. If you have repeat customers that log into your commerce site, you may be able to remind them if they did not complete a checkout.
Day 6 - Automatically track documentation requirements
One of our clients is a yacht club that has their own moorage, which they lease out to members. With several hundred slips, their insurance requires them to maintain proof of insurance, up-to-date vessel registrations, and regular electrical inspections for all boats moored at their facility.
In Washington all vessel registrations renew in June, but insurance and inspections can expire any time of year. The office needs to keep copies of these documents on file.
Day 5 - Automatically tag articles with #AI
Today, another automation using the Drupal #AI module -- automatically tag your articles.
With the AI module, its AI Automators submodule, and a provider configured, you can add an automation to any field. With a Tag field on your content, you can edit the field definition and "Enable AI Automator". Give it a reasonable prompt, and it will tag your content for you.
Like most of the AI integrations, the great thing is you can easily edit the tags later if you want to highlight something specific, or if it comes up with something inappropriate.
Day 4 - Automatically send notifications to a Matrix chat room
When you work on a team, it's useful to have notifications go to a chat room where you can coordinate any necessary action. Reviewing a comment before publishing, seeing stories as they are written, getting notified of new orders are the kinds of things we like having in a shared room.











