Set up

Save documents to Google Drive

Created: Updated: Estimated time: 5 min

On the settings screen, open "Automation & links" and then the Google Drive tab, and press Connect to connect a Google account once (one per environment). Then, for each app, choose "Save this app's documents to Google Drive" and save. The location is My Drive / PRING 帳票 / app name / document number, and the file name is "date_counterparty_amount_document_number".

Steps

Saving to Google Drive is available on the Standard plan or higher. On Lite, the tab shows "Saving to Google Drive is available on the Standard plan or higher." If a document cannot be put into Google Drive, the output itself still succeeds.

  1. 1. Open the Google Drive tab

    On the settings screen, choose "Automation & links" in the top row and open the Google Drive tab. "Connection" at the top shows the current state (Not connected, or Connected: email address).

  2. 2. Press Connect to connect a Google account

    Press Connect and the Google page opens in a new window. Choose the account and press Allow; you come back to this screen and see "Connected: email address". You connect one Google account per kintone environment, and every app's settings show the same connection. A "PRING 帳票" folder is made in My Drive.

  3. 3. Turn on saving for each app

    Under "Saving for this app", choose "Save this app's documents to Google Drive". "Add a row to the index (索引簿.csv) for each file" is on from the start. Press Save, and the detail, list, bulk and scheduled outputs of this app are also put into Google Drive as the same files.

  4. 4. Check the three items of the file name

    In the table "The three items of the file name", check for each template that the date, amount and counterparty are chosen. For a template that shows "Empty", press "Open the template" and choose the fields in the audit log items. Apps from a business app set already have them.

  5. 5. Output a document and check Google Drive

    Output a document and check that the file is in My Drive / PRING 帳票 / app name / document number in Google Drive. If a file could not be put there, the table "Recent saving failures" shows the date, app, record and reason.

How saving works

Item What it is
Connecting Once per environment; press Allow on the Google page
Save or not Per app; off at the start
Location My Drive / PRING 帳票 / app name / document number (or record number)
File name date_counterparty_amount_document_number (_2, _3 added if the name exists)
Index 索引簿.csv; per app, on at the start
Outputs covered Detail, list, bulk and scheduled
What PRING touches Only the files and folders PRING made

Frequently asked questions

Where are the documents saved?

In "PRING 帳票" in the My Drive of the Google account you connected. Under it, PRING makes a folder named after the app, and under that a folder for the document number (the number issued, or the record number if there is none). The documents of one record are kept together there. PRING makes the folders, so there is no setting to choose a folder or paste an ID. Shared drives are not supported. If you rename the app, the folder name is corrected at the next save.

How are the files named?

"date_counterparty_amount_document_number" (for example 20261031_ホクト精工_1320000_請求書_SI-202610-0003.pdf, where 請求書 is the document name). The name lets you search by date, amount and counterparty, following the search requirements of the Japanese electronic bookkeeping law. Characters that cannot be used in file names are changed to full-width ones. If a file with the same name exists, it is not overwritten; _2, _3 and so on are added at the end. If any of the three items is empty, the file is saved with the date 00000000, the counterparty 取引先なし (no counterparty) and the amount 0, and the app's row shows "Some of the three items are empty".

What is 索引簿.csv?

A list file kept in the app folder. One row is added every time a file is saved: serial number, transaction date, amount, counterparty, file name, set, case, document type, record number, approver, approval date and creator. It opens in Excel (UTF-8, CRLF line endings). If you turn it off under "Saving for this app", no rows are added.

Can PRING see my other files in Google Drive?

No. The permission PRING uses is only for the files and folders PRING made (drive.file), and other files are not visible. After connecting, you can stop the connection with Disconnect (press twice). Files already there stay, and new outputs are no longer put there.

What happens to the output if it cannot be put into Google Drive?

The document output itself stays successful. For a detail output, the completion notice shows "Could not save to Google Drive: reason". For bulk and scheduled outputs, it appears in the failure line of the run result. A communication failure is retried once on the spot. A file that could not be put there is not sent again automatically. When the connection is lost, the tab shows "The connection was lost. Please connect again."; press Connect again.

Does the page count go up?

No. What goes into Google Drive is the same document.

Which plans can use it?

Standard or higher. On Lite you can open the tab, and pressing Connect tells you it needs Standard or higher.

Next steps

Written and maintained by: TechJapan LLC (PRING team) (Developer and operator) · Contact