Question

How do I differentiate between the rows in Airtable, and what should I pick as an Identifier in Outlook?


Userlevel 1
Badge

Hello everyone! 

 

So I have an Airtable database with currently 3 different rows. 

I’ve made a Zap with Outlook as the trigger and Airtable as the action. 

The trigger is set to be fired when a new mail is received in my inbox (that’s it for now). 

The action should be to import the attachments from these mails to the 3 different rows in Airtable based on the incoming mail. 

 

My question is: how do I differentiate between the rows in Airtable? Do I have to make 3 different Zaps? If so, what should I pick as Identifier in Outlook, if that’s possible to do? 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

17 replies

Userlevel 7
Badge +14

Hi @plyske 

Good question.

It’s be better to use Gmail, because Gmail has this Zap trigger: Gmail - New Attachment

 

Try these Zap steps:

  1. Trigger: Outlook - New Email
  2. Action: Airtable - Find Record
  3. Action: Airtable - Update Record
    1. Map the Record ID from the previous step.
Userlevel 1
Badge

Hi @Troy Tessalone 

 

Thanks again!

 

How do I sort between the 3 different Records? I mean; how does Airtable know which attachment belongs to which Record? 

Userlevel 7
Badge +14

@plyske 

You have to specify the Record ID you want to add a file to.

 

  • Action: Airtable - Find Record
  • Action: Airtable - Update Record
    1. Map the Record ID from the previous step.
Userlevel 1
Badge

@Troy Tessalone Got it! So I’ll have to make a Zap for each Record, right? 

Userlevel 7
Badge +14

@plyske

No, you should be able to use a dynamic value to for the Find Record search.

  • Action: Airtable - Find Record
  • Action: Airtable - Update Record
    1. Map the Record ID from the previous step.
Userlevel 1
Badge

@Troy Tessalone How do I do that exactly? I am confused now :) 

 

The picture shows the 3 Records I have. 

Userlevel 7
Badge +14

@plyske 

You’d likely be better served logging the attachments in another Table in the Base, then linking the records using a Link field type.

https://support.airtable.com/docs/linking-records-in-airtable

 

Guess it depends what value from the received email indicates what row you are trying to lookup.

For example, if the Outlook From Name is TV2, then you’d search for Name=[FROM NAME] in the Airtable Find Record step.

 

 

Userlevel 1
Badge

For example I have this ‘Find Record’ (Airtable): 

 

 

I’ve added ‘Name’ to Seach by Field and then told it to look at the Subject of the email. BUT how does Airtable know which Record it is? I mean that for this action I want it to look at Name: TV2 and for the next Action I want it to look for Name: Prenax? 

 

Here it just looks like it will match with the Record ‘Prenax’?

Userlevel 1
Badge

This is the field I don’t understand. 

Let me try to explain: 

I have a Trigger named ‘New email in Microsoft Outlook’

This trigger finds a certain mail and gets the data from that email - let’s say that the Subject is ‘Ice cream’. 

I then add a ‘Find Record in Airtable’:

As you can see, I’ve told the Zap to look at the Name field and match that with the Subject. However it takes the actual Subject and not just ‘Subject’, so in order for this Zap to work, the Subject has to be ‘Ice cream’. That’s where I stop understanding how this work. 

What I then did was to add 2 more ‘Find Record in Airtable’ since I have 3 Records in total. Did the same as shown above. However since the 2 other Records have different names, they no longer match the Subject since Airtable uses the actual Subject ‘Ice cream’ and now the Name is no longer Ice cream, but ‘Chocolate’ and ‘Hotdog’. 

So as you can see, Airtable thinks that I only have 1 Record (since the ID) is the same for both ‘Find Record in Airtable’, and that’s because 1 of the Records matches with the actual Subject from the email. 

 

So how do I get around this? I want Airtable to understand, that I have 3 unique Records that shall match with 3 different subjects and based on that get different data based on the subject from the mail and the name of the Record in Airtable. 

 

Userlevel 7
Badge +14

@plyske

Have you tried turning the Zap ON and testing?

Then check your Zap Runs to see the DATA IN/OUT for each Zap step to help you better understand the data flow, results, and any errors?

 

Options:

  1. Dynamic Zap (scales if you add new Airtable records)
    1. Trigger: Outlook - New Email
    2. Action: Airtable - Find Record
      1. This assumes the search value will match an existing Airtable record field value.
    3. Action: Airtable - Update Record
  2. Use 1 Zap per Airtable record
    1. You may have to use a Filter step in the Zap.
    2. You wouldn’t need a Find Record step.

 

Let’s take your example…

The mapped variable for “Subject” will change each time the Zap is triggered to run.

If there is an Airtable record with Name=Prenax, then the Zap action step for Airtable Find Record will return the record ID for the matching record.

If there is no matching record, then no record ID will be returned.

The record ID can be used to do the Airtable Update Record Zap action step.

Help article about the Airtable Record ID: https://support.airtable.com/docs/record-id

 

Userlevel 1
Badge

Hi @Troy Tessalone 

So I think I got it to work! Thanks a lot for your help. However in the ‘Attachments’ table something odd happens when a new attachment is added to a name. If you take a look at the picture, you’ll see 6 attachments, but only 4 names. The 2 attachments w/o a name belongs to TV2. 

 

My question is: Why doesn’t it add ‘TV2’ to those attachments? 

Userlevel 7
Badge +14

@plyske

My question is: Why doesn’t it add ‘TV2’ to those attachments? 

Depends on how you have your Zap steps configured.

You should be creating a new Attachment Record that is linked to the parent record, not updating the parent Record in the other Table.

If you are updating the parent record, then you are likely overwriting the Attachment field value, thus why there is only 1 Attachment linked.

Userlevel 1
Badge

@Troy Tessalone 

 

It looks like this: 

The zap finds the Records in the main table. Is that wrong?

Userlevel 7
Badge +14

@plyske 

You should be creating a new Attachment Record that is linked to the parent record, not updating the parent Record in the other Table.

If you are updating the parent record, then you are likely overwriting the Attachment field value, thus why there is only 1 Attachment linked.

Userlevel 1
Badge

@Troy Tessalone I actually think I fixed it using Automations in Airtable! 

 

Userlevel 7
Badge +12

Hi @plyske! Nice work in finding another way around - I found Airtable automations to be really helpful too. 

Could I ask - did you use any of the suggestions that Troy gave to set up a Zap (eg like his first reply) and then use an automation to finish it? I’d love to make sure that any other users with a similar issue are able to get some inspiration and ideas from your question!

Userlevel 1
Badge

Hi @Danvers Thanks for your reply! 

Let me get back to this one later 👍