gianlucasullazzo/amazon_tracking_codes — reverse-engineered prompt
Reverse engineered prompt
Build me a small Home Assistant setup that watches my email for Amazon.it shipment confirmation messages and automatically saves the tracking code somewhere useful.
I want it to work with the Home Assistant IMAP integration, especially for emails from conferma-spedizione@amazon.it, and read the plain text body of the message. When a new unread Amazon shipping email arrives, it should pull out the Amazon order number and the tracking code, then add the tracking code to a Home Assistant todo entity like todo.amazon_trackcodes. Please make sure it doesn’t add the same tracking code twice.
Also add a notification when a new code is found, including the order number and email subject, so I know what shipment it belongs to. Keep it easy to copy into Home Assistant as YAML automation, and include a short note on how to test it by marking an Amazon email unread and reloading the IMAP sensor. If Amazon changes the email wording, make the regex easy to find and adjust.
Want more depth? Deep Reverse