← Procore + HubSpot integrations

Search CRM with HubSpot API on Submittal Event (Instant) from Procore API

Pipedream makes it easy to connect APIs for HubSpot, Procore and 2,500+ other apps remarkably fast.

Trigger workflow on
Submittal Event (Instant) from the Procore API
Next, do this
Search CRM with the HubSpot API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 1,000,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Procore trigger and HubSpot action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the Submittal Event (Instant) trigger
    1. Connect your Procore account
    2. Select a Company
    3. Optional- Select a Project
  3. Configure the Search CRM action
    1. Connect your HubSpot account
    2. Select a Object Type
    3. Optional- Configure Create if not found?
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emits an event each time a Submittal is created, updated, or deleted in a project.
Version:0.0.2
Key:procore-submittal

Procore Overview

The Procore API empowers developers to interact with its construction management software programmatically, enabling automation of tasks, data synchronization, and enhanced reporting. With APIs covering project management, quality and safety, construction financials, and field productivity, you can craft workflows that streamline operations, reduce manual entry, and provide real-time insights. On Pipedream, these capabilities can be harnessed to create workflows that react to events in Procore or orchestrate actions between Procore and other apps, optimizing construction project workflows.

Trigger Code

const common = require("../common.js");

module.exports = {
  ...common,
  name: "Submittal Event (Instant)",
  key: "procore-submittal",
  description:
    "Emits an event each time a Submittal is created, updated, or deleted in a project.",
  version: "0.0.2",
  type: "source",
  methods: {
    ...common.methods,
    getResourceName() {
      return "Submittals";
    },
    async getDataToEmit(body) {
      const { resource_id: resourceId } = body;
      const resource = await this.procore.getSubmittal(
        this.company,
        this.project,
        resourceId,
      );
      return {
        ...body,
        resource,
      };
    },
    getMeta({
      id, event_type, timestamp, resource,
    }) {
      const {
        title, id: submittalId,
      } = resource;
      const eventType = event_type;
      const summary = title
        ? `${eventType} ${title}`
        : `${eventType} Submittal ID:${submittalId}`;
      const ts = new Date(timestamp).getTime();
      return {
        id,
        summary,
        ts,
      };
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
ProcoreprocoreappThis component uses the Procore app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
CompanycompanyintegerSelect a value from the drop down menu.
ProjectprojectintegerSelect a value from the drop down menu.

Trigger Authentication

Procore uses OAuth authentication. When you connect your Procore account, Pipedream will open a popup window where you can sign into Procore and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Procore API.

Pipedream requests the following authorization scopes when you connect your account:

About Procore

The all-in-one construction management software built to help you finish quality projects — safely, on time, and within budget.

Action

Description:Search companies, contacts, deals, feedback submissions, products, tickets, line-items, quotes, leads, or custom objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/search)
Version:1.0.2
Key:hubspot-search-crm

HubSpot Overview

The HubSpot API enables developers to integrate into HubSpots CRM, CMS, Conversations, and other features. It allows for automated management of contacts, companies, deals, and marketing campaigns, enabling custom workflows, data synchronization, and task automation. This streamlines operations and boosts customer engagement, with real-time updates for rapid response to market changes.

Action Code

import hubspot from "../../hubspot.app.mjs";
import {
  SEARCHABLE_OBJECT_TYPES,
  DEFAULT_CONTACT_PROPERTIES,
  DEFAULT_COMPANY_PROPERTIES,
  DEFAULT_DEAL_PROPERTIES,
  DEFAULT_TICKET_PROPERTIES,
  DEFAULT_PRODUCT_PROPERTIES,
  DEFAULT_LINE_ITEM_PROPERTIES,
  DEFAULT_LEAD_PROPERTIES,
} from "../../common/constants.mjs";
import common from "../common/common-create.mjs";
import { ConfigurationError } from "@pipedream/platform";

export default {
  key: "hubspot-search-crm",
  name: "Search CRM",
  description: "Search companies, contacts, deals, feedback submissions, products, tickets, line-items, quotes, leads, or custom objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/search)",
  version: "1.0.2",
  type: "action",
  props: {
    hubspot,
    objectType: {
      type: "string",
      label: "Object Type",
      description: "Type of CRM object to search for",
      options: [
        ...SEARCHABLE_OBJECT_TYPES,
        {
          label: "Custom Object",
          value: "custom_object",
        },
      ],
      reloadProps: true,
    },
    createIfNotFound: {
      type: "boolean",
      label: "Create if not found?",
      description: "Set to `true` to create the Hubspot object if it doesn't exist",
      default: false,
      optional: true,
      reloadProps: true,
    },
  },
  async additionalProps() {
    const props = {};

    if (this.objectType === "custom_object") {
      try {
        props.customObjectType = {
          type: "string",
          label: "Custom Object Type",
          options: async () => await this.getCustomObjectTypes(),
          reloadProps: true,
        };
      } catch {
        props.customObjectType = {
          type: "string",
          label: "Custom Object Type",
          reloadProps: true,
        };
      }
    }
    if (!this.objectType || (this.objectType === "custom_object" && !this.customObjectType)) {
      return props;
    }

    let schema;
    const objectType = this.customObjectType ?? this.objectType;
    try {
      schema = await this.hubspot.getSchema({
        objectType,
      });
      const properties = schema.properties;
      const searchableProperties = schema.searchableProperties?.map((prop) => {
        const propData = properties.find(({ name }) => name === prop);
        return {
          label: propData.label,
          value: propData.name,
        };
      });

      props.searchProperty = {
        type: "string",
        label: "Search Property",
        description: "The field to search",
        options: searchableProperties,
      };
    } catch {
      props.searchProperty = {
        type: "string",
        label: "Search Property",
        description: "The field to search",
      };
    }

    props.searchValue = {
      type: "string",
      label: "Search Value",
      description: "Search for objects where the specified search field/property contains an exact match of the search value",
    };
    const defaultProperties = this.getDefaultProperties();
    if (defaultProperties?.length) {
      props.info = {
        type: "alert",
        alertType: "info",
        content: `Properties:\n\`${defaultProperties.join(", ")}\``,
      };
    }

    try {
      // eslint-disable-next-line pipedream/props-description
      props.additionalProperties = {
        type: "string[]",
        label: "Additional properties to retrieve",
        optional: true,
        options: async ({ page }) => {
          if (page !== 0) {
            return [];
          }
          const { results: properties } = await this.hubspot.getProperties({
            objectType: this.customObjectType ?? this.objectType,
          });
          const defaultProperties = this.getDefaultProperties();
          return properties.filter(({ name }) => !defaultProperties.includes(name))
            .map((property) => ({
              label: property.label,
              value: property.name,
            }));
        },
      };
    } catch {
      props.additionalProperties = {
        type: "string[]",
        label: "Additional properties to retrieve",
        optional: true,
      };
    }

    let creationProps = {};
    if (this.createIfNotFound && objectType) {
      try {
        const { results: properties } = await this.hubspot.getProperties({
          objectType,
        });
        const relevantProperties = properties.filter(this.isRelevantProperty);
        const propDefinitions = [];
        for (const property of relevantProperties) {
          propDefinitions.push(await this.makePropDefinition(property, schema.requiredProperties));
        }
        creationProps = propDefinitions
          .reduce((props, {
            name, ...definition
          }) => {
            props[name] = definition;
            return props;
          }, {});
      } catch {
        props.creationProps = {
          type: "object",
          label: "Object Properties",
          description: "A JSON object containing the object to create if not found",
        };
      }
    }
    return {
      ...props,
      ...creationProps,
    };
  },
  methods: {
    ...common.methods,
    getObjectType() {
      return this.objectType;
    },
    getDefaultProperties() {
      if (this.objectType === "contact") {
        return DEFAULT_CONTACT_PROPERTIES;
      } else if (this.objectType === "company") {
        return DEFAULT_COMPANY_PROPERTIES;
      } else if (this.objectType === "deal") {
        return DEFAULT_DEAL_PROPERTIES;
      } else if (this.objectType === "ticket") {
        return DEFAULT_TICKET_PROPERTIES;
      } else if (this.objectType === "product") {
        return DEFAULT_PRODUCT_PROPERTIES;
      } else if (this.objectType === "line_item") {
        return DEFAULT_LINE_ITEM_PROPERTIES;
      } else if (this.objectType === "lead") {
        return DEFAULT_LEAD_PROPERTIES;
      } else {
        return [];
      }
    },
    async getCustomObjectTypes() {
      const { results } = await this.hubspot.listSchemas();
      return results?.map(({
        fullyQualifiedName: value, labels,
      }) => ({
        value,
        label: labels.plural,
      })) || [];
    },
  },
  async run({ $ }) {
    const {
      hubspot,
      objectType,
      customObjectType,
      additionalProperties = [],
      searchProperty,
      searchValue,
      /* eslint-disable no-unused-vars */
      info,
      createIfNotFound,
      creationProps,
      ...otherProperties
    } = this;

    const actualObjectType = customObjectType ?? objectType;

    const schema = await this.hubspot.getSchema({
      objectType: actualObjectType,
    });

    if (!schema.searchableProperties.includes(searchProperty)) {
      throw new ConfigurationError(
        `Property \`${searchProperty}\` is not a searchable property of object type \`${objectType}\`. ` +
        `\n\nAvailable searchable properties are: \`${schema.searchableProperties.join("`, `")}\``,
      );
    }

    const properties = creationProps
      ? typeof creationProps === "string"
        ? JSON.parse(creationProps)
        : creationProps
      : otherProperties;

    const defaultProperties = this.getDefaultProperties();
    const data = {
      properties: [
        ...defaultProperties,
        ...additionalProperties,
      ],
      filters: [
        {
          propertyName: searchProperty,
          operator: "EQ",
          value: searchValue,
        },
      ],
    };
    const { results } = await hubspot.searchCRM({
      object: actualObjectType,
      data,
      $,
    });

    if (!results?.length && createIfNotFound) {
      const response = await hubspot.createObject({
        $,
        objectType: actualObjectType,
        data: {
          properties,
        },
      });
      const objectName = hubspot.getObjectTypeName(actualObjectType);
      $.export("$summary", `Successfully created ${objectName}`);
      return response;
    }

    $.export("$summary", `Successfully retrieved ${results?.length} object(s).`);
    return results;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
HubSpothubspotappThis component uses the HubSpot app.
Object TypeobjectTypestringSelect a value from the drop down menu:{ "label": "Contacts", "value": "contact" }{ "label": "Companies", "value": "company" }{ "label": "Deals", "value": "deal" }{ "label": "Tickets", "value": "ticket" }{ "label": "Line Items", "value": "line_item" }{ "label": "Products", "value": "product" }{ "label": "Feedback Submissions", "value": "feedback_submission" }{ "label": "Leads", "value": "lead" }{ "label": "Custom Object", "value": "custom_object" }
Create if not found?createIfNotFoundboolean

Set to true to create the Hubspot object if it doesn't exist

Action Authentication

HubSpot uses OAuth authentication. When you connect your HubSpot account, Pipedream will open a popup window where you can sign into HubSpot and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any HubSpot API.

Pipedream requests the following authorization scopes when you connect your account:

business-intelligencecrm.lists.readcrm.lists.writecrm.objects.companies.readcrm.objects.companies.writecrm.objects.contacts.readcrm.objects.contacts.writecrm.objects.deals.readcrm.objects.deals.writecrm.objects.quotes.readcrm.objects.quotes.writecrm.objects.owners.readcrm.objects.listings.writecrm.objects.listings.readcrm.schemas.companies.readcrm.schemas.companies.writecrm.schemas.contacts.readcrm.schemas.contacts.writecrm.schemas.deals.readcrm.schemas.deals.writecrm.schemas.quotes.readcrm.schemas.listings.writecrm.schemas.listings.readconversations.readcrm.importfilesformsforms-uploaded-filesintegration-syncoauthtimeline

About HubSpot

HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.

More Ways to Connect HubSpot + Procore

Add Contact to List with HubSpot API on Budget Snapshot Event (Instant) from Procore API
Procore + HubSpot
 
Try it
Add Contact to List with HubSpot API on Commitment Change Order Event (Instant) from Procore API
Procore + HubSpot
 
Try it
Add Contact to List with HubSpot API on New Event (Instant) from Procore API
Procore + HubSpot
 
Try it
Add Contact to List with HubSpot API on Prime Contract Change Order Event (Instant) from Procore API
Procore + HubSpot
 
Try it
Add Contact to List with HubSpot API on Prime Contract Event(Instant) from Procore API
Procore + HubSpot
 
Try it
Budget Snapshot Event (Instant) from the Procore API

Emits an event each time a Budget Snapshot is created, updated, or deleted in a project.

 
Try it
Commitment Change Order Event (Instant) from the Procore API

Emits an event each time a Commitment Change Order is created, updated, or deleted in a project.

 
Try it
New Budget Snapshot Event (Instant) from the Procore API

Emit new event when a new budget snapshot event is created. See the documentation

 
Try it
New Change Order Package Event (Instant) from the Procore API

Emit new event when a new change order package event is created. See the documentation

 
Try it
New Commitment Change Order Event (Instant) from the Procore API

Emit new event when a new commitment change order event is created. See the documentation

 
Try it
Create Incident with the Procore API

Create a new incident. See the documentation

 
Try it
Create Manpower Log with the Procore API

Create a new manpower log. See the documentation

 
Try it
Create RFI with the Procore API

Create a new RFI. See the documentation

 
Try it
Create Submittal with the Procore API

Create a new submittal. See the documentation

 
Try it
Create Timesheet with the Procore API

Create a new timesheet. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
2,500+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Premium
Salesforce
Salesforce
Cloud-based customer relationship management (CRM) platform that helps businesses manage sales, marketing, customer support, and other business activities, ultimately aiming to improve customer relationships and streamline operations.
Premium
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Premium
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Premium
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Premium
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Premium
Snowflake
Snowflake
A data warehouse built for the cloud
Premium
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Premium
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.