A key step in my 30-Day Challenge (which wasn't planned until I got to this point), was to try and build a prototype version of the application I'd eventually be creating. I realised that I had learnt the theory behind Microsoft365 as a product, but hadn't had any experience or practice using any of the applications.
I began thinking about the functionality of some of the elements I had inserted. This lead me to SharePoint where I began to create some lists following the design specification using the knowledge I gathered from my expert call on Collab365's MicroJobs. You can see how I created my SharePoint site and lists here.
Now my empty lists with the required columns were in place, I needed to learn how to populate them. It was time to get to grips with Power Automate, and create my very first working flow! (using 'working' ambitiously). I think it's important to point out that;- "Learning something new requires time and plenty of trial and error before something will work or become successful".
After numerous failed attempts I was eventually able to create a successful flow which did exactly what I wanted.
My aim was to pull an RSS feed from a URL(s) in my Feed List and then create individual articles from the RSS feed as Items in my articles list. Thus allowing me to use the articles as data for my Power App.
Above is a visual representation of how I planned my flow and how it functions within Power Automate and SharePoint.
Power Automate Flow Process
I started by heading over to Power Automate and clicking "Create" along the left-hand side panel. The next screen provided a few different options for triggering my flow. The design specification specifies that I must run the flow I create every hour, therefore I choose to use the "Scheduled flow" template. "You choose when and how often it runs", perfect for this scenario.
I am then presented with a new window where I can set the basic information for my Scheduled flow.
A mistake a lot of people will make is to be too generic in naming their flow, making it incredible difficult to locate and fathom the purpose of numerous flows when the library in Power Automate begins to grow.
I gave my Flow a sensible descriptive name that explains exactly what it is doing "Check for new Articles and add to Articles list".
I set when I want to start running the flow and how often (intervals between each run) I want to run it.
After clicking "Create" the Power Automate workflow opens and I can begin building the automation.
As I selected a "Scheduled flow" the trigger is already set within the flow, named "Recurrence". If I click on this blue box I can view and adjust the schedule as I did when I created the flow.
Now I have the trigger, I can start working on the next steps in the flow. So thinking out loud and looking back to the visual representation of my planned flow, I know that I need to pull the RSS URL Link from the Feed List before I can begin to dissect the contents of the RSS Feed.
First I need to allow Power Automate to recognise where the RSS URL Link is located. So I click "+ New Step" and use the SharePoint "Get Items" connector.
Note: There is also 'Get Item' as apposed to 'Get Items'. The later allows you to pull multiple entries from your SharePoint list.
I am presented with a new box containing information that allows us to locate and choose the relevant SharePoint List.
For now I only need to focus on the top 2 sections.
- Site Address
- List Name
This is where I specified my specific SharePoint site I am using for my project. When selected, Power Automate will automatically pull the list of SharePoint Lists with in the site. I chose my "Feed List" from the drop-down box.
Now the flow has pulled the SharePoint List, I can use the information inside the list as dynamic content for the next steps in my flow.
I will add "Add steps" and choose, "List all RSS feed items".
Keeping it simple I could insert my RSS feed URL address straight in here, however I'm going to use Dynamic Content from the Feed List I just created. This allows the information being fed to this flow to constantly be kept up to date with the information in the SharePoint list.
Using this method, allows my flow to consistently work, no matter how many times the Feed list is edited or how many new entries are submitted to the list.
Using "Add dynamic content", I chose "RSS Feed URL" from the Get Items section of the dynamic content box.
This list is essentially listing the column titles from the Feed List we allowed this flow to access from SharePoint, which is why that step is important.
If you haven't viewed my post on how I created my SharePoint content, I strongly suggest you take a look, as it plays an important role in my 30-Day Challenge.
Using the same format, I will use dynamic content for the since box, and choose "Last Fetch Time".
With the 2 previous values now set, I clicked "Add an action".
The next action I need to do is to break up the individual articles from the RSS Feed URL retrieved from our Feed List SharePoint List, and place them into my Articles list.
I did another search for 'create item' and chose the "Create Item" for SharePoint.
Just like the "Get Items" action I performed earlier. I will need to select the correct Site Address and List name. For this field I used my Articles List.
Again using Dynamic Content, I can add the relevant fields. At the time of building I didn't have a solution for importing other information such as Image, Author and Categories. This is something I will be looking further into as I continue to build and learn, and may add to a list of questions I could ask an expert on MicroJobs.
But for now, I have the important information. Titles, descriptions and the URL used to visit the article.
Testing My Flow
Power Automate offers the ability to test your flow from within the app by performing a manual trigger. This is a great way to ensure I haven't made any mistakes and my flow runs smoothly and correctly every time.
I did this by first clicking "Save" and then "Test".
I am then presented with 2 options.
"I'll perform the trigger action" is what I will use as it will ignore the sheduled time expected to run my flow.
Click "Run flow"
Fantastic! I can see that my flow ran successfully with no errors.
I then went in to SharePoint to check the results in my Articles SharePoint List. Everything worked, which is a great feeling in itself and I can see all the data in my list which will be great to use further in my 30-Day Challenge Progression.
One for the road...
Working with functions with in any project will always prove a challenge, if you are like me and on a journey to learn new skills in a brand new environment. Don't expect things to work! Keep at it and work around the challenges you face and I promise it is very rewarding when something you have created works!