Skip to content

Commit

Permalink
REMOVE: removed vertical whitespacE
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-greening committed Sep 25, 2024
1 parent e3022c3 commit c89a712
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,54 +18,37 @@ As part of the Microsoft 365 ecosystem, it integrates seamlessly with tools like
Now let's jump in and create our Power Automate workflow in the platform

1. Log in to Power Automate:

- Navigate to [Power Automate](https://www.microsoft.com/en-us/power-platform/products/power-automate) and log in with your Microsoft 365 credentials

2. Create a new flow:

- On the left-hand sidebar, click on *"Create"*.
- You’ll be presented with several options. Select *"Automated cloud flow"* since we’re triggering the workflow when a new email arrives

3. Name your flow and choose a trigger:

- In the dialog box that appears, give your flow a name, such as "Move CSV Attachments to OneDrive"
- Under Choose your flow's trigger, search for the trigger titled *"When a new email arrives (V3)"*
- Click *"Create"* to proceed

4. Set email filter conditions (optional):

- Once the trigger is added, you can narrow down the emails that trigger this flow:
- In the trigger step, you can add filters such as *Inbox*, *From* address, *Subject* line, specific *Folder*, or *Has Attachments* to refine the emails that the workflow will act upon
- For instance, you might specify a *Subject Filter* containing "SA360 export" to only trigger on emails that have "SA360 export" in the subject line

5. Initialize "timestamp" variable:

- Click *"New Step"* and search for *"Initialize variable"*
- Create a variable named "timestamp"
- Set the *"Type"* to *"String"*, and under *"Value"*, use the *"Expression"* option (lightning bolt icon) to generate a dynamic timestamp:
- Use the expression `utcNow()` to capture the current date and time
- This ensures the timestamp is generated once and can be reused consistently throughout the workflow.

6. Add an *"Apply to each"* loop:

- After initializing the variables, click *"New Step"* and search for *"Apply to each"*
- Select *"Apply to each"*, and in the *"Select an output" *field, select *"Attachments"* from the dynamic content pane (this will loop over all attachments in the incoming email)

7. Create a timestamped folder in OneDrive:

- Inside the *"Apply to each"* loop, click *"New Step"* and search for *"Create new folder 2"*.
- Select the OneDrive associated with your target SharePoint Site
- Set the folder name to the `timestamp` variable, ensuring it persists throughout the flow for all attachments
- (optional) Specify a subfolder in *"Folder Path"* to nest it `somewhere/else/{timestamp}`

8. Move email attachments to the new folder:

- After creating the folder, click *"Add an Action"* and search for *"Create file 2"*
- Point it to the folder you just created in OneDrive
- For the file name, select *"Attachment Name"* from the dynamic content, and for the file content, choose *"Attachment Content"*
- This will save each attachment into the newly created timestamped folder

9. Save the flow:

- Once you’ve completed these steps, click "Save"
- Test the flow by sending an email with attachments. The attachments will now be moved into a single folder based on the static timestamp from when the flow was triggered

0 comments on commit c89a712

Please sign in to comment.