PostgreSQL

Query and manage data in a PostgreSQL database

Component key: postgres

Description#

The PostgreSQL component makes a request to any PostgreSQL database and returns the response formatted as JSON data. Instead of generating dynamic queries and sanitizing SQL yourself, you can pass in a generic query with ${variableKey} placeholders. For example, you can create a query that reads INSERT INTO users (name, email) VALUES (${name}, ${email}), and for optional parameters you can create one with a key of name, and another with a key of email. Values provided for name and email are sanitized automatically.

Authorization Methods#

PostgreSQL requires one of the following authorization methods:

Auth TypeKeyDescriptionFields
Basic AuthbasicBasic authorization using a username/password combination

Password |  password

Username |  username

The Postgres username and password can be put directly into a basic auth credential, alongside the database host, port, and database name.

Actions#

Query#

Performs a query on a PostgreSQL database. | key: query

InputKeyDefaultNotesExample

Database Name

string
/ Required
databaseThe name of the Database.

Host

string
/ Required
hostThe address of the Database server.192.168.1.120

Optional Parameters

data
paramsOptional parameters to insert into a query.

Port

string
/ Required
port5432The port of the Database server.5432

Query Field

string
/ Required
queryFieldThe query to be executedINSERT INTO users(first_name, last_name, age) VALUES(${name.first}, ${name.last}, ${age})