Load data into spreadsheet or database
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" : "karla@email.com"}
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. The Set node allows you to perform simple transforms when the data you want to load into spreadsheet rows is already represented as items. Use the Function node when you need to map nested data (like arrays) inside a single item to their own top-level items (Example in community forums). Spreadsheet and database nodes in n8n perform their configured action (like Append, Create Row, Write to File) on each item of input data.
Workflow walkthrough
Related Templates
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
📰 AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments