How to Sync New Gmail Leads into Klaviyo and Monday
Poll a Gmail inbox for inquiry emails, let an Agent-mode Connector node extract the contact details into clean JSON, then create a Klaviyo profile and open a tracking item on a Monday.com board, all in one Spojit workflow.
What This Integration Does
Sales and marketing teams often get new leads as plain emails: a contact form reply, a "tell me more" message, or a referral landing in a shared inbox. Copying those names, emails, and phone numbers into your marketing list and your project board by hand is slow and error-prone. This Spojit workflow watches the inbox for you. When an inquiry arrives, the agent reads the free-form message, pulls out the contact fields, adds the person to Klaviyo so they enter your nurture flows, and creates a Monday.com item so your team can follow up. A failure to extract or create anything pings a Slack channel so nothing slips through quietly.
The workflow is driven by an Email trigger that polls a connected Gmail mailbox on a fixed interval. Each new matching message starts one run. The trigger output carries the sender, subject, and body text; the AI agent turns that text into a structured object; the Klaviyo and Monday.com Connector nodes write the records; and a Slack alert fires only on the error path. Each run is independent, so re-runs of the same email would create another profile and another item unless you filter the inbox tightly. Because the trigger only reads mail by default, the original message stays untouched in Gmail.
Prerequisites
- A Gmail mailbox connected as a trigger source. In Spojit, go to Connections -> Add connection -> Gmail (trigger) and complete the OAuth sign-in (read-only is enough for this workflow).
- A Klaviyo connection (API key) with permission to create profiles, plus the
listIdof the audience list new leads should join. - A Monday.com connection with access to the board that will hold your leads. Note the board's
boardIdand the column IDs you want to populate (for example an email column and a status column). - A Slack connection and the channel where failure alerts should land.
- An AI model available in your workspace for the agent step, and enough credits for Agent mode runs.
Step 1: Add the Email trigger that polls Gmail
Start a new workflow and set the Trigger node type to Email. Pick your connected Gmail mailbox and the folder to watch (typically the inbox). Set the Poll interval between 1 and 60 minutes (default is 2). To avoid acting on every message, add filters: a From allowlist if leads always come from a forwarding address, and a Subject regex such as (?i)(inquiry|enquiry|new lead|contact form) so only inquiry mail starts a run. Each matching message produces output you can reference downstream, including {{ trigger.from }}, {{ trigger.subject }}, and {{ trigger.textBody }}.
Step 2: Extract contact details with an Agent-mode Connector node and a Response Schema
Add a Connector node and switch it to Agent mode so the agent reads the unstructured email and returns reliable JSON. You do not need an outbound connector here; the value is the structured extraction. Write a prompt that hands the agent the raw email and asks for the fields you need:
Extract the lead's contact details from this inquiry email.
Subject: {{ trigger.subject }}
From: {{ trigger.from }}
Body:
{{ trigger.textBody }}
Return only the contact fields. If a field is missing, use an empty string.
Define a Response Schema on the node so the output is always the same shape:
{
"type": "object",
"properties": {
"email": { "type": "string" },
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"phone": { "type": "string" },
"company": { "type": "string" },
"message": { "type": "string" }
},
"required": ["email"]
}
Bind the result to a variable such as lead so later steps can read {{ lead.email }} and {{ lead.firstName }}. Forcing a schema is what makes the downstream Klaviyo and Monday.com calls dependable: every run produces the same keys regardless of how the email was worded.
Step 3: Guard against missing email addresses with a Condition node
An inquiry without an email address cannot create a usable Klaviyo profile. Add a Condition node that checks {{ lead.email }} is not empty (and, if you want to be strict, looks like an address). Route the true branch into the Klaviyo step below. Route the false branch into the Slack alert in Step 6 so the team gets a heads-up to follow up manually. This keeps bad or partial leads from silently failing later.
Step 4: Create the Klaviyo profile
On the true branch, add a Connector node in Direct mode, choose the Klaviyo connection, and select the create-profile tool. This tool takes a single attributes object holding the profile fields. Map it from your extracted variable:
{
"email": "{{ lead.email }}",
"first_name": "{{ lead.firstName }}",
"last_name": "{{ lead.lastName }}",
"phone_number": "{{ lead.phone }}",
"properties": {
"company": "{{ lead.company }}",
"lead_source": "Gmail inquiry",
"inquiry_subject": "{{ trigger.subject }}"
}
}
Bind the result to a variable such as klaviyoProfile. To enroll the lead in a specific audience, add a second Klaviyo Connector node in Direct mode using add-profiles-to-list, with listId set to your target list and profileIds set to an array containing the new profile's ID (read it from the create-profile output, for example {{ klaviyoProfile.data.id }}). That places the contact into the flows tied to that list.
Step 5: Open a tracking item on your Monday.com board
Add another Connector node in Direct mode, choose the Monday.com connection, and select the create-item tool. Set boardId to your leads board and build the item name from the lead, for example {{ lead.firstName }} {{ lead.lastName }} - {{ lead.company }}. Use the optional groupId to drop new leads into a "New" group, and pass columnValues as an object keyed by your board's column IDs:
{
"email_column": { "email": "{{ lead.email }}", "text": "{{ lead.email }}" },
"phone_column": "{{ lead.phone }}",
"status_column": { "label": "New" },
"text_column": "{{ lead.message }}"
}
Replace email_column, phone_column, and the rest with the real column IDs from your board. Open the board's column settings (or call the get-board tool once during setup) to find them. Bind the result to mondayItem if you want to reference the created item later.
Step 6: Send a Slack alert when something goes wrong
Wire the Condition node's false branch (missing email) into a Connector node in Direct mode using the Slack connection and the send-message tool. Set the channel and a clear body, for example:
:warning: Lead email could not be parsed.
From: {{ trigger.from }}
Subject: {{ trigger.subject }}
Please review the inbox and follow up manually.
For broader safety, you can also alert when a downstream step fails. A common pattern is a separate workflow that posts to Slack on failure; see the related article on Slack failure alerts below. Either way, the goal is that no lead disappears without someone noticing.
Tips
- Keep the poll interval realistic. A 2 to 5 minute interval is responsive without hammering the mailbox; very short intervals rarely add value for lead follow-up.
- Tighten the trigger's Subject regex and From allowlist as much as you can. The narrower the filter, the fewer non-lead emails reach your AI step and the lower your credit usage.
- Use the Response Schema's
requiredarray sparingly. Mark onlyemailas required so a missing phone or company does not blank out an otherwise good lead. - Storing the inquiry subject and a
lead_sourceproperty on the Klaviyo profile makes later segmentation by where the lead came from much easier.
Common Pitfalls
- Wrong Monday.com column format. Each column type expects a specific value shape (status columns take
{ "label": "..." }, email columns take{ "email": "...", "text": "..." }). Sending plain text into a typed column fails silently or errors. Match the format to the column type. - Duplicate profiles and items on re-runs. Re-running the same email creates a second Klaviyo profile and a second Monday.com item. Rely on tight inbox filters, and remember that Klaviyo treats the same email address as the same person, so repeated
create-profilecalls update rather than multiply the contact. - Read-only Gmail scope. The Email trigger reads mail by default. If you later add after-processing such as "mark read" or "move", you must reconnect Gmail with read and modify access, or that step will fail.
- Empty extraction fields. Free-form emails do not always include a phone or company. Default those to empty strings in your prompt and schema so the Klaviyo and Monday.com payloads stay valid instead of breaking on a null.
Testing
Before turning the workflow on, send yourself a sample inquiry email to the monitored mailbox that matches your subject filter. Open the workflow's execution history and confirm the Email trigger fired, the Agent-mode node returned a clean lead object, and the Klaviyo and Monday.com nodes each succeeded. Check Klaviyo for the new profile and your Monday.com board for the new item, then check that the contact landed in the right list. Finally, send a deliberately broken email with no address to confirm the Condition node routes it to the Slack alert instead of creating records. Once both the happy path and the error path behave, enable the workflow for live polling.
Learn More
- Setting Up an Email Trigger walks through connecting Gmail and tuning poll filters.
- How to Use Structured Output for Reliable AI Data Extraction covers Response Schemas in depth.
- How to Sync Customer Data Between Shopify and Klaviyo shows more Klaviyo profile patterns.
- How to Send Slack Notifications When Workflows Fail for a reusable failure-alert workflow.
- Klaviyo connector reference on the Spojit developer docs.
- Monday.com connector reference on the Spojit developer docs.