https://retellai.com/?utm_source=discord&utm_medium=seo logo
s
I'm sending information from Retell to GHL through custom functions and through GHL webhooks. However, in the incoming payload there is no URL included. So my question is, how can I find out what the Retell URL is, that the info is sent through, so I can send information back to that Retell URL?
n
When you say the incoming payload, do you mean the webhook event coming from Retell server?
Or you mean the custom Tool call made from Retell server?
- Also I dont understand what do you mean by the "retell url" for sending back the info? - Because wherever your custom Tool Function/endpoint is hosted, you can simply send back the response for the incoming request. Can you elaborate your setup?
You can have a look at this to understand more about using custom tools: https://docs.retellai.com/retell-llm/tool-calling#define-custom-tools
s
custom tool
I've set up an inbound webhook in ghl. Then i pasted the url of that webhook into the custom tool in retell. Ghl doesnt have a reverse webhook module. So, I need to set up a custom webhook in ghl with a url pointing to my retell agent, so it gets the information.
The url i used so far is: https://api.retellai.com/retell-llm-new/2701b790a07f5d8ef846362798ca2d22 But im not sure if this is correct, as its not working
bearer token was included in the headers
This scenario worked in make because in make there is a "webhook response" module which doesnt require a url to send the info back to retell. However in ghl there is not such a module.
n
Hmm I think what you can try is, when the request comes into ghl, then you can extract either the
origin
request header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin) or
host
request header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host) and use that url to send back your response in the subsequent ghl module. I havent tried this but maybe you can try it. The origin header gives you the url from where the request originated
s
Still failed
The headers from the incoming webhook look like this: "headers": { "host": "services.leadconnectorhq.com", "cdn-loop": "cloudflare", "cf-ipcountry": "US", "accept-encoding": "gzip, br", "x-forwarded-for": "100.20.5.228,10.11.71.1", "cf-ray": "87dae172376fc383-SEA", "content-length": "986", "x-forwarded-proto": "https", "cf-visitor": { "scheme": "https" }, "content-type": "application/json", "x-retell-signature": "v=1714682989304,d=27b9890dddd98646be97d2728c328b5d54be33bd6ca1132c3eeed88a76cc4f57", "accept": "*/*", "accept-language": "*", "sec-fetch-mode": "cors", "user-agent": "node", "cf-connecting-ip": "100.20.5.228", "x-envoy-external-address": "10.11.71.1", "x-request-id": "b83ec3c6-f189-41e7-a1f4-8932e9d01e0c", "x-envoy-attempt-count": "1", "x-forwarded-client-cert": "By=spiffe://cluster.local/ns/default/sa/default-automation-workflows;Hash=780a213f94bcf67c290045c66a455a81f0d12a2c32c5cf745f69bb355a5ca8c5;Subject=\"\";URI=spiffe://cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account", "x-b3-traceid": "5e1fb74e4891964ce0bb812693dac7af", "x-b3-spanid": "2a24576fa0a4514b", "x-b3-parentspanid": "e0bb812693dac7af", "x-b3-sampled": "0" }
r
@Zexia - Retell AI please take a look when you have time
z
are you trying to reply to a custom function or something, what's the context
s
Yes, custom function. Trying to send webhooks from go high level to retell. However, the url im using(see above) doesnt seem to be correct, as its not working. Is there a webhook url endpoint for the custom function to receive external info?
z
it seems like you already received the webhook, as the header you print seems like a valid header
are you saying you cannot get the body of the webhook or something
s
No, the webhook isnt being send im getting an error message
z
I think the error is from the go high level. BTW for custom functions, it's Retell server sending the request to your server webhook handler to process, so in this case it's Retell sending to go high level
n
@Zexia - Retell AI I think what @sanava.ai is facing is: 1.) she is using a ghl endpoint as a custom function. So it receives the payload from Retell when that function is called by retell LLM. 2.) but the ghl endpoint (webhook) which she setup for the custom function does not allow her to send back the response. For that she is trying to send back a http response separately to the URL that is intercepted in the host header of the incoming request. 3.) ghl stands for gohighlevel. Seems like an automation pipeline to me.
s
correct!
still havent found a solution for this. That's why I need to use another automation pipeline (make.com) which has a webhook response module. Of course it would be best to not have that many softwares involved.
z
> but the ghl endpoint (webhook) which she setup for the custom function does not allow her to send back the response. I guess the best solution is just to send back response directly. If make.com can support that this then I guess that's the right move for you