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 INSERT INTO crm_contacts (company_id, email, name, first_interaction, last_interaction, hidden, team_id)\n VALUES ($1, $2, $3, $4, $5, $7, $8)\n ON CONFLICT (company_id, email) DO UPDATE\n SET name = COALESCE(crm_contacts.name, EXCLUDED.name),\n updated_at = now(),\n first_interaction = CASE\n WHEN $6 THEN LEAST(crm_contacts.first_interaction, EXCLUDED.first_interaction)\n ELSE crm_contacts.first_interaction\n END,\n last_interaction = GREATEST(crm_contacts.last_interaction, EXCLUDED.last_interaction)\n RETURNING id\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Text",
"Timestamptz",
"Timestamptz",
"Bool",
"Bool",
"Uuid"
]
},
"nullable": [
false
]
},
"hash": "45ed0d702c6edff0bc5866f1ba379ba6aef34de1f8b7aba473d9f47cd2f2ce83"
}