[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"marketplace-site-banners":3,"@directus-labs\u002Fhubspot-operation":9},[4],{"id":5,"icon":6,"content":7,"link":8,"include_paths":6,"exclude_paths":6},"5cf2f5f6-aecf-4395-8c23-69de326fdf02",null,"Directus V12 is here","https:\u002F\u002Fdirectus.com\u002Fresources\u002Fv12-built-for-the-whole-team",{"name":10,"description":11,"verified":12,"id":13,"readme":14,"type":15,"last_updated":16,"host_version":17,"downloads":18,"total_downloads":19,"sandbox":20,"license":6,"publisher":21,"versions":30,"formatted_name":68,"formatted_readme":69,"formatted_description":11,"featured_image":70,"images":71,"recent_downloads_7_days":19,"recent_downloads_30_days":19},"@directus-labs\u002Fhubspot-operation","Hubspot API operation for managing companies, contacts, activities, and deals.",false,"241a517a-5266-4328-8b07-59d3d4670fa6","# HubSpot API Operation\n\nThe HubSpot Operation allows you to integrate their API into Directus flows.\n\n![Hubspot API Operation](https:\u002F\u002Fraw.githubusercontent.com\u002Fdirectus-labs\u002Fextensions\u002Fmain\u002Fpackages\u002Fhubspot-operation\u002Fdocs\u002Fhubspot-operation.jpg)\n\n## Endpoints\n\n- [`\u002Faccount-info\u002Fv3\u002Factivity\u002Faudit-logs`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fsettings\u002Faccount-activity-api)\n- [`\u002Faccount-info\u002Fv3\u002Factivity\u002Flogin`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fsettings\u002Faccount-activity-api#get-%2Faccount-info%2Fv3%2Factivity%2Flogin)\n- [`\u002Faccount-info\u002Fv3\u002Factivity\u002Fsecurity`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fsettings\u002Faccount-activity-api#get-%2Faccount-info%2Fv3%2Factivity%2Fsecurity)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcontacts)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fcommunications`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcommunications)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fcompanies`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcompanies)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcontacts)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fdeals`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fdeals)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Femail`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Femail)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fleads`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fleads)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fmeetings`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fmeetings)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fnotes`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fnotes)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Fproducts`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fproducts)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Ftasks`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Ftasks)\n- [`\u002Fcrm\u002Fv3\u002Fobjects\u002Ftickets`](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Ftickets)\n\n## Usage\n\n1. Obtain an API Access Token from HubSpot. See [HubSpot Private App](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Fguides\u002Fapps\u002Fprivate-apps\u002Foverview) for instructions.\n2. In your Directus flow, create a new operation and choose HubSpot API from the list.\n3. Copy and paste the API Access token from HubSpot into the required field. It's worth noting the token somewhere safe because you will need it when creating more HubSpot operations.\n4. Choose a endpoint to use from the dropdown list\n5. Choose and action to perform. The Actions dropdown list will update with the available actions for the selected endpoint.\n6. New fields will appear relevant to the action. Populate these fields as needed.\n\n## Requirements\n\n- Directus 10.10.0+\n- HubSpot Account (Free or Paid)\n- Private App Access Token\n\n## Installation\n\nRefer to the Official Guide for details on installing the extension from the Marketplace or manually.\n\n## Permissions\n\nThis operation relies on the permissions of the API Access Token. Please make sure to assign the required permissions beforehand.\n\n| Endpoint(s) | Scopes |\n| -------- | ------ |\n| Activity | `account-info.security.read` |\n| Calls\u003Cbr\u002F>Communications\u003Cbr\u002F>Contacts\u003Cbr\u002F>Meetings\u003Cbr\u002F>Tasks | `crm.objects.contacts.read`\u003Cbr\u002F>`crm.objects.contacts.write`\u003Cbr\u002F>&nbsp;\u003Cbr\u002F>&nbsp;\u003Cbr\u002F>&nbsp; |\n| Companies\u003Cbr\u002F>&nbsp; | `crm.objects.companies.read`\u003Cbr\u002F>`crm.objects.companies.write` |\n| Email\u003Cbr\u002F>&nbsp; | `sales-email-read` &amp; `crm.objects.contacts.read`\u003C\u002Fbr>`crm.objects.contacts.write`\u003C\u002Fbr> |\n| Deals\u003Cbr\u002F>&nbsp; | `crm.objects.deals.read`\u003Cbr\u002F>`crm.objects.deals.write` |\n| Leads\u003Cbr\u002F>&nbsp; | `crm.objects.leads.read`\u003Cbr\u002F>`crm.objects.leads.write` |\n| Products | `e-commerce` |\n| Tickets | `tickets` |\n\n## Fields\n\nFor more detailed information about the HubSpot API and its capabilities, please refer to the [HubSpot API reference](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002F).\n\n### Associations\n\nAssociations represent the relationships between objects and activities in the HubSpot CRM. Record associations can exist between records of different objects (e.g., Contact to Company), as well as within the same object (e.g., Company to Company).\n\nWhen creating a new item, you can also associate the item with existing records or activities by including an associations object. For example, to associate a new contact with an existing company and email, your request would look like the following:\n\n```\nassociation: [\n  {\n    \"to\": {\n      \"id\": 123456  \u003C--- ID of the existing item\n    },\n    \"types\": [\n      {\n        \"associationCategory\": \"HUBSPOT_DEFINED\",\n        \"associationTypeId\": 279  \u003C---- ID of the category\n      }\n    ]\n  }\n]\n```\n\n\n### Properties\n\nUse properties to store information on CRM records. HubSpot provides a set of default properties for each CRM object, and you can also create and manage your own custom properties in the HubSpot Data Model. Check out the [properties guide](https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Fguides\u002Fapi\u002Fcrm\u002Fproperties) in HubSpot's documentation and familiarize yourself with the default properties for each endpoint.\n\nBe mindful that some properties have fixed values that are allowed. Make sure to use these values when creating or updating records.\n\n```\n{\n  \"firstname\": \"Jane\",\n  \"surname\": \"Smith\",\n  \"email\": \"j.smith@example.com\"\n}\n```\n\n### ID Fields\n\nThe ID field is required when updating or deleted an item. This must be the ID of the item from HubSpot and can be fetched using the Read action or by saving the ID within Directus after creation.\n\n### List Fields\n\nA comma seperated list of properties to return in the API response. Type the field and hit return to add the property.\n\n### Revision Fields\n\nA comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Type the field and hit return to add the property.\n\n### Pagination Token\n\nAlso known as \"after\", this field is used for pagination of the results. You can retrieve the paging cursor token from the previous API request on the same endpoint. The response looks like this:\n\n```\n\"paging\": {\n    \"next\": {\n      \"after\": \"123456789\",\n      \"link\": \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts?limit=10&properties=firstname%2Csurname%2Cemail&after=123456789\"\n    }\n  }\n```\n\n_Note: paging will be absent if there are less results on the current page than the limit_\n\n### Limit\n\nBy default this is set to 10 entries. Change this value to retrieve more or less results.\n\n### Sort\n\nSpecifiy a field to sort the results by.\n\n### Occurred After and Occurred Before\n\nThe Activity endpoint has an additional datetime field. This will limit the scope of the query to the specified timeframe. Leaving these blank will default to the most recent activity.\n\n\n## Webhooks\n\nHubSpot offer a Webhook as part of the private app which can be linked to a Directus webhook flow for a more circular workflow.\n\n\n## Security Considerations\n\n- Keep your HubSpot API access key secure and never expose it in client-side code.\n- Use Directus roles and permissions to control access to this operation.\n- Be cautious when dealing with sensitive user data.\n- Consider rotating the API access key to maintain security.\n\n## Error Handling\n\nThe operation will throw an error if the API returns an error response. Make sure to handle these errors appropriately in your flows.\n\nDetailed Error responses can be found in the HubSpot private app details and within the Directus Flow log.\n\n---\n","operation","2024-12-18T11:14:12.497Z","^10.0.0 || ^11.0.0",[],0,true,{"username":22,"verified":20,"id":23,"github_username":22,"github_name":24,"github_blog":25,"github_bio":26,"github_location":27,"github_company":28,"github_avatar_url":29},"ukmadlz","74ce2e77-733a-4e9a-b96d-93bf6264f622","Mike Elsmore","http:\u002F\u002Felsmore.me","(╯°□°）╯︵ TABLEFLIP","UK","@DigitalSpeed","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F804683?v=4",[31,52],{"version":32,"package":13,"publisher":23,"type":15,"host_version":17,"publish_date":16,"verified":12,"id":33,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":34,"unpacked_size":35,"sandbox":20,"sandbox_requested_scopes":36,"license":6,"bundled":46,"maintainers":47},"1.0.1","27adf025-fff9-49d5-a65b-a1987e4675a5",4,100673,{"request":37,"log":45},{"urls":38,"methods":40},[39],"https:\u002F\u002Fapi.hubapi.com\u002F**",[41,42,43,44],"GET","POST","PATCH","DELETE",{},[],[48,49,50,51],11707,11708,11709,11710,{"version":53,"package":13,"publisher":54,"type":15,"host_version":17,"publish_date":55,"verified":12,"id":56,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":34,"unpacked_size":57,"sandbox":20,"sandbox_requested_scopes":58,"license":6,"bundled":63,"maintainers":64},"1.0.0","8486d50d-a6bc-45c6-8627-60f3c144732c","2024-12-03T15:34:32.574Z","4afb0e16-d72b-4649-a7b3-90efb18ec02b",100539,{"request":59,"log":62},{"urls":60,"methods":61},[39],[41,42,43,44],{},[],[65,66,67],11621,11622,11623,"Hubspot Operation","\u003Ch1>HubSpot API Operation\u003C\u002Fh1>\n\u003Cp>The HubSpot Operation allows you to integrate their API into Directus flows.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdirectus-labs\u002Fextensions\u002Fmain\u002Fpackages\u002Fhubspot-operation\u002Fdocs\u002Fhubspot-operation.jpg\" alt=\"Hubspot API Operation\">\u003C\u002Fp>\n\u003Ch2>Endpoints\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fsettings\u002Faccount-activity-api\">\u003Ccode>\u002Faccount-info\u002Fv3\u002Factivity\u002Faudit-logs\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fsettings\u002Faccount-activity-api#get-%2Faccount-info%2Fv3%2Factivity%2Flogin\">\u003Ccode>\u002Faccount-info\u002Fv3\u002Factivity\u002Flogin\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fsettings\u002Faccount-activity-api#get-%2Faccount-info%2Fv3%2Factivity%2Fsecurity\">\u003Ccode>\u002Faccount-info\u002Fv3\u002Factivity\u002Fsecurity\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcontacts\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcommunications\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fcommunications\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcompanies\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fcompanies\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fcontacts\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fdeals\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fdeals\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Femail\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Femail\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fleads\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fleads\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fmeetings\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fmeetings\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fnotes\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fnotes\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Fproducts\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Fproducts\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Ftasks\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Ftasks\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002Fcrm\u002Fobjects\u002Ftickets\">\u003Ccode>\u002Fcrm\u002Fv3\u002Fobjects\u002Ftickets\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Usage\u003C\u002Fh2>\n\u003Col>\n\u003Cli>Obtain an API Access Token from HubSpot. See \u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Fguides\u002Fapps\u002Fprivate-apps\u002Foverview\">HubSpot Private App\u003C\u002Fa> for instructions.\u003C\u002Fli>\n\u003Cli>In your Directus flow, create a new operation and choose HubSpot API from the list.\u003C\u002Fli>\n\u003Cli>Copy and paste the API Access token from HubSpot into the required field. It's worth noting the token somewhere safe because you will need it when creating more HubSpot operations.\u003C\u002Fli>\n\u003Cli>Choose a endpoint to use from the dropdown list\u003C\u002Fli>\n\u003Cli>Choose and action to perform. The Actions dropdown list will update with the available actions for the selected endpoint.\u003C\u002Fli>\n\u003Cli>New fields will appear relevant to the action. Populate these fields as needed.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>Requirements\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Directus 10.10.0+\u003C\u002Fli>\n\u003Cli>HubSpot Account (Free or Paid)\u003C\u002Fli>\n\u003Cli>Private App Access Token\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Installation\u003C\u002Fh2>\n\u003Cp>Refer to the Official Guide for details on installing the extension from the Marketplace or manually.\u003C\u002Fp>\n\u003Ch2>Permissions\u003C\u002Fh2>\n\u003Cp>This operation relies on the permissions of the API Access Token. Please make sure to assign the required permissions beforehand.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Endpoint(s)\u003C\u002Fth>\n\u003Cth>Scopes\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Activity\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>account-info.security.read\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Calls\u003Cbr>Communications\u003Cbr>Contacts\u003Cbr>Meetings\u003Cbr>Tasks\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>crm.objects.contacts.read\u003C\u002Fcode>\u003Cbr>\u003Ccode>crm.objects.contacts.write\u003C\u002Fcode>\u003Cbr>&nbsp;\u003Cbr>&nbsp;\u003Cbr>&nbsp;\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Companies\u003Cbr>&nbsp;\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>crm.objects.companies.read\u003C\u002Fcode>\u003Cbr>\u003Ccode>crm.objects.companies.write\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Email\u003Cbr>&nbsp;\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>sales-email-read\u003C\u002Fcode> &amp; \u003Ccode>crm.objects.contacts.read\u003C\u002Fcode>\u003Cbr>\u003Ccode>crm.objects.contacts.write\u003C\u002Fcode>\u003Cbr>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Deals\u003Cbr>&nbsp;\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>crm.objects.deals.read\u003C\u002Fcode>\u003Cbr>\u003Ccode>crm.objects.deals.write\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Leads\u003Cbr>&nbsp;\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>crm.objects.leads.read\u003C\u002Fcode>\u003Cbr>\u003Ccode>crm.objects.leads.write\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Products\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>e-commerce\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Tickets\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>tickets\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Ch2>Fields\u003C\u002Fh2>\n\u003Cp>For more detailed information about the HubSpot API and its capabilities, please refer to the \u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Freference\u002Fapi\u002F\">HubSpot API reference\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3>Associations\u003C\u002Fh3>\n\u003Cp>Associations represent the relationships between objects and activities in the HubSpot CRM. Record associations can exist between records of different objects (e.g., Contact to Company), as well as within the same object (e.g., Company to Company).\u003C\u002Fp>\n\u003Cp>When creating a new item, you can also associate the item with existing records or activities by including an associations object. For example, to associate a new contact with an existing company and email, your request would look like the following:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>association: [\n  {\n    \"to\": {\n      \"id\": 123456  &lt;--- ID of the existing item\n    },\n    \"types\": [\n      {\n        \"associationCategory\": \"HUBSPOT_DEFINED\",\n        \"associationTypeId\": 279  &lt;---- ID of the category\n      }\n    ]\n  }\n]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Properties\u003C\u002Fh3>\n\u003Cp>Use properties to store information on CRM records. HubSpot provides a set of default properties for each CRM object, and you can also create and manage your own custom properties in the HubSpot Data Model. Check out the \u003Ca href=\"https:\u002F\u002Fdevelopers.hubspot.com\u002Fbeta-docs\u002Fguides\u002Fapi\u002Fcrm\u002Fproperties\">properties guide\u003C\u002Fa> in HubSpot's documentation and familiarize yourself with the default properties for each endpoint.\u003C\u002Fp>\n\u003Cp>Be mindful that some properties have fixed values that are allowed. Make sure to use these values when creating or updating records.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>{\n  \"firstname\": \"Jane\",\n  \"surname\": \"Smith\",\n  \"email\": \"j.smith@example.com\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>ID Fields\u003C\u002Fh3>\n\u003Cp>The ID field is required when updating or deleted an item. This must be the ID of the item from HubSpot and can be fetched using the Read action or by saving the ID within Directus after creation.\u003C\u002Fp>\n\u003Ch3>List Fields\u003C\u002Fh3>\n\u003Cp>A comma seperated list of properties to return in the API response. Type the field and hit return to add the property.\u003C\u002Fp>\n\u003Ch3>Revision Fields\u003C\u002Fh3>\n\u003Cp>A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Type the field and hit return to add the property.\u003C\u002Fp>\n\u003Ch3>Pagination Token\u003C\u002Fh3>\n\u003Cp>Also known as \"after\", this field is used for pagination of the results. You can retrieve the paging cursor token from the previous API request on the same endpoint. The response looks like this:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\"paging\": {\n    \"next\": {\n      \"after\": \"123456789\",\n      \"link\": \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts?limit=10&amp;properties=firstname%2Csurname%2Cemail&amp;after=123456789\"\n    }\n  }\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cem>Note: paging will be absent if there are less results on the current page than the limit\u003C\u002Fem>\u003C\u002Fp>\n\u003Ch3>Limit\u003C\u002Fh3>\n\u003Cp>By default this is set to 10 entries. Change this value to retrieve more or less results.\u003C\u002Fp>\n\u003Ch3>Sort\u003C\u002Fh3>\n\u003Cp>Specifiy a field to sort the results by.\u003C\u002Fp>\n\u003Ch3>Occurred After and Occurred Before\u003C\u002Fh3>\n\u003Cp>The Activity endpoint has an additional datetime field. This will limit the scope of the query to the specified timeframe. Leaving these blank will default to the most recent activity.\u003C\u002Fp>\n\u003Ch2>Webhooks\u003C\u002Fh2>\n\u003Cp>HubSpot offer a Webhook as part of the private app which can be linked to a Directus webhook flow for a more circular workflow.\u003C\u002Fp>\n\u003Ch2>Security Considerations\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Keep your HubSpot API access key secure and never expose it in client-side code.\u003C\u002Fli>\n\u003Cli>Use Directus roles and permissions to control access to this operation.\u003C\u002Fli>\n\u003Cli>Be cautious when dealing with sensitive user data.\u003C\u002Fli>\n\u003Cli>Consider rotating the API access key to maintain security.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Error Handling\u003C\u002Fh2>\n\u003Cp>The operation will throw an error if the API returns an error response. Make sure to handle these errors appropriately in your flows.\u003C\u002Fp>\n\u003Cp>Detailed Error responses can be found in the HubSpot private app details and within the Directus Flow log.\u003C\u002Fp>\n\u003Chr>\n","https:\u002F\u002Fraw.githubusercontent.com\u002Fdirectus-labs\u002Fextensions\u002Fmain\u002Fpackages\u002Fhubspot-operation\u002Fdocs\u002Fhubspot-operation.jpg",[70]]