Integrate Thnks with HubSpot workflows using custom code actions to automatically send gifts.
Create or Edit a HubSpot Workflow
Add a Custom Code Action
Configure Input Fields
email
- Contact’s email addressfirstname
- Contact’s first namelastname
- Contact’s last namehubspot_owner_id
- The HubSpot owner’s name or IDAdd the Python Code
<GIFT ID>
with your actual Thnks gift ID (e.g., 12345
)<API TOKEN>
with your Thnks API authorization tokenConfigure Output Fields
email
- The recipient’s email addressresponse_status
- HTTP status code from the API callresponse_data
- Full response from the Thnks APIerror
- Error message if the request failsTest the Workflow
Activate the Workflow
error
output field.
print()
function to log values during testing