Creating Asana Tasks from Salesforce using Process Builders

I’m attempting to use Salesforce Process Builders to automatically create an Asana Task when a contract status changes to Active in Salesforce. Are there any best practices you could recommend?

Hi @alex43, welcome to the Asana Community Forum!

I recommend you checking some use cases and tips in this article of our Asana Guide.

I hope this helps! :slight_smile: let me know if you have any other questions.

Hi Emily, I’m hoping you can help me. I’ve been through the referenced manual, but there is so much information missing! I have the integration installed but want to create a Task for new Opportunities in an existing Asana Project. But in the instructions on page 19, in 7:c of the guide it says: "In Aplex Class, enter “Create a Custom Asana Task”, but that is not an option. Is there an update to these instructions?! Thank you in advance :slightly_smiling_face:

1 Like

Did you find a solution for this? Im still looking

@anon50735876 No! I couldn’t find anything else so I handed it over to my integrator as part of the implementation. I finally got a response back yesterday (after 7 weeks) that he couldn’t figure it out and thinks we should both get on a call with Asana support. So…I am now looking for the answer myself again. If I find anything I will post it!

1 Like

Hi @Emily_Roman, I didn’t tag you in my previous post. Can you help? The article does not help in this situation. Thank you!

1 Like

Hi Jeff, thanks for getting back to me. I was able to set up a Process to create Asana tasks. My use case was to create an Asana task for my sales people whenever their opportunity was closed won.

For my use case i did this:
Step 1: Criteria = Alex is Owner of opportunity…
Step 2: Add action = Action type is Apex → Apex Class is Create Asana Task
(as i typed “asana” in the apex class, the apex class took a little while to show up… wait a few seconds and it will be there)
Step 3: Set Apex Variables (Project Name, sObject Id, Name of task, Assignee)

Here are the step by step with screenshots for a fake process i just created to demonstrate this, hopefully it can be helpful for your team:

this screenshot below shows step 2 where you have to select the Apex action type and step 3 where you set the variables.

  • The variable project will be a string and it should match the Asana project’s name where the task should be under
  • The variable sObject.Id should be a Field Reference to match the salesforce record that the task is related to. In the screenshot example below I used the Account.Id… but in my real use case I used the Opportunity.id
  • The variable Name should be string and it will be the name of your task that will be created
  • The variable Assignee is optional. I used string so it could match the name of the Assignee in Asana that the record should be assigned to

Let me know if it works for you guys.

3 Likes

@anon50735876 Thank you so much for your quick response! So I am hung up somewhere. I tried using the Asana User ID in Assignee, didn’t come in to Asana, I tried the Asana User’s name, didn’t come in, then I just removed Assignee altogether and it still doesn’t come into Asana. I cut-and-pasted the Project Name. Do you see anything?!

Hi Jeff, sorry for the delay. I found an error in my process too. The project’s string is a string of numbers in the Asana Project’s URL. See below where to find it

The Assignee string is the Assignee’s name as displayed in asana. My assignee name is “Juliana de Medeiros”, so I just added this string to the assignee string field in the process and it worked. In the example above you can see my tests called “stage is withdrawn…” and the assignee was tagged to the task.

Let me know if it works now!

See the process screenshot below

1 Like

Yes!!! That was it! Thank you SO MUCH!!!

Now, any idea how to get it to use a template and map/populate the fields ?!

Hi @anon50735876 & @anon23778027 I am going through the same thing right now with my org. Followed your lead so far and got a very simple integration. Have either of you been able to add more information or detail to the created Asana task? Right now it is only copying over the title (and also oddly duplicates it).

hey sorry for the delay. i have no idea, i haven’t tried it yet

Hey Sam, this duplication sounds very strange. Can you share a screenshot of your Process Builder for the asana task? About adding task details, i havent tried adding anything past task name, project, assignee, and record reference. I am not sure how i would go about adding more details to the task.

Hey, I came across this forum. I’m trying to set up initiating a template, but it’s not working. Below is what I have, anything you think I’m doing wrong?

Immediate Actions - Apex Class - Clone a Project
Desired Start Date → Field Reference → Opportunity Close Date
Project Name → String → Client Onboarding
Project ID → ID → The ID # on the template within Asana

It won’t let me add or remove any fields, not sure what I’m messing up on. Thanks in advance!

Hi Emily, are there any other documents on Process Builder & Asana? The Asana for Salesforce article isn’t as helpful because Salesforce has evolved since and it doesn’t cover each scenario option with Process Builder. TIA!

Thanks for your walkthrough, @anon50735876! Very helpful to see.

@Emily_Roman I have similar questions to Sam. Is there a way to add additional data to the Asana task from the Flow / Process Builder where it was created? Thanks.

Have you solved the problem yet? If you haven’t, I can give you some support.

There is no other way to add information to an Asana task that has already been created except by manually entering a comment.

Hi @anon23778027 and @anon50735876 - I use a similar Process to create Asana Tasks but am trying to work out why the Asana task that gets created is always created by my user profile (regardless of which Salesforce user triggers the Process). Do you see this behaviour in your setups and/or have any idea how to tweak this so that the Asana task is created by the user that triggers the Process?

Thanks, Jasper