Template: Gmail: Create Oneflow contracts and add participants from new Gmail email attachments

Dineth Kurukularatchi
Dineth Kurukularatchi
  • Updated

This Zap creates a Oneflow contract whenever a new PDF attachment is received in Gmail. The attachment is uploaded as an expanded PDF, and the email sender is added as a participant with viewer permissions.

NOTE

This Zap only processes PDF attachments. Non-PDF attachments are filtered out and will not trigger contract creation.

1. Trigger: New attachment in Gmail

The Zap starts when a new email attachment is received in your Gmail account.

App & trigger

  • Select Gmail as the app.
  • Trigger event: Select New Attachment. The Zap runs whenever a new email with an attachment is received in Gmail.

Account

  • Select your Gmail account from the dropdown. If the required account isn't listed, click + Connect a new account to add it.

2. Filter: Filter conditions

This step ensures the Zap only continues for PDF attachments.

  • Only continue if...
    • Attachments Mime Type (Text) Exactly matches: application/pdf
    • The Zap continues only when the attachment is a PDF file.

NOTE

You can customize the filter condition or click Continue to proceed with the default.

3. Action: Create contract in Oneflow

This step creates a new contract in Oneflow using the PDF attachment's filename as the contract name.

App & action

  • Select Oneflow as the app.
  • Action event: Select Create Contract.

Account

  • Oneflow account: Select your connected Oneflow account. If your account isn't listed, click + Connect a new account. Learn more: Connecting to Oneflow accounts.

Set up action

  • Create contract as: Select the Oneflow user who will create the contract. The available Templates and Workspace options depend on the selected account.
  • Contract name: Defaults to the PDF attachment filename. You can customize this field.
  • Workspace: Select the Oneflow workspace where the contract will be created.
  • Template: Select a template from your Oneflow account.

4. Action: Add an attachment or expanded PDF in Oneflow

This step uploads the Gmail PDF attachment to the Oneflow contract created in the previous step.

IMPORTANT

To upload the PDF to your Oneflow contract, the contract must have at least one attachment or expanded PDF section. Learn more: Attach documents or files.

App & action

  • Select Oneflow as the app.
  • Action: Select Add Attachment or Expanded PDF.

Account

  • Oneflow account: Select your connected Oneflow account.

Configure action

  • Add attachment or expanded PDF as: Choose who performs this action.
    • Contract creator (default): Uploads the file as the contract creator.
    • Another Oneflow user: Uploads the file as another Oneflow user.
  • Contract ID: Automatically populated from step 3.
  • File name: Defaults to the Gmail attachment filename. You can customize this field.
  • File: Select the Gmail attachment from the dropdown. File size must not exceed 20 MB.
  • Upload as: Set to Expanded PDF to add the file as an expanded PDF section in the contract.

5. Action: Add participant in Oneflow

This step adds the Gmail email sender as a participant to the contract with viewer permissions.

App & action

  • Select Oneflow as the app.
  • Action: Select Add Participant.

Account

  • Oneflow account: Select your connected Oneflow account.

Configure action

  • Add new participant to contract as: Choose who performs this action.
    • Contract creator (default): Adds the participant as the contract creator.
    • Another Oneflow user: Adds the participant as another Oneflow user.
  • Contract ID: Automatically populated from step 3.
  • Participant type: Choose the type of participant.
    • Individual (default): Adds an individual as a counterparty.
    • Colleague/Participant: Adds an owner-side party.
    • Company: Adds a company as a counterparty.

NOTE

The available fields vary depending on the selected participant type.

  • Party ID (if participant type is colleague): Enter a unique identifier for the legal entity to which the participant belongs.
  • Company name (if participant type is company): Enter the company name.
  • Participant name: Automatically mapped to the Gmail sender's name.
  • Participant email: Automatically mapped to the Gmail sender's email address.
  • Role in contract: Set to Viewer. The participant can view the contract but cannot sign it.

NOTE

Once all steps are configured, publish the Zap to automate contract creation from Gmail attachments in Oneflow.

Emails with multiple attachments

If a single email contains multiple PDF attachments, the Zap runs once for each attachment. Each run creates a separate contract in Oneflow with that individual attachment uploaded as an expanded PDF and the email sender added as a participant.

NOTE

Non-PDF attachments in the same email are filtered out and will not trigger contract creation.

Mark a contract as signed (optional)

The Oneflow Zapier integration does not include a native Mark as Signed action. To mark a contract as signed automatically, you can add an extra step to your Zap using Zapier's Webhooks by Zapier action to make a custom API call to the Oneflow API.

NOTE

Custom API calls via Webhooks by Zapier require a paid Zapier plan. Refer to the Oneflow API reference for the correct endpoint and required parameters.

To add this step to your Zap:

  1. After step 5, add a new action step to your Zap.
  2. Select Custom, then select Webhooks as the app and POST as the event.

  3. URL: Enter the Oneflow API endpoint for marking a contract as signed:
    • https://api.oneflow.com/contracts/{contract_id}/mark_as_signed
    • Contract ID: Map this from the contract creation step (step 3).

  4. Payload type: Select JSON.
  5. Headers: Add your Oneflow API key as the authorization header.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request