Hi everyone,
I'm working with ReTool and am trying to insert multiple rows of data into a SQL table using an array of objects in a workflow code block. While I can perform this operation successfully through the GUI, I'm encountering issues when trying to execute the same operation via a SQL statement.
const fetchedArticles = fetchArticles.data.articles.results;
const articlesContent = fetchedArticles.map(article => ({
title: article.title
}));
console.log(articlesContent);
return articlesContent;
INSERT INTO articles (title) VALUES {{ fetchContent.data }}
I have also attempted to convert the array of objects into a joined string format for the SQL statement.
Am I on the right track, or should I shift my methods? Thanks for any guidance in advance.