The SOQL Query block is a native Salesforce integration supporting the ability to query data directly from your Salesforce organization. Once published or shared, spells containing this block will allow the user to sign into their Salesforce account through Respell and select the organization they want to query from.

The SOQL Query block has 1 input and 1 output.

Input:

  • Query: The SOQL query representing the data to fetch from the Salesforce organization.

Output:

  • Response: The output is the processed data after running the query on the selected Salesforce organization.

Example

The SOQL Query block is best used in combination with a text model block such as GPT-4 or an equivalent compliant version.

In this example, we use a compliant version of GPT-4 to create our custom SOQL query for Salesforce given any question, written in natural language.

The spell can be built with a few blocks as shown:

You can try out the spell here!