Using Variables in Integromat Asana/Webhooks

Hello Asana Community,
I’m trying to use integromat to create a complex onboarding project when we have a new employee added to our airtable database. The flow works great, but I’m stuck at trying to trigger emails to send out to the new hire when a task that the automation created, is completed.

What I’m trying to do is say “when a new employee is added to airtable, create a bunch of tasks, then watch for them to be completed, and email the new employee when they are”. But the problem is that I can’t figure out a way to watch for a task that my flow has created, I can only figure out how to watch for tasks that already exist.

If I could add in a variable from a task I’ve created like “Task ID”, into the webhook, it would work, but I can’t seem to figure out how to do that as the variables aren’t showing in the webhook interface, and the module doesn’t allow for inputs.

Does anyone know if this possible?

Thank you!

1 Like

Hi @Mike_Wilson and welcome to the forum!

Calling @Michaela_S who works for Integromat and is awesomely helpful here in the forum…


Hello there! Sorry for the slightly delayed reply but you know - the holiday season :slightly_smiling_face:

What @Mike_Wilson is looking to do certainly is possible but two scenarios are needed.

  1. The first one to create all the new tasks (you probably have that already :slightly_smiling_face: ) This scenario should, however, end with storing the task IDs in our Data Store. The very minimum here would be to store the employee name + task ID in Asana + task status.

  2. The second scenario will then listen for webhooks and will check the incoming changes of the given task ID against the Data Store task IDs that were saved “previously”. If your incoming task IDs from the webhook are present in the Data Store, then you can act on it. You should at least update the task status in the Data Store.

Now, depending on your business logic, there are several options on when to trigger the email to go out. You can send the notification for each completed individual task or only when all the employee’s tasks are completed = i.e. when you search in the Data Store and all tasks for the employee have a specific status.

There is no way for us to change when the webhook payload comes in so the only option we are left with is some sort of data storage keeping track of tasks and their statuses :nerd_face:

Hope this helps :blush:

Thanks so much for this break down Michaela!

I was able to hook up the data store and catch the Task IDs, and then use it in the second scenario as you mentioned. Where I’m getting stuck now is that in order for the webhook to monitor task level changes, it seems it needs to be narrowed down to the project ID. In the original question I failed to mention that this onboarding process creates a new project for each onboard, and therefore the project doesn’t exist yet for the webhook to watch.

I tried everything I could think of, but I couldn’t get the webhook to work without a distinct project. Any thoughts for how I could have the webhook catch the project and tasks that the automation creates?

Thank you again!

1 Like

Heya Mike!

I totally feel your pain but the solution will require a major rework which can get expensive in terms of operations. The thing is that Asana API always forces us to attach the webhook to a project ID and we cannot really do anything about this.

So… The solution I see is to (unfortunately) forget the webhooks and create a scheduled scenario that will:

a) drill down to all projects, then to all the tasks in the project, then check these tasks against your Data Store


b) will load all task IDs from your Data Store and check what their current status is in Asana via the “Get a Task” module

The latter looks to me like a more efficient approach if you also continuously remove no longer needed tasks from your Data Store (=your Data Store does not grow indefinitely).

No matter if you go for a) or b), this scenario will not be triggered instantly but you will have to run it every X hours. And again, this can get expensive if you have many projects/many tasks in your Asana/Data Store and if you don’t optimize your filters and the whole scenario flow.

Sorry that I’m not bringing better news :no_mouth:

Your news isn’t bad actually!

Solution ‘b’ is really elegant. I added onto it a bit to keep operations down. Since I only need to send each email once, after the email is sent I look up data store entry and delete it. That way the automation keeps itself clean by removing entries that have already been acted upon.

Even though it’s a bummer that it can’t be triggered by a webook, I just put the timing to run every 90 minutes during specific work hours on specific days. That way it’s only checking a few dozen records a week, which won’t crush us with costs.

Thank you for your time while I worked through this. I really appreciate it.

1 Like

Well that is absolutely brilliant news! Great to hear that you figured it out so that it works the best for you :blush:

My pleasure, happy to help!