Dynamic SOQL query

I'm trying to build a dynamic SOQL query in a Salesforce Resource query (query type SOQL query)

For example, pretend the preceding block is called code1 and returns a string of comma delimited single-quoted IDs for an IN clause, I want to execute a SOQL query like:

select Name, Id from Contact where id in {{code1.data}}

When I type in the {{}} to hopefully inject the code1.data, my list of options are just for some JavaScript functions.

Is this functionality just not yet available in SOQL query workflows, or I'm missing something?

If this is impossible, then my option is to build dynamic SOQL in a Python code block, but sadly the Python code block doesn't support the simple_salesforce package. In 5 minutes I was off to the races with the Salesforce API via simple_salesforce.

On the other hand, going w/o it and trying the requests package (which Retool does have) I've wasted 2 hours simply trying to query count of contact object instances with stock packages - error code 401 all day long.

Hi David!

Can you try adding single quotes before and after your dynamic value? Your code would look something like this:

WHERE owner.email = '{{current_user.email}}'

I just tried this out in a query and the email just needed to be a string!