Emailing List Attachments in Office 365

Hello all! It’s been at least two years since I have posted something technical on my Salty Blog, pathetic right?. This how-to in my opinion was too good not to share as I believe that it will help others that are facing/have faced this issue.

The ability to email attachments from a list is one of those pain points that I seem to face all of the time. This documentation will take you through the process of setting up a new Flow that will grab all attachments for a single list item and will then email those attachments back out to the intended target.

Before I begin, let me preface this post stating that I did not come up with this. I found a couple of posts and podcasts but I wanted to compile this working version into one blog post.

I was searching for an answer on this issue late last year and attending one of Laura Roger’s weekly Power Hours and she presented on this. Here is a link to that original broadcast: SharePoint Power Hour: Flow Attachments & Files . If you follow the recording to the end, you will notice that Flow was not behaving properly. Well, I could not get it to work either and after a month of trying different things, I gave up.

A couple of months later I, I received an update from Microsoft’s Blog on Flow which is named Flow of the Week. This particular flow caught my eye: Send multiple attachments on a single email. I couldn’t believe it! This was exactly what the doctor ordered or at least I thought it was. I had setup the Flow as explained in the blog post but when I would run the Flow, I would receive the following message: “No input parameters provided. Please provide required input parameters ‘To’, ‘Subject’ and ‘Body'”

You’ve got to be kidding me!!!!!! Why is this not working for me?!?!?!?! I just want to send an email with the list attachments!!!!! I need this to work!!!!!

Ok, calm down……… After a couple of weeks had passed and after I tried all that I could think of to get around this error, I went back to that Microsoft blog post and noticed a comment by Vytenis Jazbutis. He explains how he was able to get around this with a “fix” for the issue of the final “send email” step. It doesn’t like and doesn’t want to add the full “file content” file from the array as an email attachment. What it wants instead is the .$content property within the file contained in the array.

I have decided to recreate the blog post showing the new way of grabbing the attachments with Vytenis’s fix. Once again, all props goes to Laura, Sunay and Vytenis of this.

With that being said, let’s dive into this and build out this Flow!

  1. Add a new “SharePoint – Create item” trigger and select the correct SharePoint Site and List.
    *** Please ensure that you already have SP List created that allows storing multiple attachments on the items in it.
  2. Add a new “Schedule – Delay” step
    *** I added this additional “Delay Step” because I was getting inconsistent results. Sometimes the trigger would fire too early and would send a blank email without grabbing the attachments. By adding this 30 second delay, it will give Flow the ability to run each step in the process before sending the email. You may not need this in your environment but in my experience even with SharePoint Designer workflows, I have to add these more often than not.
  3. Add a new “SharePoint – Get attachments” step

    *** This step will be grab all of the attachments added to the newly created list item. Use the Site name and List name from the previous step. We want to then pipe the output “ID” from the trigger, to the input ‘ID’ field.
  4. Add a new “Variables – Initialize variable” step
    *** This variable will be used to store all of the attachments in a single array.
  5. Add an “Apply to each” step.
    1. Click inside of the *Select an output box and click the “Body” output from the “Get attachments” section
    2. Click the “Add an action” button and select “SharePoint – Get attachment content”
    3. For the ID field, select the “ID” output from the “When an item is created” trigger section
    4. For the File Identifier field, select the “Id” output from the “Get attachments” section
    5. Click the “Add an action” and select “Variables – Append to array variable”
      1. For the Name field, select “attachmentArray” from the dropdown. (this was created in step 4)
      2. For the Value field, type in the following JSON statement:
        1. For “ContentBytes”, click between the : and , and then click on the “Expression” output
        2. Type in the following expression: body(‘Get_attachment_content’).$content and click the ‘OK’ button
          *** “Get_attachment_content” is the name of the step created in 5b. Don’t forget the underscores for spaces.
      3. For “Name”, click between the ” and : and select the “DisplayName” output from the “Get attachments” section
        *** See “Note” below on additional details about the “ContentBytes” parameter
        The completed step should look like the one seen here
  6. Add a new “Office 365 Outlook – Send an email” step
    *** Note: Use whatever mail client that you have setup to run this step.

    1. Fill in all of the required fields (if applicable to your mail client).
      *** I have a list value that I am using to populate my “To” field.
    2. Click the “T” icon next to the Attachments Name field. This switch will change the attachments control from “Detail inputs for array item” to “Input the entire array”
    3. For the Attachments field, select “attachmentArray” from the “Variables” section.

  7. The completed Flow should look like the following:

Save your Flow, then go to your list and create a new list item with attachment(s) to test. Remember to be patient if you put in the delay step. You should receive an email with the attachment(s) that you added to the list item.

This solves a lot of issues that I was having and I hope that it will help you in some way.

Stay Salty!

PowerShell – How to retrieve all deployed solutions

One of the quickest ways to find out information about your installed solutions is to use PowerShell.  To do this, login to one of your WFE’s and open SharePoint Management Shell.  Then, type in the following command: Get-SPSolution | Export-Csv C:\DeployedSolutions.csv.  Open this file on your local machine (or whichever has Excel installed) and dissect as needed.

This will return a fairly good amount of detail regarding your current solutions including but not limited to:

  • Solution Name
  • When/where deployed
  • Version
  • Status


SharePoint – Retrive the internal column name for lists/libraries using PowerShell

I have been using this method for some time now and decided to make a slight change to it.  I have been using the PowerShell method found here to find the internal column names for my lists and libraries.  It works great.  The only problem with this is that I have to modify the script each time I need to change the value of the list or site.  This is usually not a big deal since I generally am only looking at one list.  This was not the case the other day.  I needed to look at many different lists in the same site.  Instead of having to modify the script each time, I added a set of parameters to prompt me at the command line.  The code looks like this:

  1. Download Get Column Names Script
  2. Save the script to a directory on your SharePoint server
  3. Open the SharePoint Management Shell for PowerShell
  4. Navigate to the directory where you downloaded the script
    example:  d:\scripts
  5. Run the script: getColumnName.ps1
  6. Enter in the variables
    ***To include hidden fields, change {$_Hidden -eq $false} to {$_Hidden -eq $true}***

Your screen should resemble the following before the command runs


Mike Smith has a lot of great tips on his site.  I suggest that you check it out:

Stay Salty!

Cannot publish InfoPath custom list form

Today, I ran across an issue when I went to customize a list with InfoPath.  I clicked on the ‘Customize Form’ button and it opened the item view in InfoPath as expected.  After I made my changes I went to publish my form.  I received the following error message:

“InfoPath cannot connect to the server.  The server may be offline, your computer might not be connected to the network, or InfoPath Forms Services 2010 might not be enabled on the server.  To fix this problem, start by checking your network connection, and then try again.”


After going through my normal rounds of troubleshooting (permissions, InfoPath, SharePoint logs, Event Viewer), I came across another blog that had the solution (at least, it worked for my issue)

Here is the link to the blog:

Basically, all that needs to happen is that you need to reset InfoPath Form Services for that particular site collection.  To do that, just run the following PowerShell scripts from your SharePoint server:

Make sure to update the urls for the above commands


Enjoy and remember to Stay Salty!

SharePoint 2010 – Hiding the Search Bar

Have you ever needed to hide the search bar on your site?  Me neither until the other day.  The page needed to be plain Jane and this was one of the requests.  Turns out, this is very simple to do.  All that you need to do is add a Content Editor Web Part (CEWP) to your page and add the following lines of code to it:

This code will hide both the search bar and the search icon.  It’s that simple!  Try it for yourself.

Stay Salty!

InfoPath – Shorten url for browser based forms

In the world of InfoPath, you may have noticed the the url for an open form is crazy big!  I ran into a problem in the past when I ran out of space in the url.  Sometimes this happens if the form is nested a couple of levels down in a site.  Whenever you open a new form in the browser, your url will look like the following:

You can shorten the above by removing all of the items in bold.  It will look like this once you have finished:

As a best practice, I do this each time I have to setup a link to an InfoPath form.   This way, I keep my urls short and will not have any issues of running out of url space.


Stay Salty!


InfoPath 2007 – Populating from data/dropdown info from SharePoint lists using XML form data

This article applies to InfoPath 2007 only as 2010 and 2013 no longer have this limitation.

At some point during your career, you will need to connect to a SharePoint list to retrieve information for a drop down list.  This process has changed since 2007 but I thought that I would go ahead and share this.  InfoPath 2007 only reads the data in the list on how it was entered in to SharePoint.  For example, if you uploaded a list of addresses in no particular order, this is the way that InfoPath reads it.  Now, what if you would like to see your selection sorted alphabetically?  You will first need to either modify your existing view of  the list you will be using as a data source or create a new view.

***Note: In order to see the entire list, the view must be changed to show more than the default 100 records

InfoPath will not recognize this view and you cannot sort lists when forms are browser based. As stated earlier, it only sees the original layout. In order for InfoPath to populate the drop down list with the correct format you will need to do the following:

  1. Double click the drop down list that you want to add the data connection to. This box will pop up. Follow the steps in the remaining screenshots to step 4. Then follow further directions.
  2. 1  
  3. 2  
  4. Go to the site that contains your list that you want to pull your data from.
    Example: and open the list
    Click “Settings” on the taskbar of the list then click “List Settings”
    Click on the view that you would like to use located at the bottom of the page
    When the page opens, highlight the entire address bar and press Ctrl+C
    Open a text editor (Notepad) and press Ctrl+V. Your address will look something like this:


  5. You will need to modify this address to provide the form with the correct XML values. To do so, either type or copy/paste from this address the following.
    Make sure to replace with your own variables:
  6. The %, letter, number string represents the {GUID} for the page. The &XMLDATA=TRUE converts the page into an XML format that the InfoPath form can read. The &View and string represents the {GUID} for the “AllItems View”
  7. Once you have modified the url, copy and paste it into the next setup page. Close the text editor and do not save when it asks. Follow the steps in the remaining screenshots.
  8. 4  
  9. 5  
  10. 6  
  11. 7  
  12. 8  
  13. 9  
  14. Save the InfoPath form and publish it to the SharePoint site.  Next, login to SharePoint and go to the form that contains this data connection. Verify that the information is displayed in the correct order.

This little trick will save you all kinds of headaches if you rely on information supplied by your SharePoint lists.

SharePoint – Dropdown Menu/Navigation Does Not Work

Have you ever logged on to your SharePoint site and the drop down navigation does not work?  After days of clicking around, I decided to fix the issue, which really was not much of fix.

Turns out, this is an issue with my MS Office installation.  All that you have to do is run a repair of your Office  install under the add/remove programs area.  Once the repair is complete, log back on to your SharePoint site and the menu should now appear.

Synchronize SharePoint list using Access 2007

If you need to make changes outside of SharePoint to a list, you always have the option to use Access.  Follow these steps and you will be well on your way to using this feature.

1. Open your SharePoint list

2. Click Actions  –> Open with Access

Actions dropdown

3. A dialog box will pop up on your screen. When it does, click OK.

Access Prompt

4. After you click OK, Access 2007 will pop up on your screen. Double click on the list.

SharePoint List

5. When the list pops up you can begin to edit. Once finished, do not click the Publish to SharePoint Site button. Simply close Access 2007.

Access View
Please remember that Access 2007 is online with SharePoint and any changes you make will reflect instantly. There will be no going back.

A No-No for having Multiple SPD Workflows for Lists/Libraries

Word of warning:

If you need to have more than one workflow for a particular list/library, DO NOT copy a SPD workflow and paste back into the same library.

What happens is that even if you change all of the properties of the files (names, etc.), there is still a hidden property that SharePoint likes to hold on to and uses to identify the workflow.  Think of it as an ID.

Basically, you will have two different workflows with the same ID.  When you publish one of these to a list/library, everything works fine.  When you go to publish the second one, everything seems fine but after close evaluation, you will notice that the first workflow that you published is no longer attached to the list/library.

Moral of the story, don’t be lazy.  Create a new workflow even if all of the information is the same.