■Overview
After entering the estimate details in the form, records and table registration in kintone will be performed.
Then, using the contents of the form, an estimate will be created using a pre-prepared estimate template and sent.
Finally, a flag indicating the estimate has been sent will be attached to the record, completing the process.
※Supplement
・This time, multiple item data will be stored in the kintone table by repeating the same process. At that time, a spreadsheet will be used in between, and functions, etc., will be used, so first, please try copying the contents of the following spreadsheet as is.
※The spreadsheet for repeating the same process is here
※The estimate template spreadsheet is here
■Setup Method
① Set up a form trigger and establish the necessary estimate items.
※At this time, items with multiple values such as item names and quantities should be in list format.
② Select kintone from the database operations and configure the following settings.
・Action: Add record
・App ID: Enter the target app ID
・Values to add to the record: Embed the output obtained in ① into the displayed field code
③ Select a spreadsheet from the operations linked with the app and configure the following settings.
・Action: Enter values in range
・Spreadsheet ID: ID of the spreadsheet to use
・Sheet name: Name of the target sheet
・Target cell range: A1:A
・Values to enter: Items and quantities obtained in ① (add data and enter)
・Direction: Column direction
④ Select a spreadsheet from the operations linked with the app and configure the following settings.
・Action: Get values
・Spreadsheet ID: ID of the spreadsheet to use
・Sheet name: Name of the target sheet
・Range: A9:A
・Direction: Column direction
⑤ Select the operation to repeat the same process and configure the following settings.
・Operation: Operation from ④
・Output: Obtained values
⑥ Select a spreadsheet from the operations linked with the database operation at the loop destination route and configure the following settings.
・Action: Get record
・Spreadsheet ID: ID of the spreadsheet to use
・Sheet name: Name of the target sheet
・Range: A8:D
・Search condition: No equals {{loop variable of obtained value}}
⑦ Select kintone from the database operations and configure the following settings.
・Action: Add a new row to the subtable of a specific record
・App ID: Specified app ID
・Subtable field code: Select from candidates
・Record condition: Record number = {{Record ID}} obtained in ②
・Values to add to the subtable row: Embed the output of items and quantities obtained in ⑥
⑧ For the non-loop direction, select a spreadsheet from the document issuance operations, configure the following settings, and test/save.
・Spreadsheet ID: Select the spreadsheet ID used as the invoice template from candidates
・Folder ID to store in Google Drive: Select the folder ID to store after document issuance from candidates
・File name: Arbitrary file name
・String to replace: Embed values obtained in ①, etc., into the corresponding string
※The setup method for the document issuance operation is here https://intercom.help/yoom/ja/articles/8237765
⑨ Select the operation to send an email, choose any email tool, configure the following settings, and save.
・To: Embed the address obtained in ①
・Subject, Body: Enter each (values obtained in ① can also be embedded)
・Attachment: Select to use output and choose the issued document as the value
⑩ Select kintone from the database operations and configure the following settings.
・Action: Update record
・App ID: Specified app ID
・Record condition: Record number = {{Record ID}} obtained in ②
・Values to update: Enter the specified value in the flag field