Help

Re: Todoist / Zapier question

3102 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Rick_Klau
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi - I’ve successfully created a Zap tied to a CRM base in Airtable. Here’s the general idea:

Airtable base: each record has a contact frequency (quarterly, semi-annually, annually, or none) and a ‘last contacted’ date. A formula calculates whether today is >= last contacted date + frequency days (+90, +180, +365). If it is, the record is marked ‘Overdue’; there’s a view of all people in the base that filters to show only those records marked ‘overdue’.

Every time a new record hits the ‘overdue’ view, Zapier creates a new task in Todoist to contact that person, along with their contact info. This is enabled and working.

When the task is completed in Todoist, I want Zapier to update the ‘last contacted’ field for the correct record in Airtable to today’s date. I’m struggling to figure out how I can create a zap that finds the correct record so it can update the appropriate field; I’ve tried passing the recordID to Todoist via the first zap (it’s currently stored in the Notes field in Todoist), but can’t figure out how to use that to query Airtable for the second zap.

Apologies if this isn’t clear - I’m new to both Airtable and Zapier and am trying to dive in. Appreciate any help anyone can provide!

8 Replies 8

Welcome to the community, Rick! :grinning_face_with_big_eyes:

Are the comments for the task (guessing that’s what you meant re: the Notes field) not included in the data when you complete the task in Todoist and it triggers the new zap in Zapier? I used to use Todoist, but no longer have a Premium account, so I can’t test whether or not that feeds into Zapier via the trigger.

Hi @Rick_Klau - doing a quick prototype of this it seems that the AT record ID you have stored in the notes isn’t directly useful (although this might be because I’m using a free TD account - maybe if you use the premium version the “notes” field can be used).

However, without the paid TD account you can still do this automation in Zapier, but it will need a 3 step Zap:

  • New TD trigger based on task completion then,
  • Find an AT record based on the name of the task
  • Update the found record with the last contacted date

The TD task record holds the task completed date, so you can use this date to push into the last contacted date in AT.

Hope this helps

JB

Thanks, Jonathan! I’m stuck on this step - probably because the first zap creates a task with the following text:

“contact [name], [phone] / [email]”

As a result, Zapier is passing the full contents of that string back and failing to match (predictably). Matching on [name] has potential failure modes - in my Airtable, it’s possible that two or more records will share a name (i.e., “John Smith”).

Any way to truncate the Todoist task name and match on [email]? Or ideally pass a GUID from Airtable in the first zap that could be returned in the second?

Correct, Zapier says it’s storing the data in “Notes”, which Todoist represents as a comment on the task. Zapier can see the contents of Notes when creating a trigger, but I don’t know how to strip out the unique identifier I want to use (i.e., extract the email address - the string between “- " and " /” - and pass that back to Airtable to find a record that has that as its primary email address). Zapier wants me to use the entirety of the field, which obviously doesn’t work… I’ll keep poking at it, but any pointers are welcome!

I thought you said that you were storing the record ID in those notes. If so, you don’t need to search for the email address because you have the exact ID of the record you want to update.

If you do need to extract things from the notes data, you could try using one or more instances of the Formatter by Zapier action. Choose the Text formatter, and you’ll find lots of options for processing text. You might be able to do what you need with just one of those, or chain several together to get to the info you want.

I seem to be making this more complicated than it needs to be, but here’s what I’ve done:

  • created a formula field in Airtable that’s set to Record_ID() so that I can see the record ID for a given record

Zap 1: create task in Todoist

  • creates task, passes {Record ID} to a comment for the created task

Zap 2: trigger - when a task is completed in Todoist

  • once trigger fires, finds a record in Airtable (this is the step that’s failing). I have “search by field” set to “Record ID”, and “search value” set to the Todoist task “notes content” (whose value is the Record ID value that was passed from Zap 1). When I test it, I get:

“Bargle. We had trouble getting a matching record. :-(Error details:
Nothing could be found for the search.”

Like I said, I’m nearly certain that I’ve massively over-complicated this - or I’m just missing something fundamental about Zapier’s communication with Airtable. Anything jump out that I’m doing obviously wrong?

Hi @Rick_Klau - I managed to get this to work, albeit in a slightly different way to you as I don’t have a paid Todoist account and so don’t have access to task “notes”. However, the principle should be the same, you just set it up on different fields.

So, in my prototype, when I create the task in Todoist, I’m mapping the person’s name and the AT record ID to the task name - something like this:

Jonathan Bowen | rec1234ghdhjsrhtf

(with a pipe separator) and in Todoist it looks like this:

48

Then on my second Zap when the task is completed, I read the task name (person’s name and record ID) and use a couple of Zapier text formatter actions to get the record ID. In your case, you should be able to get the person’s name as one field and the record ID from your notes field. It might be that the value in your notes field is “corrupted” in some way - trailing whitespace for example - so if the steps below don’t work them you could also look at a text format action to get exactly the right value for the record ID.

Now that I have the record ID, I use an Airtable “update record” component to set the completed date in Airtable. In my original answer, I suggested using an AT “find record” before the update. This doesn’t work in this case, although I have used this pattern for AT updates on other Zaps. (Note - doesn’t work if you are finding by record ID, finding by name seems to work, but as per your comments this might not be unique, so not useful)

For your use case, it looks like an “update” is all that is required.

The setup in the update record is this:

Screenshot 2019-07-25 at 11.18.39.png

  • Choose “use a custom value” in the Record selection
  • In “custom value for record id” use the AT record ID you have extracted earlier (in my case from the title, in your case from the notes)

I’ve then also set my AT “last contacted date” to be the date that the todoist task was completed, but this was just for my test, you might do something different.

Anyway, this all works for me. I can:

  • Add a record is AT and pass it over to TD
  • Complete the task in TD and have this update my AT record

Hope this helps you figure out the set up you need. This was a lot more complicated than I had expected!

JB

@JonathanBowen THANK YOU! This is exactly what I was hoping for.

For anyone else who stumbles upon this post and wants to replicate what I did:

Zap 2:

  • Trigger: new completed task in Todoist
  • Formatter: extract Record ID from task
  • Formatter: convert date from Todoist date format to MM/DD/YYYY
  • Airtable: update record (using steps from JB above); match on Record ID from formatter, and send converted date to “last contacted” field in Airtable

Thanks again for your patience as I worked through this. Really excited to have this working.