Hi @Arkadiy
Not too difficult at all - so long as the JSON data you're sending to Zapier is well formed.
You'd create a zap triggered by "Webhook->Catch Webhook"
Webhooks by Zapier Integrations | Connect Your Apps with Zapier
Then, you'd just have your system fire the JSON data to the unqiue webhook URL Zapier will give you. You'll then end up with all the different data fields you need to map. Both Google Docs and Google Sheets integrate with Zapier.
If you're new to Zapier, here is a good place to start when it comes to learning how to customize them:
Create Zaps
Hopefully that all makes sense. Let us know if you've got any followup questions.
Like @AndrewJDavison_Luhhu said this is fairly simple, but I will recommend using something like Formstack Documents (formerly called webmerge) to make the documents as it makes the template filling significantly easier. They also have an export/convert to PDF function at which point you can email it to whomever you choose.
Depending on the logic you need you might want to add paths so if x=blue send the documents to Fred and Lisa, otherwise if x=red send the documents to Sam and Julia. etc.
@PaulKortman why not Google Doc/Sheets? Formstack looks like is much expensive.
@Arkadiy I'm sorry to have confused, there's no real reason to go with Formstack, yes it does cost more. You should be able to do what you need to do by using a template within Google Documents.
So to add on to what was said above:
Catch the data via a Webhook or direct integration.
Each order will likely have it's own trigger event or webhook.
Format that data (if needed) using Formatter by Zapier, to ensure the outputs are human-readible.
Create a Google Doc Template in Google Docs, fill it with the appropriate variables, and then include a 'Create Google Document from Template' action in your Zap using Google Docs.
Fill each variable with the output from the Formatter or Webhooks by Zapier steps (if not formatted).
IMPORTANT - To get a PDF of these files, you must add in a GOOGLE DRIVE action after the Google Docs action. Here, you will specifically choose the 'Find File' option, searching for the file name from the previous step, in the folder where these documents are being created.
Now, you can then include a Gmail action where you are able to include an attachment. In this field, you will choose the file found from the GOOGLE DRIVE action (not Google Docs), specifically, the PDF (file) output.
You can also pull other file types like Docx, rtf, etc., but that is how you get the PDF file.
If you want, you can also take the variables from the first two steps (Webhooks/Formatter) and create a Google Sheet row at any time in this Zap. If you want to include a link to the Google Doc file though, include this step at the end.
Let me know if you have any questions on this! :)
Hey @Arkadiy, we just wanted to check in to see if any of the above solutions worked for you. Let us know!