Skip to main content
Glama

log_outreach

Record outreach activities in your revenue pipeline by tracking communication channels, responses, and follow-up notes for lead management.

Instructions

Log an outreach activity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leadIdNo
companyNameYes
channelYes
templateUsedNo
templateIdNo
responseReceivedNo
responseTypeNo
notesNo

Implementation Reference

  • Handler for the log_outreach tool. Dispatches the tool call to the callAPI function with action 'logOutreach' and the provided arguments.
    case "log_outreach": result = await callAPI("logOutreach", args); break;
  • index.js:216-239 (registration)
    Registration of the log_outreach tool in the tools list, including name, description, and input schema definition.
    { name: "log_outreach", description: "Log an outreach activity", inputSchema: { type: "object", properties: { leadId: { type: "number" }, companyName: { type: "string" }, channel: { type: "string", enum: ["Cold Email", "LinkedIn", "Upwork", "Phone", "Gmail", "Other"] }, templateUsed: { type: "string" }, templateId: { type: "number" }, responseReceived: { type: "string", enum: ["Yes", "No"] }, responseType: { type: "string", enum: ["Interested", "Not Interested", "Question", "Meeting Booked", "No Response"] }, notes: { type: "string" }, }, required: ["companyName", "channel"], }, },
  • Input schema for the log_outreach tool, defining parameters like leadId, companyName, channel, etc.
    inputSchema: { type: "object", properties: { leadId: { type: "number" }, companyName: { type: "string" }, channel: { type: "string", enum: ["Cold Email", "LinkedIn", "Upwork", "Phone", "Gmail", "Other"] }, templateUsed: { type: "string" }, templateId: { type: "number" }, responseReceived: { type: "string", enum: ["Yes", "No"] }, responseType: { type: "string", enum: ["Interested", "Not Interested", "Question", "Meeting Booked", "No Response"] }, notes: { type: "string" }, }, required: ["companyName", "channel"], },
  • Helper function callAPI that handles HTTP POST requests to the Google Apps Script API endpoint with the action and arguments. This is where the actual API call for logOutreach is made.
    async function callAPI(action, data = {}) { debugLog('=== API CALL START ==='); debugLog(`Action: ${action}`); debugLog(`Data: ${JSON.stringify(data)}`); try { // Build form-encoded body for POST const formData = new URLSearchParams(); formData.append('action', action); // Add all data fields to form for (const [key, value] of Object.entries(data)) { if (value !== undefined && value !== null) { formData.append(key, value.toString()); } } const formString = formData.toString(); debugLog(`FormData: ${formString}`); debugLog(`API_URL: ${API_URL}`); // Use POST with proper content type const response = await fetch(API_URL, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: formString }); debugLog(`Response status: ${response.status}`); debugLog(`Response ok: ${response.ok}`); if (!response.ok) { debugLog(`Response not OK: ${response.status} ${response.statusText}`); throw new Error(`API request failed: ${response.status} ${response.statusText}`); } const text = await response.text(); debugLog(`Response text length: ${text.length}`); debugLog(`Response text: ${text}`); if (!text) { debugLog('ERROR: Empty response from API'); throw new Error('Empty response from API'); } const parsed = JSON.parse(text); debugLog(`Parsed successfully: ${JSON.stringify(parsed)}`); debugLog('=== API CALL END ==='); return parsed; } catch (error) { debugLog(`ERROR in callAPI: ${error.message}`); debugLog(`ERROR stack: ${error.stack}`); throw error; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PromptishOperations/mcpSpec'

If you have feedback or need assistance with the MCP directory API, please join our Discord server