Can anyone help troubleshoot a custom formula? I am trying to write a post request to an external api, which does not appear to function when executed in clay but I cannot determine the error in the request syntax
๐ Hey there! Our support team has got your message - we'll be back in touch within 24 hours (often sooner!). If you haven't already, please include the URL of your table in this thread so that we can help you as quickly as possible!
For anyone curious, the request is
axios.post( "https://api.prospeo.io/linkedin-email-finder", { url: {{LinkedIn Profile}} }, { headers: { "Content-Type": "application/json", "X-KEY": apiKey } } )
which matches the prospeo documentation here https://prospeo.io/api/linkedin-email-finder
I tried that as a custom formula and using the clay supported "HTTP API" enrichment both of which do not appear to function as I would expect. The latter is returning a 400
Clay received a 400 error from the API with Content: {"error": true, "message": "INVALID_REQUEST", "details": "Your request JSON can't be parsed, or the request is not POST. Only submit JSON and do not use query parameter."}
I thought initially that the body was not being stringify'd but can confirm that it is
Also attempted custom formula as
axios.post( "https://api.prospeo.io/linkedin-email-finder", { url: JSON.stringify({{LinkedIn Profile}}) }, { headers: { "Content-Type": "application/json", "X-KEY": apiKey } } )
Hey Noah, really appreciate you reaching out, happy to help! Quick question as well, any reason why you're using this method instead of Prospeo's integration? Do you mind sending the link to the table so we can take a look? In case it helps, here's a video about body parsing issues: https://www.loom.com/share/678e4c40e8c14894a6cd53948176e434?sid=3ba4a30d-6f01-48b7-936c-d85982fce071 Let me know!
Hey there - just wanted to check in here to see if you needed anything else! Feel free to reply back here if you do.