Clay Icon

Salesforce to Clay Webhook Setup: Handling Response Type Issues

ยท
ยท

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!

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    ๐Ÿ‘‹ 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!

  • Avatar of Mark L.
    Mark L.
    ยท
    ยท

    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).

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    We haven't heard back from you in a bit, so we're going to go ahead and close things out here - feel free to let us know if you still need something!

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Hi Jenna Z.! This thread was recently closed by our Support team. If you have a moment, please share your feedback:

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Thanks! We've reopened this thread. You can continue to add more detail directly in this thread.

  • Avatar of Jenna Z.
    Jenna Z.
    ยท
    ยท

    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!

  • Avatar of George D.
    George D.
    ยท
    ยท

    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.

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Hey there - just wanted to check in here to see if you needed anything else! Feel free to reply back here if you do.

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Hi Jenna Z.! This thread was recently closed by our Support team. If you have a moment, please share your feedback:

  • Avatar of Malik
    Malik
    ยท
    ยท

    Did you ever find a solution for this George D. or Jenna Z.?

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Thanks! We've reopened this thread. You can continue to add more detail directly in this thread.

  • Avatar of LuisArturo
    LuisArturo
    ยท
    ยท

    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

  • Avatar of Malik
    Malik
    ยท
    ยท

    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?

  • Avatar of Jenna Z.
    Jenna Z.
    ยท
    ยท

    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!

  • Avatar of Malik
    Malik
    ยท
    ยท

    I got it working actually Jenna Z.. The data is coming in fine from Salesforce into Clay. For my use case, when a new lead is created and certain criteria is met like the record has first name, last name, and company for example, post the data to the Webhook URL in Clay.

  • Avatar of Malik
    Malik
    ยท
    ยท

    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.

  • Avatar of Daniela D.
    Daniela D.
    ยท
    ยท

    Hey Malik! Thanks for confirming. We'll share this with the team and get back as soon as we have an update๐Ÿ™๐Ÿฝ.

  • Avatar of Jenna Z.
    Jenna Z.
    ยท
    ยท

    ๐Ÿ™ thank you both!

  • Avatar of Daniela D.
    Daniela D.
    ยท
    ยท

    Hey! Good news. Happy to report that it is now possible to select the response format (JSON or plain text) when configuring your table's webhook. Feel free to test this out and let us know if you run into any issues. https://downloads.intercomcdn.com/i/o/w28k1kwz/1344999684/4fe62124a64bb47ac46dd7f68339/CleanShot+2025-01-21+at+17_12_03%402x.png?expires=1737477900&signature=bd725ecf2aa7e25e50a54fdb8fd96c40cc784185905a62538e367fa0c04810ff&req=dSMjEsB3lIdXXfMW1HO4zf7Zt7hIxWKL1MfqY2Ej0DJIVkGsyLQosOPPrduJ%0Ak08W%0A

  • Avatar of Jenna Z.
    Jenna Z.
    ยท
    ยท

    ๐ŸŽ‰ this is awesome, tysm!

  • Avatar of Malik
    Malik
    ยท
    ยท

    Thanks for implementing this!

  • Avatar of Daniela D.
    Daniela D.
    ยท
    ยท

    Happy to help! Let us know if you need anything else.

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Hi Jenna Z.! This thread was recently closed by our Support team. If you have a moment, please share your feedback: