This is a task that takes too long to do directly in a tag event. Use the store and forward engine or use a gateway tag change event (in the project, not on the tag). See this recent topic for why this is true:
If you have very dynamic requirements, such that the event must originate on a tag event, this topic of advanced techniques might help you: