Help

Re: Trouble linking multiple Contact Records to a Calendar Sync

623 1
cancel
Showing results for 
Search instead for 
Did you mean: 
aclaire
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, 

I am working on integrating my google calendar with my airtable base so that I can include all of the meetings that I have with members of my contact list on their contact profile as a linked record to the calendar table. I created an automation to do this for me (see below). 

Screenshot 2024-08-12 at 3.23.24 PM.png

The issue that I have found is that when more than 1 of the contacts that are added to the calendar invite for the meeting is found within my big "Contacts" table, it will grab the unique IDs for both of the contacts and it goes to add my calculated field (the first one in the image below, my primary field, and the only field that I want to add), to my synced calendar "Contacts" field within my calendar table. 

Screenshot 2024-08-12 at 3.27.22 PM.png

Screenshot 2024-08-12 at 3.29.24 PM.png

The problem is the automation tries to update the linked contacts (eg. "Arjin Claire, Evolution") in this "Contacts" tab, but it throws an error when more than 1 are being added. I believe it reads each of these contacts as being concatenated together and since the value is calculated via a formula it throws an error because it wants to create a new cell with each of the contacts that it's taken in. I tried fixing this by making the formula a singl-text line but it doesn't show up how I want it to. I believe the issue lies within the formatting of the field portion within my automation: 

Screenshot 2024-08-12 at 4.24.51 PM.png

I've tried using commas, semicolons, etc. to separate each of these values, but I can't find a way that works as of yet. I also tried making a separate automation for each of the 5 records that I am finding, but a new error occurs where each one is replaced by the other in an infinite loop, so I don't think that's a viable solution. 

Any help is much appreciated 🙂

5 Replies 5

Hiya and welcome!

Here are some of the fixes I can see:

  1. For each new "List of 'Airtable' record ID", you need to add a ", " in between. This goes for anytime you have multiple entries into your field. Here's a screenshot from my base for reference.Sistema_Aotearo_0-1723517549059.png

     

  2. Airtable is going to output all the found emails with the ", ". If the "Find Record" returns with nothing, it'll still try to add the blank data. The automation will then fail because there's now a blank spot with double ", , ,". To fix this, you need to add conditional steps and duplicate one for each time "Contact" meets the conditions. You might end up with MANY conditions to cover all possibilities. My base also does this.Sistema_Aotearo_1-1723517837610.png

Depending on your use case, there is often a simpler way to do this. I'm happy to explore optimizing with you if you want to share more on how the data is set


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/

I've thrown something together here for you to check out.  It uses a script to combine the multiple "Find Record" results into a single array:

Screenshot 2024-08-13 at 5.29.00 PM.png

let {array1, array2} = input.config()

let consolidated = [].concat(array1, array2);

output.set('array', consolidated)

And uses it in the 'Update Record' action:

Screenshot 2024-08-13 at 5.29.53 PM.png

This is an alternative method to what @Sistema_Aotearo  mentions in point 2 of their post; I favour this method as working with a lot of conditions in automations is really laggy for me and kind of frustrating to deal with

Hi @Sistema_Aotearo,

Thank you for the solution! I think the conditional logic that I would need for this would make it really bulky so I'll probably go with the other solution, but thanks to you I know finally understand the problem properly! 

Thanks,

Arjin

@TheTimeSavingCo

Thank you so much! This works super well. I had a feeling that the Script Editor is what I would need to use but I hadn't gotten used to writing using the code that Airtable has in place, so I was getting lost trying to implement it. So far the solution you provided works perfectly and fingers crossed it stays that way 🙂

Huge thanks again for helping me out!

Arjin

That's so helpful I've never tried that! I'll probably start using this script in my automations too!


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/