This workflow is a generic example of how to load data from your workflow into a destination that stores tabular data. For example, a Google Sheets or Airtable sheet, a .CSV file, or any relational database like MySQL. Generally, you need to ensure that you send well-formatted data into the Spreadsheet or Database node. You can use the Set or Function node to transform data into the correct format for your destination. Key concepts Spreadsheets and databases have columns, like "Name" and "Email". The data you send into a Spreadsheet/ Database node needs to match these column names for each row of data that you want to insert. Data points need to be represented as key-value pairs. Specifically, each item of data needs to have a JSON key for each column in the sheet. For a spreadsheet with "Name" and "Email" columns, it would look like: {"Name" : "Karla", "Email" : "[email protected]"} Before appending or inserting data to a spreadsheet or database, you might need to transform it into the correct format. You can preprocess the data with a Set or Function node.
Tags
Related workflows
See all General Automation→Using the Merge Node - Merge by Key
This is an example of how you can make Merge by Key work. The “Data 1” and “Data 2” nodes simply provide mock data. You can replace them with your own data sources. Then the “Convert Data” nodes are important. They make sure that the different array items are actually different items in n8n. After that, you have then the merge with the merged data.
Write JSON to Disk (Binary)
The “Write Binary File” expects binary data. The JSON data is, however, JSON ;) There should really be a node that allows moving data around between both of them. For now, it can be done with a Function-Node. At least till a proper one is in place. The first node is example data, wich you can customize or replace. The second node named “Make Binary” is the important one with the custom code which makes the data binary and writes it to the correct location.
Webhook returning XML
Receives data from an incoming HTTP Request (set up to use respond to webhook node) Create dummy data Convert JSON to XML which gets returned Respond to Webhook which returns the data and the content type of the data