■Overview
This is a flow that sends emails with attached invoices to multiple recipients using billing information managed in a spreadsheet when a pre-specified date arrives.
■Preparation
・Apply filters in advance in the spreadsheet to identify the billing targets. Example of an actual sheet▼
・Prepare a template for the invoice in advance. Example of an actual template▼
https://docs.google.com/spreadsheets/d/1zkxfutABYs6smPd9Ui27vG1_b5481cRu2EN3yfduG-o/edit#gid=0
■Creation Method
① Select a scheduled trigger from the trigger and set it to activate on the specified date.
② Press the + mark under the trigger, select the spreadsheet from "Connect with Apps," and perform the following settings, then test and save.
・Action: Retrieve values
・Spreadsheet ID: Select the spreadsheet ID from the candidates for the spreadsheet you want to retrieve values from.
・Sheet Name: Select the target sheet from the candidates. (In this case, select Example 6_2)
・Range: Enter the range of cells you want to retrieve, like A2:A. (In this case, specify A2:A to retrieve the pre-numbered unique billing ID)
・Direction: Column direction
③ Press the + mark, select the operation to repeat the same process, perform the following settings, and save.
・Operation: Operation from step ②
・Output: Retrieved values
※ For settings to repeat the same process, please refer here. https://intercom.help/yoom/ja/articles/6265153
④ Press the + mark in the loop direction, select the spreadsheet from "Operate Database," and perform the following settings.
・Action: Retrieve records
・Spreadsheet ID: Select the spreadsheet ID from the candidates for the spreadsheet you want to retrieve records from.
・Spreadsheet Tab Name: Select the target sheet from the candidates. (In this case, select Example 6_2)
・Table Range: Select the range including column names (headers). ex A1:P etc
・Condition for the records you want to retrieve: Select the column corresponding to the unique value obtained in step ②, embed the output {{〇〇 loop variable}} obtained in step ③, and search with the condition "equal."
※ For dynamically changing values using output, please refer here. https://intercom.help/yoom/ja/articles/8223528
⑤ Press the + mark, select the spreadsheet from "Issue Document Operation," perform the following settings, then test and save.
・Spreadsheet ID: Select the spreadsheet ID used as the invoice template from the candidates.
・Folder ID to store in Google Drive: Select the folder ID from the candidates where the document will be stored after issuance.
・File Name: Set an arbitrary file name.
・String to be replaced: Embed the values obtained in step ④ for the corresponding strings.
※ For the method of setting the operation to issue documents, please refer here. https://intercom.help/yoom/ja/articles/8237765
⑥ Select the operation to send an email, choose any email tool, perform the following settings, and save.
・To: Embed if the address was obtained in step ④.
・Subject, Body: Enter each. It is also possible to embed the values obtained in step ④.
・Attachment: Select "Use Output" and choose the issued document as the value.
⑦ Press the + mark, select the spreadsheet from "Operate Database," and perform the following settings.
・Action: Update records
・Spreadsheet ID: Select the spreadsheet ID from the candidates for the spreadsheet you want to update records from.
・Spreadsheet Tab Name: Select the target sheet from the candidates. (In this case, select Example 6_1)
・Table Range: Select the range including column names (headers). ex A1:P etc
・Condition for the records you want to update: Select the column corresponding to the unique value obtained in step ②, embed the unique value obtained in step ④ (in this case, billing ID) as output, and search with the condition "equal."
・Value to update: Enter a string like "Sent" in the send flag section.