Tech blogger and Problem solver, I share my experiences, insights, and solutions to technical challenges through my articles. With a strong background in Microsoft technologies like Power Platform, SharePoint, Azure, and RPA, I write about process automation, migration planning, troubleshooting, and best practices. My goal is to simplify complex concepts, provide practical solutions, and help others navigate technical roadblocks efficiently. Through my blogs, I aim to contribute to the tech comm
Depending on the format of your PDF (text-based vs. scanned
images), there are various methods for extracting text or data from PDFs. Here
are a few typical techniques:
1. Making use of PDF Processing Libraries in Python
Text can be extracted using PyPDF2, although it has trouble with intricate
layouts.
More sophisticated and adept at handling structured data is pdfplumber.
PyMuPDF (fitz) is a quick and effective text extraction tool.
Tesseract OCR (Optical Character Recognition) for scanned PDFs.
Example: Using Python's PyPDF2 to extract text
PyPDF2 import in CopyEdit
using open ("document.pdf", "rb") as pdf_file:
print(page.extract_text()) for page in reader. Pages: reader =
PyPDF2.PdfReader(pdf_file)
2. Making Use of Power Automate (No-Code Method)
For structured PDFs, use AI Builder (Extract Data from Forms).
Integrate with Power Automate processes to handle and save data in Dataverse,
SharePoint, or Excel.
3. Applying Layout Parsing, an Open-Source AI
For intricate designs such as forms, tables, and invoices:
Structured text can be extracted with PDFMiner.
LayoutLM (ML model): Uses AI to extract important data elements.
Two companies have recently drawn a lot of interest in the quickly changing field of artificial intelligence (AI): OpenAI, a well-known American AI research centre, and DeepSeek, a Chinese AI startup.
Although both have created sophisticated large language models (LLMs), their methods, prices, and ideologies are different.
Establishment and Purpose Liang Wenfeng, a co-founder of the hedge firm High-Flyer, started DeepSeek in 2023. High-Flyer first concentrated on AI and algorithm-based trading before expanding toward more general AI research, which resulted in the development of DeepSeek. To make cutting-edge AI more widely available, the company strongly emphasises open-source development.
Elon Musk, Sam Altman, and other individuals formed OpenAI in 2015 as a non-profit organization to ensure that artificial general intelligence (AGI) serves the interests of all people. To secure funding, OpenAI gradually switched to a capped-profit business model, collaborating with firms such as Microsoft to further its research. Model Creation and Expenses Efficiency and cost-effectiveness were key considerations in the development of DeepSeek's flagship model, DeepSeek-R1. Using cutting-edge training techniques and refined algorithms, the company claimed that less than $6 million in computational resources were needed to train DeepSeek-R1, achieving great performance without incurring significant costs.
OpenAI's models, such GPT-4, on the other hand, have been linked to noticeably greater development expenses. Although the numbers are confidential, estimates indicate that the cost of training GPT-4 was in the hundreds of millions of dollars, which is indicative of the large amount of data and computer power needed. Capabilities and Performance DeepSeek-R1 has proven to perform well in certain areas, especially coding and mathematical reasoning problems. According to benchmark testing, DeepSeek-R1 performs somewhat better than OpenAI's models in answering mathematical problems; on the American Invitational Mathematics Examination (AIME) 2024 benchmark, it achieved an accuracy of 79.8% as opposed to OpenAI's 79.2%.
Models from OpenAI, like GPT-4, are well known for their adaptability and general-purpose skills. They perform exceptionally well in a variety of tasks, including as creative writing, translation, and natural language comprehension.
For example, OpenAI's models outperformed DeepSeek-R1 in the Massive Multitask Language Understanding (MMLU) benchmark, demonstrating a wider knowledge base and competence in a variety of disciplines.
I am working on automating the process of sending leave resumption notices to staff to confirm their return. Currently, I am using the "Get Items" action to retrieve a list of items from a SharePoint list. However, I am encountering an issue with the approval workflow within the "Apply to each" action.
Challenge:
For each of the 53 items retrieved from the SharePoint list, I need to trigger 53 independent approval requests, each sent to the corresponding recipient’s email address (one per item). The current setup processes these requests sequentially, causing the flow to wait for each approval email to complete before proceeding to the next item. This results in delays.
Objective:
I need the approval requests to be sent concurrently rather than sequentially to ensure all 53 recipients receive their emails independently and without delay.
I’d appreciate any guidance or best practices to achieve this. ---------------------------------------------------------------------
To achieve concurrent approval requests in Power Automate for
each item retrieved from a SharePoint list, you can use a parallel branching
approach. Below is a general outline of how you can set this up in Power
Automate:
Solution Outline
1.Trigger: Use a trigger to
start the flow, such as "When an item is created" or "When an
item is modified" in the SharePoint list.
2.Get Items: Use the "Get
items" action to retrieve all the items from the SharePoint list.
3.Apply to Each: Use the "Apply
to each" action to iterate over the retrieved items.
Inside
the "Apply to each" action, use the "Start and wait for an
approval" action.
4.Concurrency Control: Adjust the
concurrency control settings of the "Apply to each" action to allow
parallel processing.
Choose
a trigger, such as "When an item is created" or "When an
item is modified" for your SharePoint list.
Step 2: Get
Items from SharePoint
Add
a new action and search for "SharePoint".
Select
the "Get items" action.
Configure
the "Get items" action to point to your SharePoint list.
Step 3:
Apply to Each
Add
an "Apply to each" action.
Set
the "Output" field to the value from the "Get items"
action (usually value).
Step 4:
Start Approval Process
Inside
the "Apply to each" action, add a "Start and wait for an
approval" action.
Configure
the "Start and wait for an approval" action:
Set
the "Approval type" to "Approve/Reject - First to
respond".
Set
the "Title" and "Assigned to" fields accordingly
(e.g., use dynamic content to assign to the appropriate email address).
Step 5:
Enable Concurrency Control
Click
on the "Apply to each" action to open its settings.
In
the settings pane, turn on "Concurrency Control".
Set
the "Degree of Parallelism" to a suitable number (e.g., 20).
This number controls how many approval requests can be processed
concurrently.
Step 6: Save
and Test the Flow
Save
the flow.
Test
the flow by creating or modifying items in the SharePoint list.
Example Flow Configuration
Here
is an example of how the flow might look:
Trigger: When an item is created in SharePoint.
Get Items: Retrieve items from the SharePoint list.
Apply to Each:
Start and Wait for an Approval:
Title: "Leave Resumption
Approval"
Assigned to: item.email (Use
dynamic content to assign to the recipient's email).
PowerShell Solution
If
you prefer to use PowerShell, you can use the PnP PowerShell module to retrieve
the items and send approval emails. Below is an outline of the PowerShell
script:
Using
Power Automate with parallel branching or PowerShell with a loop, you can send
concurrent approval requests to each recipient. The key in Power Automate is to
enable concurrency control in the "Apply to each" action. This
ensures that all recipients receive their approval requests independently and
without delay.
To
retrieve a list of users who have both PowerApps Premium and Power Automate
Premium licenses, you can use a PowerShell script. Below is a step-by-step
guide to accomplish this. The script will use the Microsoft Graph API to query
the necessary license details.
Prerequisites
Microsoft
Graph PowerShell Module: Ensure you have the Microsoft.Graph PowerShell module
installed.
Admin
Permissions: Ensure you have the required permissions to query user
licenses.
Azure
AD App Registration: Register an app in Azure AD and grant the necessary
API permissions to read user licenses.
Steps
Install
Microsoft Graph PowerShell Module:
PowerShell
Install-Module
Microsoft.Graph -Scope CurrentUser
Connect
to Microsoft Graph:
PowerShell
Connect-MgGraph
-Scopes "User.Read.All"
PowerShell
Script:
PowerShell
#
Define the SKU IDs for PowerApps Premium and Power Automate Premium
$PowerAppsPremiumSkuId
= "c68f8d98-5534-43a8-9110-0d174bc7c6e3" # Replace with actual SKU ID
for PowerApps Premium
$PowerAutomatePremiumSkuId
= "9c0dab89-a30c-4bfd-8a92-6dff3f1d8d04" # Replace with actual SKU ID
for Power Automate Premium
SKU
IDs: Replace the placeholders for PowerAppsPremiumSkuId and PowerAutomatePremiumSkuId with the actual SKU
IDs for those licenses. You can retrieve the SKU IDs by listing all
available licenses using the Graph API.
Get-MgUser:
Retrieves all users in the organization.
Get-MgUserLicenseDetails:
Retrieves the license details for each user.
Filtering:
The script checks if each user has both the PowerApps Premium and Power
Automate Premium licenses. If so, the user is added to the list.
Running the Script
Open
PowerShell with administrative privileges.
Run
the script above.
The
script will output the list of users who have both PowerApps Premium and
Power Automate Premium licenses.