30.01.2023
360

How to Connect PostgreSQL as Data Destination

How to Connect PostgreSQL as Data Destination

The integration will allow you to add or update rows in PostgreSQL based on data from other systems. For example, if an order in CRM moved to another stage of the funnel, or when a new order appeared on your site, a new row will be added. This will allow you to efficiently automate your workflows and save a lot of time by eliminating the need to manually add each row to the table.

Let's go through the entire PostgreSQL setup steps together!

Navigation:
1. What will integration with PostgreSQL do?
2. How to connect your PostgreSQL account to ApiX-Drive?
3. How to set up data transfer to PostgreSQL in the selected action?
4. An example of the data that will be sent to your PostgreSQL.
5. Auto-update and update interval.

After configuring Data Source, click "Start Configuring Data Destination"

How to Connect PostgreSQL as Data Destination | Setup Data Destination system

Select the system as Data Destination. In this case, you must specify PostgreSQL.

How to Connect PostgreSQL as Data Destination | System selection

Next, you need to specify an action, for example, "Add ROW".

How to Connect PostgreSQL as Data Destination | Action selection

- Add ROW - data will be added to your table and sheet in new rows. For example, if you have 10 rows filled in your table, then our system will add data to the 11th row, and so on. If your table has 10 filled rows and you delete the data from the 5th row, then the system will continue to transfer data to the 11th row, and so on. But if you delete all rows, then the system will pass data to the first row.

The next step is to select the PostgreSQL account to which will be send the data.
If there are no accounts connected to the ApiX-Drive system, click "Connect account".

How to Connect PostgreSQL as Data Destination | Account connection

Before you start set up, you need:

1. Verify that PostgreSQL accepts external connections over TCP/IP.

2. Find the port on which deamon listens

3. Ensure this port is accessible in both directions to * the ApiX-Drive ip server from which the connection is coming * 157.230.117.136, 164.90.220.66, 142.93.106.250, 206.81.27.39, 68.183.219.78, 164.92.182.124.

4. Ensure that the user is authorized to access from the * ip or host of the ApiX-Drive server from which the * connection is made.

If you have an address bar URL in your ApiX-Drive account:

s1.apix-drive.com - 157.230.117.136
s2.apix-drive.com - 164.90.220.66
s3.apix-drive.com - 142.93.106.250
s4.apix-drive.com - 206.81.27.39
s5.apix-drive.com - 68.183.219.78
s6.apix-drive.com - 64.226.126.14
a1.apix-drive.com - 164.92.182.124

Fill the fields with the relevant data where:

- Host - your PostgreSQL domain name specified without additional https:/, /, etc.

- Login - login to PostgreSQL system.

- Password - password in PostgreSQL system.

- Database - the name of the database to which our system will refer.

- Port - port to which we will connect.

You cannot use root, toor, admin, administrator system names to improve security.

How to Connect PostgreSQL as Data Destination | Account selection

When the connected account is displayed in the "active accounts" list, select it.

Attention! If your account is in the "inactive accounts" list, check your access to this account!

How to Connect PostgreSQL as Data Destination | Account selection

Select the table where the data will be transferred.

How to Connect PostgreSQL as Data Destination | Table selection

Now you need to assign variables from the Data Source system to the columns of the table you need.
To add a variable, click on the column field and select the desired variable from the drop-down list. Please note that you can use not only Data Source variables, but also manually entered data.

Click "Continue" when you're done with assigning fields.

How to Connect PostgreSQL as Data Destination | Assigning fields
How to Connect PostgreSQL as Data Destination | Assigning fields

Now you see the test data to send to PostgreSQL.
Click "Send test data to PostgreSQL" and test the table and sheet in PostgreSQL.
If everything suits you, click "Next" for further configuration.

How to Connect PostgreSQL as Data Destination | Test data

This completes the Data Destination system setup!
Now you can start choosing the update interval and enabling auto-update.
To do this, click "Enable update".

How to Connect PostgreSQL as Data Destination | Enable auto-update

On the main screen, click on the gear icon to select the required update interval or set up scheduled launch. To start the connection by time, select scheduled start and specify the desired time for the connection update to fire, or add several options at once when you need the connection to fire.

Attention! In order for the scheduled run to work at the specified time, the interval between the current time and the specified time must be more than 5 minutes. For example, you select the time 12:10 and the current time is 12:08 - in this case, the automatic update of the connection will occur at 12:10 the next day. If you select the time 12:20 and the current time is 12:13 - the auto-update of the connection will work today and then every day at 12:20.

To make the current connection transmit data only after another connection, check the box "Update connection only after start other connection" and specify the connection after which the current connection will be started.

How to Connect PostgreSQL as Data Destination | Update interval
How to Connect PostgreSQL as Data Destination | Update priority

To enable auto-update, switch the slider to the position as shown in the picture.
To perform a one-time data transfer, click on the arrow icon.

How to Connect PostgreSQL as Data Destination | Enable auto-update

This completes setup PostgreSQL as a Data Destination! See how easy it is!?

Now don't worry, ApiX-Drive will do everything on its own!