Skip to main content

Prepare CSV files with GPT-4

Workflow preview

Workflow preview
100%
Prepare CSV files with GPT-4 preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow generates CSV files containing a list of 10 random users with specific characteristics using OpenAI's GPT 4 model. It then splits this data into batches, converts it to CSV format, an...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.openai, n8n-nodes-base.splitinbatches, n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-base.itemlists, n8n-nodes-base.spreadsheetfile, n8n-nodes-base.writebinaryfile

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by n8n Team.

Original n8n.io source

1.1 Workflow description

Title
Prepare CSV files with GPT-4
Workflow name
Prepare CSV files with GPT-4

This workflow generates CSV files containing a list of 10 random users with specific characteristics using OpenAI's GPT-4 model. It then splits this data into batches, converts it to CSV format, and saves it to disk for further use.

  1. The execution of the workflow begins from here when triggered manually.
  2. "OpenAI" Node. This uses the OpenAI API to generate random user data. The input to the OpenAI API is a fixed string, which asks for a list of 10 random users with some specific attributes. The attributes include a name and surname starting with the same letter, a subscription status, and a subscription date (if they are subscribed). There is also a short example of the JSON object structure. This technique is called one-shot prompting.
  3. "Split In Batches" Node. This node is used to handle the OpenAI responses one by one.
  4. "Parse JSON" Node. This node converts the content of the message received from the OpenAI node (which is in string format) into a JSON object.
  5. "Make JSON Table" Node. This node is used to convert the JSON data into a tabular format, which is easier to handle for further data processing.
  6. "Convert to CSV" Node. This node converts the table format data received from the "Make JSON Table" node into CSV format and assigns a file name.
  7. "Save to Disk" Node. This node is used to save the CSV generated in the previous node to disk in the ".n8n" directory.

The workflow is designed in a circular manner. So, after saving the file to disk, it goes back to the "Split In Batches" node to process the OpenAI output, until all batches are processed.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking "Execute Workflow"

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - OpenAI

Type / Role
n8n-nodes-base.openAi - openAi
Config choices
Version 1

Block 3 - Split In Batches

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 2

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Parse JSON

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3

Block 6 - Make JSON Table

Type / Role
n8n-nodes-base.itemLists - itemLists
Config choices
Version 3

Block 7 - Convert to CSV

Type / Role
n8n-nodes-base.spreadsheetFile - spreadsheetFile
Config choices
Version 2

Block 8 - Save to Disk

Type / Role
n8n-nodes-base.writeBinaryFile - writeBinaryFile
Config choices
Version 1

Block 9 - Strip UTF BOM bytes

Type / Role
n8n-nodes-base.moveBinaryData - moveBinaryData
Config choices
Version 1

Block 10 - Create valid binary

Type / Role
n8n-nodes-base.moveBinaryData - moveBinaryData
Config choices
Version 1

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Prepare CSV files with GPT-4
Complexity intermediate
Nodes 11
Categories Document Extraction, Multimodal AI
Author n8n Team
Published 30 Oct 2023

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/1967/1967.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Prepare CSV files with GPT-4 do?

This workflow generates CSV files containing a list of 10 random users with specific characteristics using OpenAI's GPT 4 model. It then splits this data into batches, converts it to CSV format, an...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.