Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
{
"db_name": "PostgreSQL",
"query": "\n WITH active_bot AS (\n SELECT id\n FROM bots\n WHERE id = $2\n AND team_id = $3\n AND deleted_at IS NULL\n )\n SELECT $1::text AS \"source_id!\"\n FROM active_bot\n UNION\n SELECT $3::text\n FROM active_bot\n UNION\n SELECT c.id::text\n FROM active_bot\n JOIN comms_channels c\n ON c.channel_type = 'team'\n AND c.team_id = $3\n UNION\n SELECT cp.channel_id::text\n FROM active_bot\n JOIN comms_channel_participants cp\n ON cp.user_id = $1\n AND cp.left_at IS NULL\n WHERE NOT EXISTS (\n SELECT 1\n FROM comms_channel_agents ca\n WHERE ca.channel_id = cp.channel_id\n AND ca.kind = 'direct'\n )\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "source_id!",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text",
"Uuid",
"Uuid"
]
},
"nullable": [
null
]
},
"hash": "a9744da3deba792f9a0d50826e9f8d46ac7c7f53a8e91f6f96c64f95184d7a5b"
}