🏡 Back Home

Data Sync Application - collect and store all the company's data in one place

1. Overview

SYNC module is designed to fulfil regular scheduled synchronization tasks. The main goal of the Sync module is retrieving various business data from a set of APIs and saving it to the company's Airtable base or to MongoDB storage, but it can as well run other data handling tasks with supported APIs.
Below is chart depicting relevant Sync module connections and connected APIs.

Drafts - PaperPlan Sync App_ data flowchart.jpg

2. Module Maintenance

The module is running in back-end continuously and doesn't require any maintenance unless an exception occurrs.

Alerts

Two types of alerts are posted to #airtable Slack channel:

Check if Sync module is OK and running

You can check the module's API availability by entering https://api.paperplan.co/api in your browser

Check SYNC base in Airtable

Check SYNC→Overview table Pasted image 20240108174353.png

Optionally, you can track the following Sync application activity in the SYNC base:

Automations Schedule

SYNC→Automations→Schedule - here you can see all the scheduled automations, the description and running time
Pasted image 20240108200401.png

3. Restart the Application

Step 1: Login to AWS console

Login to AWS console using AWS root login/pass

Step 2: Locate the server instance and connect to it

Go to AWS ConsoleEC2Instances → select the first instance → Connect

Step 3: Make sure no Sync application is running, stop the application if it is on

Step 4: Start the application

Type the following commands one-by-one

cd paperplan/core
pm2 start dist/main.js -n 'sync'

Result

Now you can check the application's status as described here
If you're still encountering problems, contact the developer

4. Report types

Pasted image 20240129173136.png
In the Reports→Report Types view you can modify the following properties of the relevant report types:

5. Repeat a failed report

Step 1: Open the failed reports list

Open Reports→Failed Reports
You will see the list of the failed non-realtime reports.
Pasted image 20240129180256.png

Step 2: Clear the report's Last Updated field (if required)

There are following known fail scenarios:

  1. The report couldn't run on Airtable side: Last Updated field is empty
  2. The report was request by API didn't reply or returned an empty report: Last Updated and Mongo Id fields are empty
  1. The repeated updates of the report failed: Update Repeated field is empty

Step 3: Uncheck the report's Fail field

The report will disappear from the list and will be run on the next scheduled time. If it fails again, a new alert will be fired.

6. Troubleshooting

In case of various bugs and errors, first of all check the following views to localize the issue.