The fourth installment of the n8n workflow series, published by Daniele Michelin on DEV.to, demonstrates how to automate the delivery of the Wikimedia Commons 'Picture of the Day' directly to a user's smartphone. While the author admits the project serves no critical business function, it effectively showcases two fundamental n8n capabilities: handling date-based expressions in API calls and managing file attachments in push notifications. This approach transforms a simple data fetch into a polished morning routine, leveraging free infrastructure to keep developers engaged with the platform's ease of use.

Technical Implementation Details

The workflow triggers every morning at 7:00 AM, pulling data from the Wikimedia API's featured content endpoint. The core logic relies on a Code node that constructs a dynamic URL using the expression $now.toFormat('yyyy/MM/dd') to ensure the correct daily image is retrieved. This node parses the API response to extract the image description, preview URL, and a link to the full file page. The final step utilizes the ntfy service, where the attach field instructs the notification system to download and display the image directly on the recipient's device, bypassing the need for separate image hosting or complex email formatting.

Customization and Deployment

Michelin highlights the flexibility of this setup, noting that users can easily localize the content by swapping the /en/ segment in the API URL for /de/ or /it/ to receive descriptions in German or Italian. Beyond mobile push notifications, the workflow can be adapted to send images via email to family members or save them to a Nextcloud folder for use as a dynamic wallpaper. Deployment is streamlined through a downloadable JSON file (week-04.json), which can be imported directly into n8n via the 'Import from File' option in the top-right menu. Users are instructed to replace the default 'your-secret-topic' placeholder with a unique string in the push nodes and subscribe to that topic in the free, account-less ntfy app.

Key Takeaways

  • The workflow uses $now.toFormat('yyyy/MM/dd') to dynamically target the current day's featured content on Wikimedia.
  • ntfy is used for push notifications, with the 'attach' field handling image rendering without additional storage services.
  • Localization is achieved by modifying the language code in the API endpoint URL (e.g., changing /en/ to /de/).
  • Importing the pre-built workflow takes under two minutes, requiring only a topic secret change and a single test execution.

The Bottom Line

This workflow is a perfect example of 'just for fun' automation that actually teaches valuable skills. If you can master date expressions and attachment handling here, you are ready to build serious alerting systems for production environments.