I saw some warnings in the logs that discourse-automation plugin failed to send PMs. Automation plugin uses the usernames at the time of triggering the trigger, rather than the latest usernames of users when sending PMs. Since the PM-sending script supports delayed sending, users may change their usernames after the trigger and before the PM is sent, resulting in failures.
I think changing DiscourseAutomation::PendingPm to record user IDs instead of usernames can solve this issue:
Regarding my use case:
I have a task to send PMs to new users after a delay, configuring the automation plugin to send PMs five minutes after users join the TL0 group. However, some new users change their usernames immediately after registration, resulting in sending failures.