Below is the solution to the error you're encountering:
Issue
When you rearrange or rename columns while using Mapping Column Mode → Map Automatically, you might see the error message:
Column names were updated after the node’s setup
The node is warning you that the sheet's column names have changed since the node was originally configured.
Why It Happens
In previous versions, the node internally located columns based on keys (the column names) even when they were added in any order. Now, when columns are moved, renamed, or deleted, the node detects that the previously set column order has changed, and it shows this error to ensure data is mapped correctly.
Recommended Solution
To resolve this issue, refresh the column names in the node. Follow these steps:
- Open the Node: Locate your Google Sheets node in the workflow.
- Re-select Mapping Column Mode: In the Mapping Column Mode parameter, select the option again.
- Refresh Columns: This action prompts the node to fetch the latest list of column names from the Google Sheet.
- Update Node Parameters: Once the columns are updated, ensure you update any node parameters to reflect any changes in the order or names of the columns.
This procedure will effectively reset the mapping, and the node will work with the updated column layout without throwing the error.
Additional Tips
- Consider planning adjustments carefully if you regularly modify column orders or names to maintain consistency.
- If you work with dynamic data structures, you might want to ensure that your data pipeline gracefully handles these changes or consider manually mapping columns if needed.
By following these steps, you'll overcome the error and enable the node to correctly map data according to the new column order.
Feel free to ask if you need further details related to Google Sheets node troubleshooting in n8n!