MS Flow Archives -

Tag Archives: MS Flow

Post an MS Form response to MS Teams Channel using Cloud Flows

In this blog, we will learn how to quickly design a simple Cloud Flow to post a message in MS Teams Channel when a user submits a response using MS Form. Step 1: Create an MS Form to get the responses from the targeted user. Go to https://forms.office.com/ and click on New Form to create an MS Form. Now, We will create MS Form that will take the Name, Age, Gender, Service ratting and comment which is optional as feedback. Step 2: Create a Team and Channel to post the responses Here, I am creating an Admin Team (Type — Private Team) that will be used by Management Team for organization. Now, we will add the “Feedback Responses” channel to post responses in Admin Team. Step 3: Create an Org Level Team that will be used by all team member to submit the responses (Optional — You can share the form via email or posted it on the website) Now, we will add the MS Form tab in the newly created “Feedback Form” channel so that team members can submit responses directly from MS Teams. After the channel is created, click on the + button on the top ribbon button to add a new channel tab. Look for MS Form and click to select the type of channel tab. Select Add existing form and choose your created Feedback form. After clicking on the Save button, a new Form Tab will be added to the feedback from channel of your Org Level Teams Check if Team, Channel and Form tab is visible from other users Log in with another and open the Team. Here, I have another user who has access to the Project Name team and Org Team but doesn’t have access to Admin Team as it Private Team for Management. Below is a screenshot for the same: Step 4: Create a Cloud Flow to post the response to the Private Teams channel Login to the Power Automate portal and create an Automated Cloud Flow Look for MS Form Trigger “When a new response is submitted” and click on Create to create Cloud Flow Select the Form in Cloud Flow trigger Add new step Get Response Data from MS Form Connect and select Response Id from triggering body Now, add a new step from Teams Connector Post a message (v3) to post the response in Teams Channel Configure the Team, Channel and Message (According to your requirement) Testing I have submitted the response from the MS Teams using another user: After submitting the response we get the message in the Admin Teams: Hope this helps!!!

Last and First expression in Cloud Flows – Part I

Let see how we can use last and first expression in Cloud Flows. We can use last and first expression get first and last value in array, strings and also we can use first and last expression to get first and last record from list of records in cloud flows Let get started!!!!! Let say you have string named “A Datum Integration” and we want first character of the string, then use below expression. Syntax – first(<string>) I have initialized a string “A Datum Integration”. Add a compose and use first as below. As a result, will get a first character from the string i.e A Output – 2. Similarly, we can use last expression to get last character from the string. In this case character “n” should be output Syntax – last(<string>) Output – Stay tuned for Part II.

Count Number of files in SharePoint folder

Introduction: This blog explains how to Count No of files in SharePoint folder using MS Flow. Steps to be followed: Select “Send an HTTP request to SharePoint” from Actions.  Enter below details:Site Address: Select the site address from the list. Method: GETUri: _api/web/GetFolderByServerRelativeUrl(‘LibraryTitle/foldername’)/ItemCountExample: _api/web/GetFolderByServerRelativeUrl(‘account/CFS Organization_584732FD1267E911A997000D3AA2C8D1‘)/ItemCount-> It will count the no of files in “CFS Organization_584732FD1267E911A997000D3AA2C8D1” folder. Output of above request:  Accessing value of ItemCount: Add Compose Action. Add below expression in Inputs: body(‘Send_an_HTTP_request_to_SharePoint_’)[‘d’][‘ItemCount’]

Create SharePoint Folder using POST request in MS Flows

Introduction: This blog explains how to create folders in SharePoint when new record is created in D365 CE. Use Case: When new account is created in D365 CE create “Contact Documents” and “Documents” folders in SharePoint. Pre-Requisites: D365 CE SharePoint Online Microsoft Flow Steps to be followed: Sign in to the Microsoft flow. https://flow.microsoft.com/en-us/ Go to My flows -> “+New”-> “+Automated-from blank” 3. Select “When a record is created” trigger and click on create. 4. Select “Organization Name” and “Entity Name”. 5. Click on “+New Step” and select “Compose” Action. 6.   a. Add “Account Name” from Dynamics Content in Input. b.  Add underscore “_” c. Click on Expression enter below formula: toUpper(replace(triggerBody()?[‘accountid’],’-‘,”)) d. Compose should look like below: 7. Now we will create “Main folder in SharePoint” for this account. 8. Click on “+New step” and select “Send an HTTP request to SharePoint” Action. 9. Enter below details: Site Address: Select the site address from the list. Method: POST Uri: _api/Web/GetFolderByServerRelativeUrl(‘account/Output of Compose‘)/Folders Headers: Content-Type application/json;odata=verbose Accept application/json;odata=verbose Body: { ‘__metadata’: { ‘type’: ‘SP.Folder’ }, ‘ServerRelativeUrl’:’account/ Output of Compose‘} 10. Now we will create sub folders inside the main folder. 11. Click on “+New step” and select “Send an HTTP request to SharePoint” Action. 12. Enter below details: Site Address: Select the site address from the list. Method: POST Uri: _api/Web/GetFolderByServerRelativeUrl(‘account/Output of Compose/Contact Documents‘)/Folders Headers: Content-Type application/json;odata=verbose Accept application/json;odata=verbose Body: { ‘__metadata’: { ‘type’: ‘SP.Folder’ }, ‘ServerRelativeUrl’:’account/ Output of Compose/Contact Documents‘} NOTE: “Contact Documents” is the sub folder which we want to create in main folder. 13.  Repeat “step no 12” to create “Documents” folders. Uri: _api/Web/GetFolderByServerRelativeUrl(‘account/Output of Compose/ Documents‘)/Folders Body: { ‘__metadata’: { ‘type’: ‘SP.Folder’ }, ‘ServerRelativeUrl’:’account/ Output of Compose/ Documents‘} NOTE: “Documents” is the sub folder which we want to create in main folder. Complete Flow: Testing Flow Create new account record in D365 CE. Check Documents in SharePoint. 

SEARCH :

FOLLOW CLOUDFRONTS BLOG :

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :