◼️Overview
When an application is approved in Jobcan Workflow, a contract is created based on a Google Document template and a PDF is sent to the email address provided at the time of the workflow application.
It is possible to automate the process from approval to sending the invoice via email.
◼️Preparation
Prepare an invoice template in advance using documents or spreadsheets. In this example, we use a document as an example.
Please refer to here when creating a template.
◼️Setup Method
① Select Jobcan Expense Management/Workflow from the app trigger, perform the following settings, and test/save.
・Action: Select "When an application with a specific title is approved".
・Trigger Interval: Set to 5 minutes.
・Application Title: Enter the specified title.
② Press the + mark, select Jobcan Expense Management/Workflow from the operation to link with the app, and test/save after the following settings.
・Action: Select "Get application details".
・Application ID: Embed the application ID obtained in step ① as {{Application ID}}.
※ For details on dynamically embedding output, please refer to here.
③ Press the + mark, select Google Document from the operation to issue a document, perform the following settings, and test/save.
・Document File ID: Select the document ID of the prepared invoice template from the options.
・Google Drive Folder ID for Storage: Select the folder ID in Google Drive where the PDF and original document will be stored after issuing the document from the options.
・Output File Name: Set an arbitrary file name.
・String to Replace: Press "Get string to replace", display the list of strings to replace, and embed the corresponding values using the output obtained in step ②.
※ For details on document issuance settings, please refer to here.
④ Press the + mark, perform the following settings from the operation to send an email, and save.
・Email Type: Select an arbitrary email service.
・To: Embed the email address extracted in step ②.
・Subject/Body: Enter arbitrary text.
It is also possible to embed names obtained in step ② and vary them for each email.
・Attachment: Use the output and select the issued document.
◼️Notes
・It is necessary to set up account information for integration in each app operation.
・For integration (My App Registration), please refer to here.
・Please replace the setting information for each operation (contract template information, email text, etc.) with arbitrary values for use.