APIs & Integrations

dhtbrowne
Member

Public App - Redirect URLs

SOLVE

Hey team,

I'll walk you through what I'm trying to do first. Then the issue I'm having.

Basically I'm wanting to have a button on a contact/company page that maybe says "Create Report" or something. That sends a webhook to an automation platform I have which will then take the contact/company ID and send it to an AI agent to do a deep dive report on a company along with ideas for how I might be able to sell to them and then it posts the report as a note back into hubspot.

I have the AI agent sorted, I just need to do the button. It looks like the only way I can create a button on a contact card is with a public app. I've created the public app, but I'm constantly getting stuck on the redirect URL part.

dhtbrowne_0-1742715749281.png

It seems like it's a required field... I've tried lots of different things in there, but when I go to install the app it does the redirect before the app is fully installed... And when I go through the API docs I can't work out what the redirect is really for, it's probably obvious and it's probably just my inexperience, but any help would be appreciated.

 

Secondary question... Because with the card, I don't actually need to fetch anything to populate through the card... I just need a button going to a webhook. On the account component I could really just have any URL there?

dhtbrowne_1-1742716190332.png

Don't suppose there is a way to make it so it doesn't try to hit any URL on load and is just there for the button?

And keen to know if you would all consider this to be the best way to add something like this? Or is there a better way?

0 Upvotes
1 Accepted solution
dhtbrowne
Solution
Member

Public App - Redirect URLs

SOLVE

Just to solve my own question... And for anyone else trying to work this out without much experience in this kinda stuff...

 

Turns out you need to get oauth access using the code that is sent back to the redirect URL. Then it's enable.

https://developers.hubspot.com/docs/reference/api/app-management/oauth#get-oauth-2.0-access-and-refr...

 

Haven't found a way to get actually build the button on a card yet though for my use case above so open to ideas from people

View solution in original post

0 Upvotes
1 Reply 1
dhtbrowne
Solution
Member

Public App - Redirect URLs

SOLVE

Just to solve my own question... And for anyone else trying to work this out without much experience in this kinda stuff...

 

Turns out you need to get oauth access using the code that is sent back to the redirect URL. Then it's enable.

https://developers.hubspot.com/docs/reference/api/app-management/oauth#get-oauth-2.0-access-and-refr...

 

Haven't found a way to get actually build the button on a card yet though for my use case above so open to ideas from people

0 Upvotes