# AutoMod Action Executed

> Triggers when an auto moderation rule action is executed (e.g. message blocked, alert sent, user timed out).

- ID: `automod_action_execution`
- Type: Event trigger
- Category: [Auto Moderation](https://inventor.bot/docs/reference/triggers/auto-moderation.md)

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `server_id` | ID of the server where the action was executed. | e.g. `"123456789012345678"` |
| `rule_id` | The rule that was triggered. | e.g. `"123456789012345678"` |
| `action_type` | The action type (Block Message, Send Alert Message, Timeout). | e.g. `"Block Message"` |
| `rule_trigger_type` | The trigger type (Keyword, Spam, Keyword Preset, Mention Spam, Member Profile). | e.g. `"Keyword"` |
| `user_id` | The user whose content triggered the rule. | e.g. `"123456789012345678"` |
| `channel_id` | Channel where content was flagged. | e.g. `"123456789012345678"` |
| `message_id` | Message that triggered the rule (empty if blocked). | e.g. `"123456789012345678"` |
| `alert_system_message_id` | ID of the alert message sent to the alert channel. | e.g. `"123456789012345678"` |
| `content` | The user's message content. | e.g. `"bad word here"` |
| `matched_keyword` | The keyword that matched. | e.g. `"badword"` |
| `matched_content` | The substring of content that matched. | e.g. `"badword"` |

**Example**

```go
var trigger = automod_action_execution()

func main() {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Server ID: " + trigger.server_id,
	})
}
```