Tech Founder Notes

    Generate a GPT prompt to extract structured JSON data

    LLMs like GPT are excellent at extracting structured data from free text, but you still need to speak to them clearly. This prompt helps you generate a well-calibrated prompt to transform raw text (customer reviews, emails, product specs…) into structured JSON, directly usable in no-code, API or data pipeline.

    When to use this prompt

    To feed automations (Zapier, Make, n8n…)

    In email parsing or customer feedback

    To collect information from free text

    In a chatbot with automatic extraction function

    What this prompt allows you to obtain

    A robust, structured and clear prompt

    A directly usable JSON format

    Compatibility with automation tools

    Time savings for parsing without regex

    Tips and mistakes to avoid

    ✓Do's

    • •Don't mix instructions and examples in the same block
    • •Validate your prompt with several fuzzy or partial inputs
    • •Test extraction in a realistic context

    ✗Don'ts

    • •Always specify the exact output format

    Prompt Template

    This is the base template with placeholders. Replace the placeholders with your specific information:

    You are an AI engineer. Create a prompt to automatically extract precise data from free text. The use case is: {{use_case}}. The type of data to extract is: {{data_fields}}. The desired JSON output format is: {{output_format}}. This prompt must be robust, clear, and suitable for use in an API or automation. {{additional_context_block}}

    Placeholder descriptions:

    {{use_case}}Use case - ex: analyze customer reviews, structure product sheets, read support email
    {{data_fields}}Fields to extract - ex: product name, rating, comment, date
    {{output_format}}JSON output format - ex: { "product_name": string, "rating": number, "comment": string, "date": string }
    {{additional_context}}Technical context or constraint (optional) - ex: output must be compatible with Zapier, respect strict schema, include null keys if empty

    Example of generated prompt

    Here's an example with filled-in values:

    You are an AI engineer. Create a prompt to automatically extract precise data from free text. The use case is: customer review analysis. The type of data to extract is: product name, rating, date, review text. The desired JSON output format is:
    
    {  
      "product_name": "string",  
      "rating": "number",  
      "review": "string",  
      "date": "string"  
    }  
    
    This prompt must be robust, clear, and suitable for use in an API. Also add these details: fields must be returned even if some information is missing.

    Share this prompt

    Help others discover this useful prompt by sharing it on social media