APIs & Integrations

SHillesheim
Participant

Send internal E-Mail with custom coded Button

SOLVE

Hi,

 

I have the following scenario:

 

I want to create a workflow that sends an email to the owner of a deal when a specific deal status is reached. The email should contain a button that, when clicked, closes the deal.

 

Since HubSpot does not offer this function, I want to use Zapier to update the deal. The plan is to send an email to the deal owner with a button, which pushes the email data to Zapier. Zapier then updates the deal.

 

Can I somehow incorporate HTML code, JavaScript or Python into the internal email? Or is there any solution for implementing the scenario described above?

0 Upvotes
2 Accepted solutions
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Send internal E-Mail with custom coded Button

SOLVE

Hey @SHillesheim you can't really do any functional programming in email, no email client will support JS or other programing languages as it would pose a huge security risk. So whatever happens would need to happen after the button click and not within the email. 

 

I'm sure it's possible, but it would be quite tricky. I would imagine you'd want something like a personalization token in the email & button to say the HubSpot deal ID. After the button click you'd want to pass that deal ID to your custom code and trigger a custom event (in zapier or elsewhere) that updates the deal. This api might help. 

Zapier is quite object based too, normally it would trigger like a HubSpot workflow where the deal itself, or an associated contact would need to take action to trigger something. Getting an internal user to do it might require a bit of custom code prior to the zapier actions to actually parse the information. 

 

You could also just add the link to the deal in the email and prompt the sales person to log into HubSpot and close it from the deal record for a super easy workaround though! 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


View solution in original post

TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Send internal E-Mail with custom coded Button

SOLVE

Hey @SHillesheim you can definitely build custom buttons with JS in design manager, the JS won't run in most email clients however so won't do anything. I would say the email editor would also strip it out but I'm not sure about it. 

 

You'd need something like a dynamic link generator. So a custom workflow that creates something like : website.com?dealID=12345 

Then a custom script that runs on the page the button links to and zapier that closes the deal. It wouldn't be possible to have an email send data to zapier without going to a page somewhere. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


View solution in original post

4 Replies 4
SHillesheim
Participant

Send internal E-Mail with custom coded Button

SOLVE

@TomM2 

 

Okay, now I understand what you mean. I think I will try out your suggestion.

 

Thanks for the help!

0 Upvotes
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Send internal E-Mail with custom coded Button

SOLVE

Hey @SHillesheim you can't really do any functional programming in email, no email client will support JS or other programing languages as it would pose a huge security risk. So whatever happens would need to happen after the button click and not within the email. 

 

I'm sure it's possible, but it would be quite tricky. I would imagine you'd want something like a personalization token in the email & button to say the HubSpot deal ID. After the button click you'd want to pass that deal ID to your custom code and trigger a custom event (in zapier or elsewhere) that updates the deal. This api might help. 

Zapier is quite object based too, normally it would trigger like a HubSpot workflow where the deal itself, or an associated contact would need to take action to trigger something. Getting an internal user to do it might require a bit of custom code prior to the zapier actions to actually parse the information. 

 

You could also just add the link to the deal in the email and prompt the sales person to log into HubSpot and close it from the deal record for a super easy workaround though! 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


SHillesheim
Participant

Send internal E-Mail with custom coded Button

SOLVE

Hi Tom,

 

Thank you for your response. I've read that it's possible to create buttons in the Design Manager that utilize JavaScript functions.

 

The idea is to fetch the content and send it to Zapier when the button is clicked. Subsequently, the relevant deal should be updated. 

 

We are already using the method of sending the deal link. The intention behind this custom button was to reduce processing time and to simplify lead management within our daily workflow.

 

thanks for your reply!

0 Upvotes
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Send internal E-Mail with custom coded Button

SOLVE

Hey @SHillesheim you can definitely build custom buttons with JS in design manager, the JS won't run in most email clients however so won't do anything. I would say the email editor would also strip it out but I'm not sure about it. 

 

You'd need something like a dynamic link generator. So a custom workflow that creates something like : website.com?dealID=12345 

Then a custom script that runs on the page the button links to and zapier that closes the deal. It wouldn't be possible to have an email send data to zapier without going to a page somewhere. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.