Jul 30, 2022 04:45 PM
I am trying to generate an Invoice for line items in Airtable. New Google docs creation automation is very helpful but it lacks basic formatting functions.
So, I use Microsoft Word module in Make but do not know what format I should use in this “Raw values” field. Could anyone please give me an example?
I know this is not really a Airtable question but documentation on this module is quite limited.
My Word templates :
{{invoice_number}}-{{invoice_date}}
{{buyer}}
{{#details}} {{item_code}} {{item_description}} {{unit_price}} {{/details}}
Thanks in advance!
Sep 15, 2022 04:36 PM
Hi Patrice,
The input of “Parse JSON” is the “JSON String” in my previous answer. This should be populated using Airtable formula.
Hope it helps!
Sep 15, 2022 10:46 PM
Hi Trung,
Thanks for your answer, could you show me the airtable formula? Is it a concanetation?
Sep 16, 2022 05:44 AM
Hi Patrice,
I do not know your exact requirement but the idea is to populate JSON String for each “row” of Word table:
Then, use a Rollup field type in the tables which these rows are linked to:
This value will then be used as the input for Parse JSON module.
Hope this helps!
Sep 16, 2022 12:29 PM
Hi Trung,
how do you create the json fx of the CHI TIET DH table?
Sep 17, 2022 06:45 PM
Hi Patrice,
Nothing special at all, mostly concatenation. This is mine:
'{"item_code":"'&{Mã hàng}&'","image":"'&{Image URL (first)}&'","description":"'&{Mô tả (from Mã hàng)}&'","size":"'&{Kích thước}&'","quantity-ctn":"'&ROUND({SL (KIỆN)},2)&'","quantity-pcs":"'&{Qty (format)}&'","unit":"'&{Đơn vị}&'","price":"'&{Đơn giá (format)}&'","total":"'&{Total (format)}&'","remaining-pcs":"'&{Remaining qty (format)}&'","remaining-ctn":"'&ROUND({SL TỒN GIAO (KIỆN)},2)&'","deadline":"'&{NGÀY CẦN GIAO}&'","note":"'&{GHI CHÚ}&'"}'
For further and specific functions, you should open a new thread. Airtable documentation is quite great,too!
Regards,
Dec 11, 2022 01:29 AM
Thanks for the detailed information @Trung_Nguyen 🙏
Can you share how did you generate the json from the data in airtable? Is it hard-coded key names, or is it dynamic?
I ideally want to get the key name from the column name of airtable but I can't find how.
May 22, 2023 06:46 PM - edited May 22, 2023 06:46 PM
This is great information @Trung_Nguyen . I am about to put my head through the wall on the Word Template module. Have you figured out how to get the formatted document into an attachment field in Airtable when you are done?
May 22, 2023 07:06 PM
You can use "Airtable - Update a record" to update the attachment field with the source file from "Onedrive - Download a file"
May 22, 2023 08:04 PM
@Trung_Nguyen I am still running into a challenge. I did what you suggested. 1) Connected to Airtable to get the date. 2) Downloaded the file from OneDrive. 3) Ran the file through the Word Template module and now I am trying to get the file into Airtable and I just feel like I am missing something. I put in the FileName and it doesn't make it. I tried WebUrl from OneDrive. Any ideas?
May 22, 2023 08:30 PM
Sorry, my previous reply was wrong. You have to use "Onedrive - get a sharable link" then use it as the file URL. Hope it helps!