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 SELECT\n COUNT(DISTINCT cm.id) AS ai_chat_messages,\n COUNT(DISTINCT d.id) AS documents\n FROM \"User\" u\n LEFT JOIN \"Chat\" c ON c.\"userId\" = u.id AND c.\"deletedAt\" IS NULL\n LEFT JOIN \"ChatMessage\" cm ON cm.\"chatId\" = c.id AND cm.role = 'user'\n LEFT JOIN \"Document\" d ON d.\"owner\" = u.id AND d.\"deletedAt\" IS NULL\n WHERE u.id = $1;\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "ai_chat_messages",
"type_info": "Int8"
},
{
"ordinal": 1,
"name": "documents",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
null,
null
]
},
"hash": "000c1235f8bd55c9dd179d10421e262d6e096bc1a8547f5da22596dbc56e0ddc"
}