How to automate the process of sending contracts to Partners with Make
Are you tired of spending hours manually managing the submission of contracts, invoices and other standard documents? If you work in Finance, Sales, Human Resources, Project Management or Marketing, you may find a valuable ally in our new Make workflow.
Here's a workflow designed to automate crucial tasks in the document management process:
- Get the RecordID of a specific document from the Airtable database: Quickly access the data you need to generate documents.
- Download the document as a PDF: Convert the document to the desired format effortlessly.
- Email the new partner an email with the attached document: Send documents directly to recipients without interruption.
- Update the state of the record in the Airtable database: Keep track of document status and changes without having to manage them manually.
With this workflow, you'll save valuable time and minimize human errors. Whether you need to send contracts, invoices, or standard documents, this workflow will make you more efficient and productive.
This flow is essential if you operate in the sector:
- Finance
- Sales
- HR
- Project Management
- Marketing
Ready to simplify your work routine? Read on to learn how to implement this workflow in your work environment.
Step 1: Prerequisites
Before you begin, make sure you have the following prerequisites:
- An account on Make
- A Gmail connection
- A connection to Airtable
- Webhook from/to Airtable
Step 2: Configuring the Workflow
We'll use Make to orchestrate our workflow, which includes 1 Webhook and 6 actions. Start by setting up the following workflow:
1. Webhooks- Custom Webhook
This acts as a trigger for the workflow so that the Make scenario starts.
You should copy the URL of the webhook by clicking 'Copy address to the clipboard' and include it in the 'Run a script' form in the Automation section in Airtable by choosing the trigger you want to use (for example, 'When a record matches conditions').
You can copy/paste the following script to generate the webhook connection between Airtable and Make:
const webhookUrl = "YOUR_WEBHOOK_URL";
const {recordId} = input.config();
const response = await fetch(`${webhookUrl}?recordId=${recordId}`);
console.log(response.status);
Remember that every time you modify the script you must update it to make it effective.
2. Airtable- Get a Record
Get the field RecordID From the table Partners inside the database Sales.
3. Get doc ID- Match pattern
In this block, a text parser is responsible for the Subset Of the important part of information from the URL through a regular expression.
This is equivalent to extracting the document id:
18g9wjVqlqxPXApnt0KiK_nTjK4iBOUbWQ2PmCg7Aayo
from the URL contained in the field 'Link to the contract'
with a custom rule depending on the structure of the URL itself. In this case we have the following:
(?<=\/d\/)[^\/]+(?=\/)
Feel free to consult the documentation for detailed information on the Text Parser and how to play with regular expressions.
4. Download doc- Download doc
Get the answer from the Match Pattern block ( Fallback Match) and for the document ID and specify the format for the download (for example PDF)
5. Markdown- Markdown to HTML
Create the body of the email you want to send using the parameters returned in step 2. Airtable - Get a Record
- Attorney
- Name of the company
6. Gmail- Send an email
Use the parameters and files obtained in the previous steps to send a personalized email
Update the record in Airtable. This action will find the Record ID What did you recover in step 2. Airtable - Get a Record
7. Airtable- Update a record
Update the Partners table in the Sales database by registering the contract as Envoy
Step 3: Final Result
Et voilà
This is the result of the Make 👇🏽 scenario
Congratulations on successfully automating your first document submission process 🚀
Now you can save valuable time by focusing on more strategic activities.
Curious to find out how to create this document with another automation? Check this step-by-step guide (create contract) to create another customized scenario with Make!
Don't hesitate to explore our YouTube channel to implement other use cases and automations 🤖
Good automation!