I'm trying to set up a Salesforce > Clay webhook for realtime inbound enrichment (using the "Create HTTP Callout" flow action in SF and a "Pull in data from a webhook" action in Clay), and while the Clay table is receiving the webhook payload I'm getting an error in Salesforce that "expected declared response media type application/json, but got text/plain; charset=utf-8." I should be able to handle a text response from Clay in SFDC, but while I'm figuring out how to do that was wondering if someone could confirm that a text response is expected from Clay or if I configured something wrong, OR if there's a way to handle this and convert to JSON on the Clay side. Thanks!
๐ 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!
Hi Jenna! Yes, confirming that content-type: text/plain; charset=utf-8 is a normal response, the default when you set things up. There's no extra configuration available for response format, etc. beyond that. Just the endpoint, awaiting your data. I'm glad the first bit of testing is working out okay! Let us know if you hit other roadblocks (or if you know any special use cases where an application/json response would be especially valuable for your workflows).
Thanks! We've reopened this thread. You can continue to add more detail directly in this thread.
Hi! It took a while to confirm this with Salesforce Support, but I have confirmed that there are no current options for accepting a response that's not in an application/json format ๐ This means that while my webhook POST callout to my Clay table is successful, I still get an error from Salesforce every time it runs, and they've confirmed there's no workaround to even ignore a response that's not JSON formatted. Because I imagine I'm not the only customer to try to implement Salesforce > Clay webhooks, sharing that info here to see if there's any way to add response format selection as a feature while we're waiting on SFDC to get its act together ๐ Even though I have a CRM integration included on my current plan, the use case for the webhook here is to update records in real time for our inbound process, so it's not a matter of upgrading my subscription. Thanks, lmk if you have other questions!
Hey there Jenna thanks for reaching out and for bringing this to our attention, let me bring this up with the team so that they can take a look at this.
Thanks! We've reopened this thread. You can continue to add more detail directly in this thread.
Hey there Malik taking a look at this, is there a table where you are working on this do you mind sending the link to the table so we can take a look? To clarify are you trying to send data from Salesforce to a Clay Table via webhook correct, and if so, is it formatted in JSON. Final question, if that the case, what is the payload size for each request, as this can also play a part if the payload size is eclipsed. https://downloads.intercomcdn.com/i/o/1171717996/ac7729f84b426e1d0358af02/image.png?expires=1736380800&signature=069544a90526683c07a0d6390b5207811118e4141e95968c148a9f24ca2969bf&req=dSEgF85%2FmohWX%2FMW1HO4zYTywS3%2FDpce2BKsamziXObMnRchlkQ%2Fozvm0Vgd%0AAyn7%0A
I'm in the middle of writing the configuration in salesforce to post data to the webhook on the Clay side. I came across this thread and wondered if there was a solution for this, but now reading it in more detail, I'm constructing my outgoing HTTP call to the webhook and I'm setting the Content-Type to 'application/json', so maybe this issue won't affect me. What is the payload size limit though LuisArturo?
Malik I think you're going to run into the same issue - sending to Clay as JSON, receiving a text response from Clay on successful runs that SFDC can't handle. I didn't find a solution, and everything works fine besides the constant error messages. I just send them to a filtered folder and ignore. Following in case anything's changed or you come up with something, though!
Jenna Z. is correct, Clay returns plain text response and within a salesforce flow when you use an http callout, it expects the response to be formatted as JSON and you can't change it. The workaround is to write a bit of Apex code in Salesforce to make the API call to the Clay webhook which worked for me. LuisArturo - This seems like a simple fix on the Clay side to just return a JSON formatted response back rather than just "OK", return: { "success": true } Or something similar like a "status_code" : 200 response in JSON format.
