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 candidate AS (\n SELECT s.id FROM email_sync_streams s JOIN email_links l ON l.id = s.link_id\n WHERE l.is_sync_active AND l.provider = 'OUTLOOK' AND s.generation = l.sync_generation\n AND s.kind IN ('contacts_catalog','contacts_profile','contacts') AND s.next_run_at <= now()\n AND (s.lease_until IS NULL OR s.lease_until < now())\n ORDER BY s.next_run_at,s.id LIMIT 1 FOR UPDATE OF s SKIP LOCKED\n ) UPDATE email_sync_streams s SET lease_id = $1,lease_until = now() + interval '3 minutes',fence = fence + 1\n FROM candidate c,email_links l WHERE s.id = c.id AND l.id = s.link_id\n RETURNING s.id,s.link_id,s.generation,l.grant_generation,s.scope_id,s.position,s.initial_complete,s.fence,s.scan_id,s.kind\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "link_id",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "generation",
"type_info": "Int8"
},
{
"ordinal": 3,
"name": "grant_generation",
"type_info": "Int8"
},
{
"ordinal": 4,
"name": "scope_id",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "position",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "initial_complete",
"type_info": "Bool"
},
{
"ordinal": 7,
"name": "fence",
"type_info": "Int8"
},
{
"ordinal": 8,
"name": "scan_id",
"type_info": "Uuid"
},
{
"ordinal": 9,
"name": "kind",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
false,
false,
false,
true,
false,
false,
false,
false
]
},
"hash": "7e469e1a1103150d3990fe8f9c0e1a7fbc65c120f71a8c3b3ece558d167ac6ab"
}