Detect placing item in container

Is there an advancement or a easy way to detect if a player placed (any) item in a container and being able to run commands as that player afterwards?
Continue to help post