We have a workflow that inserts data from KoboToolbox into a PostgreSQL database. Most of the columns come from the KoboToolbox form so we use the Insert operation and {{ $json.ABC }} syntax. That works well. but one of the new columns is a more complex PostGIS lookup based on latitude and longitude values. I can do this starting with a new N8N workflow PostgreSQL step and using the Execute Query Operation. But how do I add it to the existing Insert Operation step? The validation in the Operation does not like my SELECT statement.
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!
Thank you for the reply. Do you mean we would have a step before the INSERT that generates an input query parameter for the INSERT step? So the complex PostGIS query wouldn’t run in the INSERT step but before it.