Quick overview
Quick overview This workflow captures leads via webhooks, logs UTM-based channel attribution to Google Sheets, attributes won-deal revenue back to the original channel, and sends a monthly executive summary written by Anthropic Claude via Gmail. How it works Receives a POST request on a lead-capture webhook containing lead details and UTM parameters. Normalizes the lead fields, maps UTM source/medium values to a standardized marketing channel, and appends the lead to the Leads tab in Google Sheets. Receives a POST request on a deal-won webhook containing the customer email and deal value. Looks up the matching lead by email in the Google Sheets Leads tab, attributes the deal revenue to the original channel (or marks it as Unknown / untracked), and appends the result to the Revenue tab. Runs on the 1st of every month at 08:00, reads the Revenue tab, and aggregates last month’s revenue and deal count by channel. Sends the aggregated results to Anthropic Claude to generate a 4–6 sentence executive summary and emails the summary and figures using Gmail. Setup Create a Google Sheets spreadsheet with tabs named Leads and Revenue, then select the spreadsheet in all Google Sheets nodes. Add Google Sheets credentials with access to the target spreadsheet. Add an Anthropic API credential for the Claude chat model used to write the monthly summary. Add a Gmail credential and set the report recipient email address in the workflow. Copy the two webhook URLs (lead-capture and deal-won) and configure your website form and CRM to POST the required fields (email, UTMs for leads, and deal_value for won deals). Requirements A Google account with access to Sheets and Gmail An Anthropic API key Website forms that pass UTM parameters to your webhook Customization Edit the channel mapping rules in the Normalize Lead code node to match the channels you actually use Swap the Gmail node for Slack or another notification channel Change the report schedule or the Claude prompt tone in the summary node Additional info Tested end to end before submission: lead capture with UTM mapping, revenue attribution including deals from untracked leads, and the monthly Claude report delivered by email. An n8n automation workflow template by Nour Charaf Eddin.
Nour Charaf Eddin
web
free
Others in the same category, ranked by how often they are opened.