I'm trying to use MS automate to make a flow for sending top five files within their attachment link to myself via email. The file saved in a MS Sharepoint list. Every week I will manually create list's item and upload files.
The steps I have been done so far for the flow:
- Initialize an variable named link1(float type)for store attachment link
- Initialize an variable named int, set to 5 and integer type
- Execute until.condition:when int less or equal, create item (title: int), a decrease variable for make "int" 's value decrease 1 for every execution.
Up till now, I am facing my first question. Above steps I aim to create five new list's items in my Sharepoint automatically, then I could upload my files manually. The problem is after ran the flow, it only create one file in my Sharepoint named int(which is 5). How could I change my steps to achieve my goal?
Then I set a Sharepoint get item, set my site and my list, and ID I used int. In this step I want to make the item correspond to the one the flow created.
- Sharepoint get attachment, the ID also int
- Apply to each, use the value from last step, use AbsoluteUri assign value to the link1
- Final step: outlook send email(V2).
The problem is I am using below code to write the email, I want to get the different information(ex:title, context, information, id, attachment link) for this five files and included them in the email. For my flow now, it only shows the information for one single file, could not include other four, how to solve this problem?
<a href="sharepointxxxxxxx">
<img src="//I set a border pic" border="0" width="423" height="180">
</a><BR>
<table style="border-collapse: collapse; border-color: #9abad9; border-spacing: 0px; width: 423px;" class="tg">
<thead>
<tr>
<th style="background-color: #409cff; color: #ffffff; font-family: Arial, sans-serif; font-size: 14px; font-weight: normal; overflow: hidden; padding: 10px 5px; text-align: center; vertical-align: middle; word-break: normal; border: 1px solid #9abad9; width: 423px;"><strong><span style="color: #ffffff; background-color: #409cff;">//variableinsharepoint://variableinsharepoint</span></strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="background-color: #ebf5ff; color: #444444; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: left; vertical-align: middle; word-break: normal; border: 1px solid #9abad9; width: 306.333px;"><span style="color: #444; background-color: #ebf5ff;">//variable from get item</span></td>
</tr>
</tbody>
</table>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<style>
#customers {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 1px solid #9abad9;
padding: 8px;
}
#customers tr:nth-child(even){background-color: #ebf5ff;}
#customers tr:hover {background-color: #ddd;}
#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #409cff;
color: white;
}
</style>
</head>
<body>
<table id="customers">
<tbody><tr>
<th>TYPE</th>
<th>NAME</th>
<th>DESCRIPTION</th>
</tr>
<tr>
<td>@{outputs('get item')?['body/OData__x5de5__x5177_/Value']}</td>
<td><span style=\“font-size:11px\”><a href="attachment link')}">@{outputs('get item')?['body/OData__x540d__x79f0_']}</a></span></td>
<td>@{outputs('get item')?['body/OData__x63cf__x8ff0_']}</td>
</tr>
<tr>
<td>@{outputs('get item')?['body/OData__x5de5__x5177_/Value']}</td>
<td><span style=\“font-size:11px\”><a href="@{variables('attachment link')}">@{outputs('get item')?['body/OData__x540d__x79f0_']}</a></span></td>
<td>@{outputs('get item')?['body/OData__x63cf__x8ff0_']}</td>
</tr>
<tr>
<td>@{outputs('get item')?['body/OData__x5de5__x5177_/Value']}</td>
<td><span style=\“font-size:11px\”><a href="@{variables('attachment link')}">@{outputs('get item')?['body/OData__x540d__x79f0_']}</a></span></td>
<td>@{outputs('get item)?['body/OData__x63cf__x8ff0_']}</td>
</tr>
<tr>
<td>@{outputs('get item')?['body/OData__x5de5__x5177_/Value']}</td>
<td><span style=\“font-size:11px\”><a href="@{variables('attachment link')}">@{outputs('get item')?['body/OData__x540d__x79f0_']}</a></span></td>
<td>@{outputs('get item)?['body/OData__x63cf__x8ff0_']}</td>
</tr>
<tr>
<td>@{outputs('get item')?['body/OData__x5de5__x5177_/Value']}</td>
<td><span style=\“font-size:11px\”><a href="@{variables('attachment link')}">@{outputs('get item')?['body/OData__x540d__x79f0_']}</a></span></td>
<td>@{outputs('get item)?['body/OData__x63cf__x8ff0_']}</td>
</tr>
</tbody></table>
<iframe id="xpathCopyIframe" style="height: 0px; width: 0px;" src="./w3school.com.cn_demo_html_table_files/saved_resource.html"></iframe></body></html>