In addition to the data supplied in your initial call to trigger a workflow, there are two other ways you can bring data into your workflow executions. You'll see Logic Blocks for both of these when you're editing a workflow.
Before you can add a Logic Block for a datasource, you'll need to set up a new set of Credentials in the Credentials page.
Let's point our database connector at a very simple table in Postgres, containing a short list of IP addresses we might have fraud concerns about. Note this is purely dummy data, and shouldn't be used in a real production workflow.
Navigate to the Credentials page in the sidebar, and select Add New Credential from the top right.
Select Database as type, and click next. Now let's add a name for this new Credential, as well as the login info for a demo postgres database, hosted at ElephantSQL.
Database Name: jpzqzlow
Click Next. If you see any error message, make sure you copied into the right fields on the form, otherwise you should see a screen with a test query. This demo database has a single table called
devices. We'll try a test query to make sure we can pull from it.
Click test and verify you see the expected response. Once you're happy, you can click Save. The new Credential you've just created should now be accessible from your workflows.
Using new Database Credentials in a Workflow
Return to an existing workflow (or create a new one) and click Edit on the top right. Drag out an Internal Database logic block onto the graph.