I was able to create a project in asana through API. After I create a project I would like to invite(Share to) a user(external user who is not in asana org) through API. Could you please let me know how to do this through API ? I would like to invoke functionality i.e. invite with email in below image through API
Itâs not explained in the API documentation (cc: @Ross_Grambo hint hint ) but the endpoint you want is AddUser
:
When you call it with an email address instead of a User ID, it will do the following:
- If the email address corresponds to a person who has an Asana account but is not part of your organization/workspace, it will add them as a guest user.
- If the email address does not belong to any Asana user account, it will send them an email invite as you are asking about.
This doesnât seem to be the case. Iâm getting the error âNot a user in Organizationâ unless the email address is already associated with an Asana account.
Iâm trying to run a Make.com automation triggered by a Stripe transaction and really need the ability to invite a guest to a project from an API, with the possibility that the email address used is not already associated with an Asana account.
Any workarounds, or can the API be updated to work the way Phil described?
Hmmm, I know I tested it and it worked when I mentioned it here.
Any chance your behavior is due to your Guest Invite settings? I.e.
I just checked and itâs currently set to âAdmins, members, and guestsâ with no option to even change the setting (because Iâm not on an enterprise plan).
My API call works when I test on a personal email that Iâve used Asana with, but it doesnât work when I try a new email of mine that has not ever been used with an Asana account.
It seems like the addMembers API is for strictly adding a member and I canât seem to find any way to invite a new member to a project. This is pretty crucial for my workflow to be able to get clients up and running right away so if this canât be resolved I probably wonât be able to use Asana. Which is a shame because I love Asana and everything else has been perfect for setting up my workflow.
Ah @Jason_Parry, sorry I missed this before - weâre talking about two separate API calls and functions.
Iâm talking about adding a user to a workspace or organization; youâre talking about adding them to a project.
Before you add a user to a project, they have to have a valid user record in that projectâs organization or workspace. You canât directly create a brand new user record as part of adding them to a project as youâre trying to do. Youâll need to first invite them to the workspace/org using the endpoint I was referring to. Once they accept that invitation, theyâll have a user record and can be added to a project.
Yeah unfortunately that seems like the only way with the API, but that just wonât work with my workflow. Iâm trying to create an automation that will create a new project and then add the clientâs email to the project so they can start adding tasks right away. The API doesnât offer a way (that I could tell) to listen for a user to join the organization and then add them to the appropriate project.
Really weird that Asana wouldnât make the addMembers API function the same way as manually adding a user works.
Guess Iâll stick with Trello for now.