Create new google sheets document from existing document

Hi, I need some help please.

I use integromat webhook to create new document from existing google drive document for a new client. The trigger is button field in Airtable.
When I activate the trigger google drive creates new document for all the clients in the base. How do I set up to have drive create a new document only for the client/record I have selected in Airtabe.

Thank you for your help.
Pjero

My gut says that you’re searching Airtable somewhere in the early part of your Integromat scenario, and it’s returning all records instead of just the one where you clicked the button.

I’ve got a base where I do something similar, and I pass the triggering record’s ID to Integromat in the webhook call. That way I don’t need to search Airtable. I use the “Retrieve a record” module to collect the data only for that triggering record, and it’s processed by the subsequent modules in the scenario. Here’s how I set up the webhook call:

let url = "https://hook.integromat.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?recordID=";
let table = base.getTable("Invoices");
let view = table.getView("Outstanding: Actions");

let record = await input.recordAsync("Pick a record", view);
await fetch(url + record.id);

I do not understand :confused:

where do I use this formulas? In the scenario now I have webhook and Airtable retrieve record module. How do I continue?

Sorry for not being more clear. That script I included is in a Scripting block in Airtable. Clicking the button in a record triggers the script, and the script makes the webhook call behind the scenes. In your case, you might be using the URL setup for the button and just calling the webhook directly, which will open a new window/tab. I just prefer the script version so that I don’t have to unnecessarily open a browser tab.

In Integromat, the webhook receives the record ID, and then the “Retrieve a record” module uses that ID to pull the full record from Airtable. In my case, the next module is CloudConvert, where I’m passing in data from the Airtable record to convert from HTML to PDF, but in your case you’d pass specific field data to Google. I haven’t tried using Google document templates yet, so I can’t offer specific guidance beyond that.

If the setup you’ve created is essentially the same, but Google is still creating documents for multiple records, could you share screenshots of the setup dialogs for your Integromat modules? Perhaps something in there can shed some light on the issue.

Sorry for late response I did not have access to my laptop.

I am not using blocks in Airtable, so I can not use scripting.

Please find below screenshot of my Integromat scenario as well as Airtable base.

In Field 31 I tried creating link with webhook + DecordID, but this does not activate the webhook.

One search module, searches for Inquiry for and another is looking for Client name, since in Inquiry “Client name” is linked record and it does not come out as string when using it.

Your URL format is incorrect. You should have a ? before the record ID, not an ampersand (&). The ampersand comes before all parameters after the first one, but the first one requires a question mark.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.