I need to send an email notification to a users after they are tagged in a timeline post using the psa module, does anyone have any solutions or an idea how to do this?

I found some steps on the internet but I need something more solid to apply

Use custom code (workflow / plug-in) to fire in Create of Post and do the following:

1. Verify that the post type is 'User Post'.

2. If the user posts, check for occurrences of the '@' character.

3. String manipulation and try extracting the GUID. Verify that the GUID is valid.

4. If valid GUID, verify that this user exists.

5. If the user exists, create an email by calling a child workflow or action.

You can accomplish this by creating a workflow in the created post entity record.

Write your own custom plug-in and consider the input parameter as post text and return the output parameter as EntityReference of target type "systemuser" and link this property to "To" in the email.

I have the steps but I can't find a way to apply them