# ConstructionOnline + Gmail Integrations: Connect with Zapier MCP
> zapier.com/apps/constructiononline/integrations/gmail
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

Integrate ConstructionOnline and Gmail in minutes. Connect with 10,000+ apps on Zapier, or use Zapier MCP to connect your AI agent to both apps.

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Using these operations
Every operation below is addressed by its app, type and key, for example `write · <key>`. Events from one app can start a run that calls functions in the other.

- **MCP**: connect each app through mcp.zapier.com to expose its operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`, then call `runAction({ app, actionType, action, connection, inputs })`.
- **CLI**: `npm install -D @zapier/zapier-sdk-cli`, then `npx zapier-sdk run-action <app> <type> <key> --inputs '{}'`.

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · add_label`.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "gmail", owner: "me" });

const { data } = await zapier.runAction({
  app: "gmail",
  actionType: "write",
  action: "add_label",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action gmail write add_label \
  --inputs '{}'
```

## ConstructionOnline

### Identity
ConstructionOnline is a platform that allows builders to manage projects, teams, and profits - all in one place.

- App slug: constructiononline
- Operations published here: 55 (27 events, 16 functions, 7 queries, 5 search-or-write actions)

### Authentication
Zapier connects to ConstructionOnline via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection constructiononline
```

### Capabilities

#### Events (27)

Events fire when something happens in ConstructionOnline. Use them to start a run.

##### Album Created
Triggers when a new photo album is created.

- Type: read · Key: `album_created`
- Requires: nothing
- Optional: SOURCE_LOCATION
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "album_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read album_created`

##### Calendar Event Created
Triggers when a new calendar event is created.

- Type: read · Key: `calendar_event_created`
- Requires: nothing
- Optional: EVENT_TYPE_ID
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "calendar_event_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read calendar_event_created`

##### Calendar Event Ending
Triggers when a calendar event is about to end, within the chosen amount of time.

- Type: read · Key: `calendar_event_ending`
- Requires: nothing
- Optional: TIME_BEFORE, TIME_BEFORE_UNIT, EVENT_KIND, EVENT_TYPE_ID
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "calendar_event_ending" })`
- CLI: `npx zapier-sdk run-action constructiononline read calendar_event_ending`

##### Calendar Event Starting
Triggers when a calendar event is about to start, within the chosen amount of time.

- Type: read · Key: `calendar_event_starting`
- Requires: nothing
- Optional: TIME_BEFORE, TIME_BEFORE_UNIT, EVENT_KIND, EVENT_TYPE_ID
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "calendar_event_starting" })`
- CLI: `npx zapier-sdk run-action constructiononline read calendar_event_starting`

##### Calendar Event Updated
Triggers when a calendar event is updated.

- Type: read · Key: `calendar_event_updated`
- Requires: nothing
- Optional: EVENT_TYPE_ID
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "calendar_event_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read calendar_event_updated`

##### Comment Created
Triggers when a new comment is created.

- Type: read · Key: `comment_created`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "comment_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read comment_created`

##### Contact Assigned to Key Role
Triggers when a contact is assigned to a key role on a project.

- Type: read · Key: `contact_assigned_to_key_role`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "contact_assigned_to_key_role" })`
- CLI: `npx zapier-sdk run-action constructiononline read contact_assigned_to_key_role`

##### Contact Created
Triggers when a new contact is created in your company.

- Type: read · Key: `contact_created`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "contact_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read contact_created`

##### Contact Updated
Triggers when a contact is updated.

- Type: read · Key: `contact_updated`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "contact_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read contact_updated`

##### Daily Log Created
Triggers when a new daily log is created.

- Type: read · Key: `daily_log_created`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "daily_log_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read daily_log_created`

##### Daily Log Updated
Triggers when a daily log is updated.

- Type: read · Key: `daily_log_updated`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "daily_log_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read daily_log_updated`

##### File Created
Triggers when a new file is created.

- Type: read · Key: `file_created`
- Requires: nothing
- Optional: SOURCE_LOCATION
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "file_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read file_created`

##### Folder Created
Triggers when a new folder is created.

- Type: read · Key: `folder_created`
- Requires: nothing
- Optional: SOURCE_LOCATION
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "folder_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read folder_created`

##### Lead Created
Triggers when a new lead is created.

- Type: read · Key: `lead_created`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "lead_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read lead_created`

##### Lead Updated
Triggers when a lead is updated.

- Type: read · Key: `lead_updated`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "lead_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read lead_updated`

##### Message Created
Triggers when a new message is sent in a conversation.

- Type: read · Key: `message_created`
- Requires: nothing
- Optional: RECIPIENT_ID
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "message_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read message_created`

##### Opportunity Created
Triggers when a new opportunity is created.

- Type: read · Key: `opportunity_created`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "opportunity_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read opportunity_created`

##### Opportunity Updated
Triggers when an opportunity is updated.

- Type: read · Key: `opportunity_updated`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "opportunity_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read opportunity_updated`

##### Project Created
Triggers when a new project is created.

- Type: read · Key: `project_created`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "project_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read project_created`

##### Project Updated
Triggers when a project is updated.

- Type: read · Key: `project_updated`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "project_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read project_updated`

##### Time Entry Ended
Triggers when an employee clocks out or ends lunch or a break.

- Type: read · Key: `time_entry_ended`
- Requires: nothing
- Optional: EMPLOYEE_ID, SHIFT_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "time_entry_ended" })`
- CLI: `npx zapier-sdk run-action constructiononline read time_entry_ended`

##### Time Entry Entered (Manual)
Triggers when a time entry is manually entered into the system.

- Type: read · Key: `time_entry_entered`
- Requires: nothing
- Optional: EMPLOYEE_ID, SHIFT_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "time_entry_entered" })`
- CLI: `npx zapier-sdk run-action constructiononline read time_entry_entered`

##### Time Entry Started
Triggers when an employee clocks in or starts lunch or a break.

- Type: read · Key: `time_entry_started`
- Requires: nothing
- Optional: EMPLOYEE_ID, SHIFT_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "time_entry_started" })`
- CLI: `npx zapier-sdk run-action constructiononline read time_entry_started`

##### Time Entry Updated (Manual)
Triggers when a time entry is manually updated.

- Type: read · Key: `time_entry_updated`
- Requires: nothing
- Optional: EMPLOYEE_ID, SHIFT_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "time_entry_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read time_entry_updated`

##### To-Do Completed
Triggers when a to-do is completed.

- Type: read · Key: `to_do_completed`
- Requires: nothing
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "to_do_completed" })`
- CLI: `npx zapier-sdk run-action constructiononline read to_do_completed`

##### To-Do Created
Triggers when a new to-do is created.

- Type: read · Key: `to_do_created`
- Requires: nothing
- Optional: INCLUDE_SUBTASKS
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "to_do_created" })`
- CLI: `npx zapier-sdk run-action constructiononline read to_do_created`

##### To-Do Updated
Triggers when a to-do is updated.

- Type: read · Key: `to_do_updated`
- Requires: nothing
- Optional: INCLUDE_SUBTASKS
- SDK: `runAction({ app: "constructiononline", actionType: "read", action: "to_do_updated" })`
- CLI: `npx zapier-sdk run-action constructiononline read to_do_updated`

#### Functions (16)

Functions change something in ConstructionOnline.

##### Assign Contact
Assigns a contact to a to-do, calendar event, or schedule task.

- Type: write · Key: `assign_contact`
- Requires: ITEM_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "assign_contact" })`
- CLI: `npx zapier-sdk run-action constructiononline write assign_contact`

##### Create Calendar Event
Creates a calendar event on a project, custom, or personal calendar.

- Type: write · Key: `create_calendar_event`
- Requires: SUBJECT, CALENDAR_TYPE, START_DATE, END_DATE
- Optional: ALL_DAY_EVENT, EVENT_TYPE_ID, TRADE_ID, COST_IMPACT_TBD, NOTES, ASSIGNED_RESOURCE_IDS, RELATED_RESOURCE_IDS, IS_PRIVATE, IS_COMPLETE
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_calendar_event" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_calendar_event`

##### Create Comment
Creates a comment on an object.

- Type: write · Key: `create_comment`
- Requires: OBJECT_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_comment" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_comment`

##### Create Contact
Creates a contact and adds it to your company's contact list.

- Type: write · Key: `create_contact`
- Requires: TYPE, FIRSTNAME, LASTNAME, DISPLAY_NAME, EMAIL, COUNTRY
- Optional: COMPANY, CONTACT_GROUP, CONTACT_TRADE, CONTACT_CATEGORY, CONTACT_OFFICE, CONTACT_DIVISION, CONTACT_REGION, CONTACT_QUALITY, PHONE, MOBILE_PHONE, MOBILE_PROVIDER, FAX, WEBSITE, ADDRESS, CITY, STATE, ZIP
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_contact" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_contact`

##### Create Conversation
Creates a new conversation with an initial message.

- Type: write · Key: `create_conversation`
- Requires: SUBJECT, CONTENT, TO_IDS
- Optional: APPEND_SIGNATURE, CC_IDS, BCC_IDS, PROJECT_ID, IS_DRAFT
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_conversation" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_conversation`

##### Create Daily Log
Creates a daily log on a project.

- Type: write · Key: `create_daily_log`
- Requires: PROJECT_ID, ENTRY_DATE, LOG_TYPE
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_daily_log" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_daily_log`

##### Create Lead
Creates a lead.

- Type: write · Key: `create_lead`
- Requires: FIRSTNAME, LASTNAME, EMAIL, COUNTRY, LEAD_STATUS, LEAD_PROBABILITY
- Optional: MIDDLENAME, COMPANY, CONTACT_GROUP, CONTACT_CATEGORY, CONTACT_OFFICE, CONTACT_DIVISION, CONTACT_REGION, PHONE, MOBILE_PHONE, MOBILE_PROVIDER, FAX, WEBSITE, ADDRESS, CITY, STATE, ZIP, LEAD_STAGE, LEAD_SOURCE, LEAD_TYPE, LEAD_SALES_REPRESENTATIVE, LEAD_VALUE, LEAD_OPENED_DATE, LEAD_CLOSED_DATE, LEAD_QUALITY, LEAD_TAGS, LEAD_DETAILS
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_lead" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_lead`

##### Create Opportunity
Creates an opportunity.

- Type: write · Key: `create_opportunity`
- Requires: NAME, COUNTRY
- Optional: PROJECT_NUMBER, PROJECT_TYPE, PROJECT_GROUP, PROJECT_STAGE, PROJECT_CATEGORY, PROJECT_OFFICE, PROJECT_DIVISION, PROJECT_REGION, PROJECT_TAGS, CUSTOM_COLOR, PRIMARY_CLIENT, ADDRESS, CITY, STATE, ZIP, LAT, LON, CURRENCY, USE_CURRENCY_CODE, OPPORTUNITY_RELATED_LEADS, OPPORTUNITY_STATUS, OPPORTUNITY_STAGE, OPPORTUNITY_TYPE, OPPORTUNITY_SOURCE, OPPORTUNITY_REPRESENTATIVE, OPPORTUNITY_ESTIMATOR, OPPORTUNITY_REFERRER, OPPORTUNITY_VALUE, OPPORTUNITY_PROBABILITY, OPPORTUNITY_QUALITY, OPPORTUNITY_OPENED_DATE, OPPORTUNITY_BID_DUE_DATE, OPPORTUNITY_BID_SUBMITTED_DATE, OPPORTUNITY_LAST_CONTACT, OPPORTUNITY_NEXT_CALLBACK, OPPORTUNITY_CLOSED_DATE, OPPORTUNITY_NUMBER, PROJECT_NOTES, SCOPE_OF_WORK, COST_CODE_SET, ROLE, CON_ID, SHOW_CLIENTLINK, SHOW_TEAMLINK, IS_INACTIVE, TRAFFIC_COLOR
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_opportunity" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_opportunity`

##### Send Reply
Posts a reply message to an existing conversation.

- Type: write · Key: `create_reply`
- Requires: CONVERSATION_ID, CONTENT
- Optional: APPEND_SIGNATURE, IS_DRAFT
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_reply" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_reply`

##### Create Time Entry
Logs a completed time entry for the current user from the supplied start and end times.

- Type: write · Key: `create_time_entry`
- Requires: START_TIME, END_TIME
- Optional: PROJECT_ID, EMPLOYEE_NOTE, ADMIN_NOTE
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_time_entry" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_time_entry`

##### Create To-Do
Creates a to-do.

- Type: write · Key: `create_to_do`
- Requires: SUBJECT
- Optional: DESCRIPTION, PROJECT_ID, DUE_DATE, PRIORITY, ASSIGNED_RESOURCES, RELATED_RESOURCES, TRADE, TYPE, CATEGORY, STAGE, TAGS, TRAFFIC_LIGHT, COST_IMPACT, PERCENT_COMPLETE, COMPLETED_DATE, IS_PRIVATE
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "create_to_do" })`
- CLI: `npx zapier-sdk run-action constructiononline write create_to_do`

##### End Time Entry
Clocks the current user out, ending their open time entry at the current time.

- Type: write · Key: `end_time_entry`
- Requires: nothing
- Optional: EMPLOYEE_NOTE, FAIL_IF_NOT_CLOCKED_IN, RESUME_BREAK_OR_LUNCH_FIRST
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "end_time_entry" })`
- CLI: `npx zapier-sdk run-action constructiononline write end_time_entry`

##### Resume Shift
Resumes the current user's shift after a break or lunch, restoring their previous project and cost code.

- Type: write · Key: `resume_shift`
- Requires: nothing
- Optional: FAIL_IF_NOT_ON_BREAK_OR_LUNCH
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "resume_shift" })`
- CLI: `npx zapier-sdk run-action constructiononline write resume_shift`

##### Start Break
Puts the current user on a break at the current time.

- Type: write · Key: `start_break`
- Requires: nothing
- Optional: FAIL_IF_NOT_CLOCKED_IN, RESUME_BREAK_OR_LUNCH_FIRST
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "start_break" })`
- CLI: `npx zapier-sdk run-action constructiononline write start_break`

##### Start Lunch
Puts the current user on lunch at the current time.

- Type: write · Key: `start_lunch`
- Requires: nothing
- Optional: FAIL_IF_NOT_CLOCKED_IN, RESUME_BREAK_OR_LUNCH_FIRST
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "start_lunch" })`
- CLI: `npx zapier-sdk run-action constructiononline write start_lunch`

##### Start Time Entry
Clocks the current user in on a project, starting a new time entry at the current time.

- Type: write · Key: `start_time_entry`
- Requires: nothing
- Optional: PROJECT_ID, EMPLOYEE_NOTE, ADMIN_NOTE, FAIL_IF_ALREADY_CLOCKED_IN
- SDK: `runAction({ app: "constructiononline", actionType: "write", action: "start_time_entry" })`
- CLI: `npx zapier-sdk run-action constructiononline write start_time_entry`

#### Queries (7)

Queries read from ConstructionOnline and return data. They change nothing.

##### Find Calendar Event
Finds calendar events by subject, project, calendar, event type, or date range.

- Type: search · Key: `find_calendar_event`
- Requires: nothing
- Optional: subject, subjectExactMatch, projectId, customCalendarId, calendarType, eventTypeId, isAllDay, startsOnOrAfter, startsBefore, endsOnOrAfter, endsBefore
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_calendar_event" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_calendar_event`

##### Find Contact
Finds contacts matching the supplied filters.

- Type: search · Key: `find_contact`
- Requires: nothing
- Optional: email, phone
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_contact" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_contact`

##### Find Conversation
Finds conversations matching the supplied filters.

- Type: search · Key: `find_conversation`
- Requires: nothing
- Optional: subjectSearchTerm, projectID, recipientId, isUnread, isArchived, isDraft
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_conversation" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_conversation`

##### Find Lead
Finds leads matching the supplied filters.

- Type: search · Key: `find_lead`
- Requires: nothing
- Optional: email
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_lead" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_lead`

##### Find Project
Finds projects matching the supplied filters.

- Type: search · Key: `find_project`
- Requires: nothing
- Optional: name, nameExactMatch, number, numberExactMatch, includeArchived
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_project" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_project`

##### Find Schedule Task
Finds schedule tasks by subject, project, or start date.

- Type: search · Key: `find_schedule_task`
- Requires: nothing
- Optional: subject, subjectExactMatch, projectId, startsOnOrAfter, startsBefore
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_schedule_task" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_schedule_task`

##### Find To-Do
Finds to-dos by project, subject, assignee, parent, due date, or completion.

- Type: search · Key: `find_to_do`
- Requires: nothing
- Optional: subject, subjectExactMatch, projectId, assignedResourceId, parentToDoId, companyOnly, isComplete, dueOnOrAfter, dueBefore
- SDK: `runAction({ app: "constructiononline", actionType: "search", action: "find_to_do" })`
- CLI: `npx zapier-sdk run-action constructiononline search find_to_do`

#### Search or Write Actions (5)

These operations search for a match first, and create one only if nothing is found.

##### Find or Create Calendar Event
Finds calendar events matching the supplied filters.

- Type: search_or_write · Key: `find_calendar_event`
- Requires: SUBJECT, CALENDAR_TYPE, START_DATE, END_DATE
- Optional: subject, subjectExactMatch, projectId, customCalendarId, calendarType, eventTypeId, isAllDay, startsOnOrAfter, startsBefore, endsOnOrAfter, endsBefore, ALL_DAY_EVENT, EVENT_TYPE_ID, TRADE_ID, COST_IMPACT_TBD, NOTES, ASSIGNED_RESOURCE_IDS, RELATED_RESOURCE_IDS, IS_PRIVATE, IS_COMPLETE
- SDK: `runAction({ app: "constructiononline", actionType: "search_or_write", action: "find_calendar_event" })`
- CLI: `npx zapier-sdk run-action constructiononline search_or_write find_calendar_event`

##### Find or Create Contact
Finds contacts matching the supplied filters.

- Type: search_or_write · Key: `find_contact`
- Requires: TYPE, FIRSTNAME, LASTNAME, DISPLAY_NAME, EMAIL, COUNTRY
- Optional: email, phone, COMPANY, CONTACT_GROUP, CONTACT_TRADE, CONTACT_CATEGORY, CONTACT_OFFICE, CONTACT_DIVISION, CONTACT_REGION, CONTACT_QUALITY, PHONE, MOBILE_PHONE, MOBILE_PROVIDER, FAX, WEBSITE, ADDRESS, CITY, STATE, ZIP
- SDK: `runAction({ app: "constructiononline", actionType: "search_or_write", action: "find_contact" })`
- CLI: `npx zapier-sdk run-action constructiononline search_or_write find_contact`

##### Find or Create Conversation
Finds conversations matching the supplied filters.

- Type: search_or_write · Key: `find_conversation`
- Requires: SUBJECT, CONTENT, TO_IDS
- Optional: subjectSearchTerm, projectID, recipientId, isUnread, isArchived, isDraft, APPEND_SIGNATURE, CC_IDS, BCC_IDS, PROJECT_ID, IS_DRAFT
- SDK: `runAction({ app: "constructiononline", actionType: "search_or_write", action: "find_conversation" })`
- CLI: `npx zapier-sdk run-action constructiononline search_or_write find_conversation`

##### Find or Create Lead
Finds leads matching the supplied filters.

- Type: search_or_write · Key: `find_lead`
- Requires: FIRSTNAME, LASTNAME, EMAIL, COUNTRY, LEAD_STATUS, LEAD_PROBABILITY
- Optional: email, MIDDLENAME, COMPANY, CONTACT_GROUP, CONTACT_CATEGORY, CONTACT_OFFICE, CONTACT_DIVISION, CONTACT_REGION, PHONE, MOBILE_PHONE, MOBILE_PROVIDER, FAX, WEBSITE, ADDRESS, CITY, STATE, ZIP, LEAD_STAGE, LEAD_SOURCE, LEAD_TYPE, LEAD_SALES_REPRESENTATIVE, LEAD_VALUE, LEAD_OPENED_DATE, LEAD_CLOSED_DATE, LEAD_QUALITY, LEAD_TAGS, LEAD_DETAILS
- SDK: `runAction({ app: "constructiononline", actionType: "search_or_write", action: "find_lead" })`
- CLI: `npx zapier-sdk run-action constructiononline search_or_write find_lead`

##### Find or Create To-Do
Finds To-Dos matching the supplied filters.

- Type: search_or_write · Key: `find_to_do`
- Requires: SUBJECT
- Optional: subject, subjectExactMatch, projectId, assignedResourceId, parentToDoId, companyOnly, isComplete, dueOnOrAfter, dueBefore, DESCRIPTION, PROJECT_ID, DUE_DATE, PRIORITY, ASSIGNED_RESOURCES, RELATED_RESOURCES, TRADE, TYPE, CATEGORY, STAGE, TAGS, TRAFFIC_LIGHT, COST_IMPACT, PERCENT_COMPLETE, COMPLETED_DATE, IS_PRIVATE
- SDK: `runAction({ app: "constructiononline", actionType: "search_or_write", action: "find_to_do" })`
- CLI: `npx zapier-sdk run-action constructiononline search_or_write find_to_do`

## Gmail

### Identity
One of the most popular email services, Gmail keeps track of all your emails with threaded conversations, tags, and Google-powered search to find any message you need.

- App slug: gmail
- Operations published here: 23 (8 events, 12 functions, 2 queries, 1 search-or-write action)

### Authentication
Zapier connects to Gmail via oauth. Your code references a connection, not a raw credential.

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection gmail
```

### Capabilities

#### Events (8)

Events fire when something happens in Gmail. Use them to start a run.

##### New Attachment
Triggers when you receive a new attachment. Each check only finds emails received in the last hour, so attachments on older emails will not trigger, even if they appear in test results.

- Type: read · Key: `attachment`
- Requires: nothing
- Optional: label_ids, query
- SDK: `runAction({ app: "gmail", actionType: "read", action: "attachment" })`
- CLI: `npx zapier-sdk run-action gmail read attachment`

##### New Label
Triggers when you add a new label.

- Type: read · Key: `label`
- Requires: nothing
- SDK: `runAction({ app: "gmail", actionType: "read", action: "label" })`
- CLI: `npx zapier-sdk run-action gmail read label`

##### New Labeled Conversation
Triggers the first time a label is added to a conversation. Replies within that conversation will not trigger again.

- Type: read · Key: `labeled_conversation`
- Requires: labelId
- SDK: `runAction({ app: "gmail", actionType: "read", action: "labeled_conversation" })`
- CLI: `npx zapier-sdk run-action gmail read labeled_conversation`

##### New Labeled Email
Triggers when an email is labeled. Also triggers when a reply is added to the conversation.

- Type: read · Key: `label_message_v2`
- Requires: label_ids
- Optional: extended_polling_window
- SDK: `runAction({ app: "gmail", actionType: "read", action: "label_message_v2" })`
- CLI: `npx zapier-sdk run-action gmail read label_message_v2`

##### New Email
Triggers when a new email appears in the specified mailbox. Each check only finds emails received in the last hour, so older emails moved into the mailbox or label will not trigger, even if they appear in test results. To trigger on older emails you label, use New Labeled Email.

- Type: read · Key: `message`
- Requires: nothing
- Optional: label_ids
- SDK: `runAction({ app: "gmail", actionType: "read", action: "message" })`
- CLI: `npx zapier-sdk run-action gmail read message`

##### New Email Matching Search
Triggers when you receive a new email that matches a search string you provide. Each check only finds emails received in the last hour, so older emails that match later (for example, after you label them) will not trigger, even if they appear in test results. To trigger on older emails you label, use New Labeled Email.

- Type: read · Key: `search`
- Requires: query
- SDK: `runAction({ app: "gmail", actionType: "read", action: "search" })`
- CLI: `npx zapier-sdk run-action gmail read search`

##### New Starred Email
Triggers when you receive a new email and star it within two days.

- Type: read · Key: `star_message`
- Requires: nothing
- SDK: `runAction({ app: "gmail", actionType: "read", action: "star_message" })`
- CLI: `npx zapier-sdk run-action gmail read star_message`

##### New Conversation
Triggers when a new email conversation begins in your inbox. Each check only finds conversations with an email received in the last hour, so older conversations moved into a label will not trigger, even if they appear in test results. To trigger on older conversations you label, use New Labeled Conversation.

- Type: read · Key: `thread_v2`
- Requires: nothing
- Optional: label_ids
- SDK: `runAction({ app: "gmail", actionType: "read", action: "thread_v2" })`
- CLI: `npx zapier-sdk run-action gmail read thread_v2`

#### Functions (12)

Functions change something in Gmail.

##### Add Label to Email
Add a label to an email message.

- Type: write · Key: `add_label`
- Requires: new_label_ids, message_id
- SDK: `runAction({ app: "gmail", actionType: "write", action: "add_label" })`
- CLI: `npx zapier-sdk run-action gmail write add_label`

##### Archive Email
Archive an email message.

- Type: write · Key: `archive_email`
- Requires: message_id
- SDK: `runAction({ app: "gmail", actionType: "write", action: "archive_email" })`
- CLI: `npx zapier-sdk run-action gmail write archive_email`

##### Delete Email
Sends an email message to the trash.

- Type: write · Key: `delete_email`
- Requires: message_id
- SDK: `runAction({ app: "gmail", actionType: "write", action: "delete_email" })`
- CLI: `npx zapier-sdk run-action gmail write delete_email`

##### Create Draft
Create a draft email message.

- Type: write · Key: `draft_v2`
- Requires: subject, body
- Optional: to, cc, bcc, from, from_name, body_type, signature, render_signature_in_html, signature_delimiter, label_ids, file, recipient_instructions
- SDK: `runAction({ app: "gmail", actionType: "write", action: "draft_v2" })`
- CLI: `npx zapier-sdk run-action gmail write draft_v2`

##### Create Draft Reply
Create a draft reply to an existing email.

- Type: write · Key: `draft_v2_reply`
- Requires: thread_id, body
- Optional: trigger_instructions, to, cc, bcc, from, from_name, body_type, signature, render_signature_in_html, signature_delimiter, label_ids, file
- SDK: `runAction({ app: "gmail", actionType: "write", action: "draft_v2_reply" })`
- CLI: `npx zapier-sdk run-action gmail write draft_v2_reply`

##### Forward Email
Forward an existing email message to new recipients.

- Type: write · Key: `forward_email`
- Requires: message_id
- Optional: to, cc, bcc, from, from_name, reply_to, additional_message, body_type, include_attachments, label_ids
- SDK: `runAction({ app: "gmail", actionType: "write", action: "forward_email" })`
- CLI: `npx zapier-sdk run-action gmail write forward_email`

##### Get Conversation
Retrieves every message in a Gmail conversation by its thread ID.

- Type: write · Key: `get_conversation`
- Requires: thread_id
- Optional: format
- SDK: `runAction({ app: "gmail", actionType: "write", action: "get_conversation" })`
- CLI: `npx zapier-sdk run-action gmail write get_conversation`

##### Create Label
Creates a new label.

- Type: write · Key: `label`
- Requires: name
- SDK: `runAction({ app: "gmail", actionType: "write", action: "label" })`
- CLI: `npx zapier-sdk run-action gmail write label`

##### Send Email
Create and send a new email message.

- Type: write · Key: `message`
- Requires: subject, body
- Optional: to, cc, bcc, from, from_name, reply_to, body_type, signature, render_signature_in_html, signature_delimiter, label_ids, file, send_to_groups
- SDK: `runAction({ app: "gmail", actionType: "write", action: "message" })`
- CLI: `npx zapier-sdk run-action gmail write message`

##### Remove Label From Email
Remove a label from an email message.

- Type: write · Key: `remove_label`
- Requires: message_id, label_ids
- SDK: `runAction({ app: "gmail", actionType: "write", action: "remove_label" })`
- CLI: `npx zapier-sdk run-action gmail write remove_label`

##### Remove Label From Conversation
Remove a specified label from all emails within a conversation.

- Type: write · Key: `remove_thread_label`
- Requires: thread_id, label_ids
- SDK: `runAction({ app: "gmail", actionType: "write", action: "remove_thread_label" })`
- CLI: `npx zapier-sdk run-action gmail write remove_thread_label`

##### Reply to Email
Send a reply to an email message.

- Type: write · Key: `reply_to_message`
- Requires: thread_id, body
- Optional: trigger_instructions, to, cc, bcc, from, from_name, reply_to, subject, body_type, signature, render_signature_in_html, signature_delimiter, label_ids, file
- SDK: `runAction({ app: "gmail", actionType: "write", action: "reply_to_message" })`
- CLI: `npx zapier-sdk run-action gmail write reply_to_message`

#### Queries (2)

Queries read from Gmail and return data. They change nothing.

##### Get Attachment by Filename
Retrieves a specific Gmail message attachment by Filename.

- Type: search · Key: `attachment`
- Requires: message_id, attachment_filename
- Optional: attachment_size
- SDK: `runAction({ app: "gmail", actionType: "search", action: "attachment" })`
- CLI: `npx zapier-sdk run-action gmail search attachment`

##### Find Email
Finds an email message.

- Type: search · Key: `message`
- Requires: query
- SDK: `runAction({ app: "gmail", actionType: "search", action: "message" })`
- CLI: `npx zapier-sdk run-action gmail search message`

#### Search or Write Actions (1)

These operations search for a match first, and create one only if nothing is found.

##### Find or Send Email
Finds or creates a specific message.

- Type: search_or_write · Key: `message`
- Requires: query, subject, body
- Optional: to, cc, bcc, from, from_name, reply_to, body_type, signature, render_signature_in_html, signature_delimiter, label_ids, file, send_to_groups
- SDK: `runAction({ app: "gmail", actionType: "search_or_write", action: "message" })`
- CLI: `npx zapier-sdk run-action gmail search_or_write message`

## Frequently asked questions about automating with ConstructionOnline and Gmail

### My AI agent already connects to my apps. Why add Zapier?

Your AI agent’s built-in or native connectors cover a limited set of popular apps. Zapier reaches 10,000+ apps and 90,000+ triggers and actions. Zapier also adds what your AI agent can’t: one place to manage logins and credentials, so you never paste an API key; automations that keep running after the chat closes, with fixes you can review when a run hits a snag; and the freedom to switch agent interfaces without starting over.

### Can’t my AI agent already run tasks on a schedule?

Most popular AI agents can run scheduled tasks. And for simple recurring jobs, that might be all you need. Automations that run on Zapier can run on a schedule too, but they can also start the moment something happens in your apps—like when a new lead/ticket comes in or you get an email reply. Zapier also uses AI only in the steps that need judgment, so routine steps like posting to Slack or updating Salesforce don’t burn model tokens.

### Why not have my AI agent write me a script?

You can, and the first version will probably work. The trouble comes later: a script needs somewhere to run, a way to hear about events, and someone to keep it going. If an API changes or a login expires, your script can quietly stop until you notice. It also holds your keys, often in a repo, where a leak can expose your accounts. With Zapier, your agent builds the automation, and you publish it. Zapier hosts it, handles your logins and credentials, and records every run. If a run fails, Zapier diagnoses what went wrong and prepares a fix you can review. Or you can decide which fixes Zapier can apply for you.

## Links
- ConstructionOnline integrations: zapier.com/apps/constructiononline/integrations.md
- Gmail integrations: zapier.com/apps/gmail/integrations.md
- Full page: zapier.com/apps/constructiononline/integrations/gmail
- SDK: npmjs.com/package/@zapier/zapier-sdk