Google Sheets provide list to MySQL query

I am trying to create the following workflow:

Google Sheet → MySql

But, the following logic should be applied:

  • Read data from sheet (the sheet contains two columns)
  • Only pass the second column through to MySQL - I am currently using a function or this. Is this the best way to do it?
  • Execute a query on MySQL, using the output from the function: E.g: “SELECT id, title FROM my_table WHERE id IN (<<output_from_function>>)” - How do I define this?

Here’s the definition of my current workflow:

There is theoretically no need to remove the second column you do not need.

Here are two examples how what you need to be done can be achieved:

Perfect! Your simplified solution worked 100%. Thanks, @jan!

Great to hear! Have fun!