Connect Airtable

Dina Bennett
Dina Bennett
  • Updated

Use the Airtable Webhook integration to automatically create and update Airtable records based on your Ziflow proof activity. See updates in real time for new proofs, comments, decisions, and more—keeping your team aligned in the tools they already use.

Available for administrators: Enterprise

You can create a flow that starts when a Ziflow event occurs. If you are new to flow creation and webhooks, see Understand automation flows (Connect) and Build flows with Webhook Zibots.

 


Generate your Airtable personal access token

You will need to add your personal access token to authorize Ziflow to read and write data to your table.

  1. Select your avatar and choose Builder Hub.
  2. Select Personal access tokens and select Create token.

    generate-airtable-token.jpg
     
  3. Complete the information
    Name: Enter the name of your token (anything you want)
    Scopes: Select Add scopes and choose:
    data.records:read
    data.records:write
    Access: Select your Base or select All current and future
  4. Select Create token.

    A pop-up opens with your token. Copy and save this token somewhere safe. You won’t be able to access it again. You can change the scope of existing tokens, but you won’t be able to see their full value again, only a preview. If you lose it you’ll need to generate a new token.

Create a new flow

  1. Select Connect in Ziflow’s main navigation and select Create Flow.

    create-flow-open.png
     
  2. Select Ziflow as your flow’s application source.
  3. Enter a name for your flow.
  4. Select the event that will start the flow. See Ziflow events for a list of all Ziflow events and details on each setting.

    choose-event-ziflow.png

 


 

Create a new record in Airtable from a new proof

  1. Select the New proof/version Ziflow event and configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot will create a record in Airtable and update the columns you specify.

    create-new-record-webhook.jpg

    Field Description
    Request type POST
    URL

    Enter your Airtable URL. For more information, refer to the Airtable documentationto see how to collect base and table IDs.

    https://api.airtable.com/v0/{baseId}/{tableIdOrName}

    Request body

    Enter the JSON body referencing columns that you would like to update in Airtable with data from Ziflow. In this example, we are updating four Ziflow fields in Airtable: Name, Proof Status Proof Link URL, and Version.

    {
    "records": [
    {
    "fields": {
    "Name": "{$.proof.name}",
    "Proof Status": "{$.proof.status}",
    "Proof Link URL": "{$.proof.public_link}",
    "Version": "V {$.proof.version}"
    }
    }
    ]
    }
    Headers

    Create a header:

    Key: Authorization

    Value: Bearer {your generated token}

    header-info.jpg

  4. Select Next. Save your flow.

  5. In Airtable, create or edit columns in the table you referenced in the URL to match those you added in the Request body. For more information, see Adding a field in Airtable.

Note: The names of the new Airtable columns and Request body must match exactly, for example, you must have a column named Proof Status if you added one in the Request body, or the flow will not work.  ​

Airtable board with record created within Ziflow

Create a custom property in Ziflow

Create a custom property to hold the Airtable record ID and make it and the group it belongs to visible. See Add custom proof properties and tags.

 

Add a Zibot to store the Airtable Record ID

  1. Add a Update proof custom property Zibot to your flow after the webhook. This Zibot will get an Airtable record ID from Airtable so that you can store that value in a custom property and use it to tell Ziflow which record to update when there are updates from the Ziflow side (new version or approval status).

    airtable-update-property-zibot.jpg
     
  2. Select the group that your new property is in and the property from the lists.
  3. In provide text, add

    #{$.zibot[0].data.records.id}#
  4. Select Next and Save and Turn on.
  5. Test your flow by creating a sample proof in Ziflow and verifying that it added a record in the Proof Details page.

    airtable-verify-record-id.jpg

 

Associate a new proof with an existing Airtable record

Use this if you already have an Airtable record and want to sync new proofs to it. Only Ziflow-related fields are updated; all other fields remain unchanged.

  1. Select the New proof/version Ziflow event, configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot will create a record in Airtable based on an Airtable Record ID property entered during proof creation.

    airtable-associate-to-Airtable-record-webhook.jpg

For updates to existing Airtable records, use the PATCH request type. Using PUT performs a destructive update and will overwrite the entire record, clearing any fields not included in the request.

Field Description
Request type PATCH
URL

Enter your Airtable URL. For more information, refer to the Airtable documentation to see how to collect base and table IDs.

https://api.airtable.com/v0/{baseId}/{tableIdOrName}

Request body

Enter the JSON body referencing columns that you would like to update in Airtable with data from Ziflow. In this case, we are updating four Ziflow fields in Airtable: Name, Proof Status Proof Link URL, and Version.

{
"records": [
{
"id": "{$.proof.custom_properties[?(@.name=='Airtable')].properties[?(@.name=='Airtable Record ID')].value}",
"fields": {
"Name": "{$.proof.name}",
"Proof Status": "{$.proof.status}",
"Proof Link URL": "{$.proof.public_link}",
"Version": "V {$.proof.version}"
}
}
]
}
Headers

Create a header:

Key: Authorization

Value: Bearer {your generated token}

header-info.jpg

Select Next and Save and Turn on.

Test your flow by creating a sample proof in Ziflow (with the Airtable record ID entered in the custom property field) and verifying that the flow connected Ziflow proof details with the Airtable record.

Test Ziflow - Airtable integration


 

Update Airtable records based on proof decisions

  1. Select the Decision update Ziflow event, configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot will update the Airtable record status with a proof decision once it is calculated in Ziflow.

    airtable-decision-update-webhook.jpg

For updates to existing Airtable records, use the PATCH request type. Using PUT performs a destructive update and will overwrite the entire record, clearing any fields not included in the request.

Field Description
Request type PATCH
URL

Enter your Airtable URL. For more information, refer to the Airtable documentation to see how to collect base and table IDs.

https://api.airtable.com/v0/{baseId}/{tableIdOrName}

Request body

Enter the JSON body referencing columns that you would like to update in Airtable with data from Ziflow. In this case, we are updating with Proof Status from Ziflow.

{
"records": [
{
"id": "{$.proof.custom_properties[?(@.name=='Properties for integration purposes')].properties[?(@.name=='Airtable Record ID')].value}",
"fields": {
"Proof Status": "Approved"
}
}
]
}
Headers

Create a header:

Key: Authorization

Value: Bearer {your generated token}

header-info.jpg

Select Next and Save and Turn on.

Test your flow by submitting a proof decision on a sample proof in Ziflow and then checking if the flow has passed the correct proof status in the Airtable record.

Test Ziflow - Airtable integration

 

Update Airtable record when a new proof version is created

  1. Select the New proof/version Ziflow event, configure the fields and select Next.
  2. Select Webhook Zibot.
  3. Fill out the Webhook Zibot details. This Zibot will update an Airtable record when a new proof version is added in Ziflow.

For updates to existing Airtable records, use the PATCH request type. Using PUT performs a destructive update and will overwrite the entire record, clearing any fields not included in the request.

Field Description
Request type PATCH
URL

Enter your Airtable URL. For more information, refer to the Airtable documentation to see how to collect base and table IDs.

https://api.airtable.com/v0/{baseId}/{tableIdOrName}

Request body

Enter the JSON body referencing columns that you would like to update in Airtable with data from Ziflow. In this case, I decided that the record on the Airtable side should be updated with four fields from Ziflow: Name, Proof Status Proof Link URL & Version.

{
"records": [
{
"id": "{$.proof.custom_properties[?(@.name=='Airtable')].properties[?(@.name=='Airtable Record ID')].value}",
"fields": {
"Name": "{$.proof.name}",
"Proof Status": "{$.proof.status}",
"Proof Link URL": "{$.proof.public_link}",
"Version": "V {$.proof.version}"
}
}
]
}
Headers

Create a header:

Key: Authorization

Value: Bearer {your generated token}

header-info.jpg

Select Next and Save and Turn on.

Test your flow by creating a new proof version and then checking if the flow has passed updated version details in the Airtable record.

Test Ziflow - Airtable integration

 

Additional information

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.