Clay Icon

How to Convert a String to Base64 for SEO

·
·

Hey team I'm looking to convert a string from one of the columns to base64, how can I do this?

  • Avatar of Roshan K.
    Roshan K.
    ·
    ·

    Just following up on this since this might've gotten missed during holidays 🙂 Arturo O. or anybody else, if you could help with this I'd really appreciate it!

  • Avatar of Clay Team
    Clay Team
    APP
    ·
    ·

    Hey Roshan, thanks for the message. Yep, most are out during this week but I can take a look. Not sure if the formula generator can convert this, otherwise I would try using chatGPT instead

  • Avatar of Roshan K.
    Roshan K.
    ·
    ·

    Arturo O. appreciate the help 🙂 That makes sense to me - doesn't seem like the formula generator will do it, so GPT it is !

  • Avatar of Arturo O.
    Arturo O.
    ·
    ·

    Yup! no problem!

  • Avatar of Tenzin R.
    Tenzin R.
    ·
    ·

    Roshan K. If you're looking to do it at scale you'll likely need to do it programmatically w/ JS or Python. Happy to help if you need it

  • Avatar of Tenzin R.
    Tenzin R.
    ·
    ·

    As OpenAI's API's always return strings (given it's text in the JSON response)

  • Avatar of Roshan K.
    Roshan K.
    ·
    ·

    Tenzin R. thanks for lmk! I know you can do it w/ the btoa JS function , so I could send the data to n8n to process like you said. However I’d like to do it within Clay if possible as to not spend n8n credits unless there’s no other way haha. Do you think I’d be able to tell GPT how to generate the base-64 equivalent string?

  • Avatar of Tenzin R.
    Tenzin R.
    ·
    ·

    Yeah I think you should be able to do it within Clay formula generator if i'm not mistaken! If you're really trying to save credits download as a csv and run row by row then reupload hah

  • Avatar of Clay Team
    Clay Team
    APP
    ·
    ·

    +1 to Tenzin's response haha, if you send a link to table I can try to jump in too!

  • Avatar of Roshan K.
    Roshan K.
    ·
    ·

    Thank you Tenzin R.! If I can do it through the formula generator itself, that would be awesome haha