Integrate with PostgreSQL

You can push the data from a Next Matter workflow to the database or pull the data you need into a workflow.

Before you begin

  • Understand how data references work. See Use data references. This will help you use the captured data in the workflow steps.

  • You need to have a basic understanding of PostgreSQL queries.

  • Open PostgreSQL to outside connections. To do that:

    1. Update the postgresql.conf file. To trace the file, run the following command:
      $ find / -name "postgresql.conf"
      /var/lib/pgsql/9.4/data/postgresql.conf
      
    2. Replace the listen_addresses = 'localhost' line with listen_addresses = '*'.
    3. Restart the PostgreSQL server.

Set up the integration in Next Matter

  1. Go to Automations library
  2. In the PostgreSQL app tile, click Connect.
  3. Enter the required data. You might want to contact your admin about it.
DataDescription
Database hostnameThe network host name or the IP address of the PostgreSQL server.
Database nameThe PostgreSQL database name that you want to access. If not specified, normally the operating system username is used as the database name. To get the name log in to the server using the SQL Shell (psql) app and run SELECT datname FROM pg_database.
PortThe network port that the PostgreSQL server is running on. By default, this is port 5432.
UsernameThe database username you wish to connect as. If not specified, the default username is postgres.
PasswordThe PostgreSQL password associated with the specified username. To get the password, run the psql command \password.
  1. Click Connect.

Use the integration

  1. Click a workflow in which you want to use PostgreSQL.
  2. Click + Add step.
  3. Select Integrations > PostgreSQL.
  4. Click Settings.
  5. In Query, enter a PostgreSQL query you want to run. It can be an INSERT, SELECT, UPDATE, or DELETE query. Make sure it's one query per integration step. Nested queries and subselects are not allowed.

πŸ‘

Tip: You can use data references to dynamically build your query and fill it with values from your process instance. You can also store query results in variables for using them later in the workflow.