Clay Icon

Changes to HTTP API Actions - Improved JSON parsing, new guidelines for new columns

·
·

Changes to your HTTP API Actions - Hey Everyone! We just made a change to HTTP API actions to fix some issues with parsing JSON bodies. Here’s what you need to know about the changes:

  1. 1.

    We now added a query string input where you can input key value pairs and everything will be automatically URL encoded

  2. 2.

    We now, automatically JSON stringify Column tokens in your body JSON, to avoid failed to parse your body input issues when a piece of text has a character like quotes. This means that tokens in Clay should no longer be wrapped in quotes. See below for an example.

In order to make these changes, we had to make a new version of the HTTP-API action, so your existing workflows will continue to work as is. However, any new HTTP-API columns will require you to follow these new guidelines. cc Chris F. Nathan L. Mike R. dan (. Elliot T. and others that have consistently noticed Failed to parse body input issues.

  • Avatar of dan (.
    dan (.
    ·
    ·

    nice. does this encode/handle line breaks too? i have noticed that passing a GPT response (with line breaks in it) through to a POST to our API breaks, so have to try to coax GPT to not give me line breaks

  • Avatar of Eric E.
    Eric E.
    ·
    ·

    yes it does 😄

  • Avatar of Nathan L.
    Nathan L.
    ·
    ·

    Eric E. This is incredible!!! Thank you 🙏🙏🙏

  • Avatar of Nathan L.
    Nathan L.
    ·
    ·
  • Avatar of dan (.
    dan (.
    ·
    ·

    Eric E. — do all current inputs that are wrapped in quotes...break if we don't change them? i see you said there's some backwards compatibility but it's unclear if it's a new HTTP-API column type if i duplicate columns/etc

  • Avatar of dan (.
    dan (.
    ·
    ·

    also just tried this and wah wah

  • Avatar of dan (.
    dan (.
    ·
    ·
  • Avatar of dan (.
    dan (.
    ·
    ·
  • Avatar of dan (.
    dan (.
    ·
    ·

    can break into a new thread or DMs if you want

  • Avatar of Chris F.
    Chris F.
    ·
    ·

    Eric E. thanks legend, will take a look

  • Avatar of Eric E.
    Eric E.
    ·
    ·

    dan (. no current inputs break — this only affects new http-api columns that you select from “Enrich Data” on the top right. Duplicated old columns are also unaffected

  • Avatar of Eric E.
    Eric E.
    ·
    ·

    dan (. which column is this? Also — will DM you