node.jsbotframeworkmicrosoft-teamsmicrosoft-planner

Any API available for adding task to Planner app in Microsoft Teams


I'm building a chatbot with nodejs with botframework v4 and i was wondering whether their is any api etc available that would let me add a task to the Planner app in Teams.

Details-I'm building an app which would take a feedback after a certain intent. Once the feedback is filled by the user. I want the feedback/message to be automatically added to the Planner app in my Teamschannel. Is there any existing API that would let me connect from my bot to the planner in Teams?

If not,Earlier i was able to take this feedback and send it into Teamschannel as a proactive message (with sendActivity by storing the channels conversationId, tenantId). Could I create an app where this proactive message would be taken up automatically when it comes to the channel and added to task's of the Planner?


Solution

  • The best way to achieve this is to use the Microsoft Graph API from within your Teams app. In particular, see here how to create a Planner task.

    You might need to deal with authentication in your bot though, to get access to the Graph API, if you want to act on behalf on a user (delegated access). See here for info on that.