OpenAI output mapping issue - all data goes into one Google Sheets column instead of separate columns

Hi Make Community,
I’m struggling with a workflow where I need to extract email data using OpenAI and send it to Google Sheets, but I can’t get the data to map correctly to separate columns.
My Workflow:

Gmail - Watch Emails
OpenAI - Create a model response (analyzes email)
Google Sheets - Add a Row

The Issue:
Expected behavior: Data from OpenAI should populate different columns in Google Sheets:

Column A: Date
Column B: From
Column C: Subject
Column D: Topic
Column E: Action Required
Column F: Priority
Column G: Suggested Action
Column H: Sender Type

Column I: Summary

Actual behavior: All data from OpenAI goes into Column A only, with everything in one cell.

The data appears to be formatted with line breaks, but it’s stored as a single string in the Result field.

The Mapping Problem:

When I open the Google Sheets module to map fields, I only see these options from OpenAI:

  • 2. Result (contains all the data as one string)
  • 2. File name
  • 2. File data
  • 2. Conversation ID
  • 2. Raw Result

There are no separate fields like 2.date, 2.from, 2.subject, etc. that I can individually map to different columns.

Current OpenAI Prompt (simplified): ``` Analyze this email and return 9 values, each on a new line: 1. Date 2. From 3. Subject 4. Topic 5. Action Required 6. Priority 7. Suggested Action 8. Sender Type 9. Summary Email data: {{1.Date}}, {{1.Sender}}, {{1.Subject}}

1. How do I properly split the OpenAI result string into separate values for different columns?

2. Do I need to add a “Parse JSON” or “Text Parser” module between OpenAI and Google Sheets?3. Is there a way to make OpenAI return structured data that Make can recognize as separate fields?

I’ve been working on this for hours and can’t figure out how to properly map the data. Any guidance would be really appreciated!
Thank you! :folded_hands:

Hey Natalie,

change your prompt to include the structure of the data you want to receive and have it respond in a JSON format. Then you can get a separate variable to map. At the moment the result is just a single text string.

Hi @Natalie_Belong

Try adjusting your prompt to return the exact data structure you need, then parse the result as JSON.

Here are possible instructions for your prompt. This is only a suggestion. Make sure you adjust the expected parameters accordingly.

```json
{
  "date": "",
  "from": "",
  "subject": "",
  "topic": "",
  "actionRequired": "",
  "priority": "",
  "suggestedAction": "",
  "senderType": ""
}
```

**Instructions for LLM:**

You must analyze the email and return ONLY a valid JSON object with these exact fields: date, from, subject, topic, actionRequired, priority, suggestedAction, senderType.

Requirements:
- Output ONLY valid JSON - no explanations, no markdown, no backticks
- Use the exact field names shown above (camelCase)
- Extract date, from, and subject directly from the email
- Set actionRequired to "Yes" or "No"
- Set priority to "High", "Medium", or "Low"

@damato