This repository contains code examples of HubSpot Custom Code Actions that visitors can paste inside a workflow.
HubSpot Custom Code Actions allow users to add custom functionality to their workflows using JavaScript or Python code snippets. These code snippets can be used to perform various actions, such as sending a webhook, fetching data from an external API, or manipulating data within HubSpot. PLease visit the official documentation.
To use the code examples in this repository, simply copy the code snippet from the relevant file and paste it into the "Custom code" field in your HubSpot workflow action. Make sure to modify any variables or parameters as needed to fit your specific use case.
This repository contains the following code examples:
custom_code_associations.js: a code snippet for associating a custom object to a deal custom_code_custom_ticket_id.js: a code snippet for populating a sequential consecutive custom id to all tickets. custom_code_merge_contact_by_phone.js: a code snippet for merging contacts if a duplicate with the same phone number is found. custom_code_schedule_email_delivery.js: a code snippet for sending a marketing email at a specific date.
Contributions to this repository are welcome! If you have a code example that you would like to add, please fork the repository and submit a pull request.