discord / trigger / schema v1
Discord: Audit Log Entry
Trigger when something is recorded in the server audit log (who kicked, banned, deleted…)
Prerequisites
- Add the discord plugin inside this workflow.
- Connect and authorize a discord account before running this node.
Parameters
| Parameter | Type | Description |
|---|---|---|
ServerguildId | discord_guild Required | |
Action FilteractionFilter | tags Optional | Use the readable names this trigger produces: member_kick, member_ban_add, channel_delete, role_update, message_delete… Leaving it empty fires on everything, which is noisy on a busy server. |
Only when done byexecutorFilter | discord_user Optional | Only when one of these people performed the action. |
Inputs and outputs
Inputs
No ports declared.
Outputs
on_audit_log- On Audit Entry (output)action- Action (output)action_id- Action (number) (output)executor_id- Who did it (ID) (output)executor_username- Who did it (output)executor_avatar- Who did it: Avatar URL (output)target_id- Target ID (output)target_type- Target Type (output)reason- Reason (output)changes- Changes (output)changed_keys- Changed Fields (output)entry_id- Audit Entry ID (output)guild_id- Server ID (output)timestamp- Timestamp (output)
Output data schema
[
{
"key": "action",
"type": "string",
"label": "Action",
"description": "e.g. member_kick, channel_delete, role_update"
},
{
"key": "action_id",
"type": "number",
"label": "Action (number)"
},
{
"key": "executor_id",
"type": "user",
"label": "Who did it (ID)",
"bindingRole": "actor"
},
{
"key": "executor_username",
"type": "string",
"label": "Who did it",
"bindingRole": "actor"
},
{
"key": "executor_avatar",
"type": "url",
"label": "Who did it: Avatar URL"
},
{
"key": "target_id",
"type": "snowflake",
"label": "Target ID",
"bindingRole": "selected_target"
},
{
"key": "target_type",
"type": "string",
"label": "Target Type",
"description": "User, Channel, Role…"
},
{
"key": "reason",
"type": "string",
"label": "Reason"
},
{
"key": "changes",
"type": "array",
"label": "Changes",
"description": "key / old_value / new_value per changed field",
"items": {
"key": "change",
"type": "object",
"fields": [
{
"key": "key",
"type": "string"
},
{
"key": "old_value",
"type": "string"
},
{
"key": "new_value",
"type": "string"
}
]
}
},
{
"key": "changed_keys",
"type": "array",
"label": "Changed Fields",
"items": {
"key": "field",
"type": "string"
}
},
{
"key": "entry_id",
"type": "snowflake",
"label": "Audit Entry ID"
},
{
"key": "guild_id",
"type": "guild",
"label": "Server ID",
"bindingRole": "current_context"
},
{
"key": "timestamp",
"type": "timestamp",
"label": "Timestamp"
}
]Examples and troubleshooting have not yet been reviewed for this contract.
Version and compatibility
This reference follows the current authoring contract. Existing workflows retain their saved node revisions.
Contract identifier
1f7e04e9518ad3114a8c926a09545064f00daf1fcc0a1874d5df3f4f5a7929cf