Daily CallRail call log to Google Sheets

By General Input

Every morning, archive yesterday's CallRail calls into a Google Sheets tab so marketing and ops can pivot the data and join it with other sources.

Integrations

  • CallRail
  • Google Sheets

Type

Deterministic Code

Categories

  • Marketing
  • Operations

Build a code workflow that archives the prior day's CallRail call activity into a Google Sheets tab every morning, so our marketing and ops teams can pivot on the data outside of CallRail.

Trigger: cron, every day at 6:00am America/New_York. CallRail does not have a poll trigger in our platform, so use a schedule.

Step 1: Call CallRail's List All Calls operation for the configured account. Use a date range covering all of yesterday in the account's business timezone (default America/New_York), expressed as start_date and end_date. Paginate through every page (per_page=250) until total_pages is exhausted, accumulating all calls. Request the extended fields needed for analysis via the fields parameter: caller_name, customer_phone_number, source, campaign, keyword, landing_page_url, tracking_phone_number, duration, answered, lead_status, value, tags, recording, transcription.

Step 2: Transform each call into one spreadsheet row with this fixed column order: call_date (ISO date), caller_name, customer_phone_number, source, campaign, keyword, landing_page_url, tracking_phone_number, duration_seconds, answered (Yes/No), lead_status, value, tags (comma-separated), recording_url. Missing values should be empty strings.

Step 3: Call Google Sheets Append Values on the configured spreadsheet ID and tab name (for example 'Call Log!A:N'). Use valueInputOption=USER_ENTERED and insertDataOption=INSERT_ROWS so Google formats dates and numbers normally and rows are inserted rather than overwriting any chart ranges. Send all rows in one append call when possible.

Inputs that should be configurable at setup: spreadsheet_id, sheet_tab_name, timezone (default America/New_York), and run hour (default 6). Everything else (column order, fields list, page size) can be fixed in the workflow.

If CallRail returns zero calls for yesterday, finish successfully without writing any rows. If the append fails, surface the error so the run is marked failed. This is a deterministic pipeline, so it should be a fixed list-then-append flow, not an agent.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads