Getting a [400] error when I try to send my Gmail Content to OpenAI via JSON

What are you trying to achieve?

I am taking my email from Gmail and sending it to OpenAI to parse and return a response. The JSON works because I’ve tried it without the “1. Text content” tag and it sends with no issues.

How do I now properly send the JSON but with the text of the email in tow? I wish to do this for all my emails.

Screenshots: scenario setup, module configuration, errors


Welcome to the Make community!

You have to convert the “Text Content” to JSON first, if you are directly mapping it into a JSON string.

Try using the JSON “Transform to JSON” module:

Transforms any object to JSON.

For more information, see JSON page in the Make Help Centre, which covers the following:

  • Getting started with JSON
  • Create JSON
  • Convert JSON to XML
  • Parse JSON
  • Transforming data records to JSON
  • Simulating module output using Parse JSON
  • Aggregate to JSON
  • Troubleshooting JSON

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

2 Likes

Thanks. That solved it.

1 Like