Workflow Approval in MS Teams - Dynamics 365 Finance & Operations

Workflow Approval in MS Teams - Dynamics 365 Finance & Operations

In this blog post, I'll explain how to set up the workflow approval process for Dynamics D365 FO directly from MS Teams. Specifically, we'll focus on utilizing the general journal workflow for approvals within Teams.

Workflow for General journal already configured in Dynamics 365 Finance and Operation which will use in business event in step 2.

Workflow of general journal in D365FO which will use in business event


Step 1: Create the new Flow

Go to the https://make.powerautomate.com/ and create new flow and select the Triger "When a Business Event occurs", New Flow will create.

New flow creation

Step 2: Fill the values in the Business event

Fill the values in the event :

Instance: Select the URL of environment

Category: Workflow workitem

Business event: search the work flow which will use in team approval(which created in FO)

Legal entity: legal entity.

Fill the values in business event connector

Step 3: Add Parse JSON connector

Add the new step in flow of "Parse JSON" connector.

Select the parse connector

  • In contents select the body of previous step (When a Business Event occurs) from dynamic content

  • To get the Schema section, navigate to D365 FO and go to the Business Events Catalog form (located at System administration > Setup > Business events > Business events catalog). Search for your workflow and download its schema

Search workflow in business event catalog form.

  • Open the downloaded file in notepad, copy all text and and past in schema section and press save button

Downloaded schema file
Fill the schema value in pars section
Click save button of flow.

Navigate to D365 FO again and go to the Business Events Catalog form (located at System administration > Setup > Business events > Business events catalog). In the endpoints section, there will be new end point created

New end point created for flow

Step 4: Add Execute action

Add new step in flow of execute action of Fin & ops app

Add execute action

  • Fill the values in the event Instance: Select the URL of environmentAction: WorkflowWorkItems-validateWorkflowWorkItemInstanceId: select expression and enter "body('Parse_JSON')?['WorkflowWorkItemInstanceId']"

Fill the values in execute action

Step 5: Add condition

Add new step in flow and select "condition" connector:

Condition for result of execute action

select the value of execution action

Select the Value of output parameter values



Set True value

Step 6: Add action If yes, "Start and wait for an approval"

Add new step in flow and select "Start and wait for an approval" connector

Select the

Approval type: Approve/Reject - First to respond

Title: Add expression "body('Parse_JSON')?['WorkflowDocument']"

Assigned to: Add expression body('Parse_JSON')?['WorkflowUserEmail']

Add the detail in connector


Step 7: Add Apply to each

Add new step in flow and select "Apply to each" connector

select the apply to each connector


Select the response of "Start and wait for an approval" connector


Step 8 : Add Execute action

Add new step in flow and select "Execute action" connector

Select the execute action connector
Fill the value in execute action connector

Instance: Select the URL of environment

Action: WorkflowWorkItems-complete

WorkflowWorkItemInstanceId: select expression and enter "body('Parse_JSON')?['WorkflowWorkItemInstanceId']

Outcome: Outcome response of Start and wait for an approval connector

RunAsUser: select expression and enter body('Parse_JSON')?['WorkitemOwner']

Step 9: Final step

Once all the steps are completed, simply click on the save button, create the new general journal and submit it to the workflow. The following screen will then appear on Teams, Click on approve button, workflow will approve!

Click on approve button

Thank you for taking the time to read the article.

要查看或添加评论,请登录

Muhammad Usama Yameen的更多文章

社区洞察

其他会员也浏览了