Power Automate | How to scrape and extract an email from a webpage - power-automate-desktop

I am trying to scrape several email addresses from a directory. What I did first was scrape and save all the links of each individual business directory page. So each link looks as follows:
https://www.directory.com/business-name/industry/
With the busines name being the name of the business and industry being the industry of that specific business.
No I created an automation on power automate which behaves as follows:
The issue I am facing is with the "Extract data from web page" step. For some reason when I am manually selecting the email address from the web, so the system knows which element it needs to extract, it is selecting the email address specific to that page, so in the selection it looks as follows:
Now what I want to do is to extract either the Href or the Text of that attribute.
However when I make my selection and go run the automation the system is getting stuck and producing the following output since when it tries to find the Text or Href element on the site it is specifically searching for "test123#gmail.com" and not copying the text/Href of that element. It is constantly getting stuck on that step and prompting the following error:
Failed to extract data (web page error while extracting data).

Related

Permissions issues with publishing Google Sheets worksheets on Google Sites

I have a Google spreadsheet comprising of several worksheets and I am trying to publish the worksheets individually on separate webpages, preferably using embed. This is to provide access to users within a Google Workspace domain. The first published worksheet works fine and is duly visible to users allowed to view the Google Sites webpage. Subsequent worksheets are also published successfully but the previously published worksheets are no longer accessible. I get the following message:
"*You need permission to access this published document.
You are signed in as #.org.uk, but you don't have permission to access this published document. You may need to sign in as a different user. "
The above email address is an editor of the spreadsheet as well as being able to edit/view the Google Sites. I have tried everything by only using Incognito windows only, logging out of all accounts, checked settings, etc: I am always unable to publish more than one worksheet from the same spreadsheet at a time.
What am I doing wrong???
PS-1:
Following iansedan suggestion I have anonymised and simplified the spreadsheet. There are 2 tabs I want to publish to web: Group T and Group S.
I publish Group T to the web: works as expected in the browser (Chrome).
I publish Group S to the web and view it in another tab in the browser (Chrome)
It duly shows the published version of Group S but when I click on the other tab (to view the Group T which was OK before) I get the following message:
"You need permission to access this published document.
You are signed in as [my workspace email address], but you don't have permission to access this published document. You may need to sign in as a different user."
This is the link to the spreadsheet. I'm afraid I don't know how to share this better, the only way I could find is if you try to access the spreadsheet I will get a notification and will add your email address so you can view/edit it.
PS-2 Additional info
The respective links for the published are as follows:
Group T This one comes up with the "You need permission to access this published document." message
Group S This one shows the published worksheet correctly (as it was the last published!).
It looks like a caching mechanism somewhere is causing the issue but I have no idea where and how to prevent it! I've cleared the cache in the browser...
To publish individual sheets of a spreadsheet, use the Published Content and Settings button instead of the Publish button.
Uncheck the All Document checkbox and select the Group T and Group S sheets. After that click Escape and Start Publishing.
I had the same problem.
What youre doing is pausing one publication to start another one. Then, the first one is canceled.
Basically, there are two fields on the web publishing tab: one above another.
On the upper one, you chosse wich part of your sheet you will publish. That is, here if Jonh need to see "X", you select "X" and take note of the link to send to John.
On the lower one, you confirm all parts of the sheet that are being published at til that time. In other words, there will be more than one part in this fild. That is, if you havd alredy done the process to John (X), Anna (Y) and Floyd (Z), you will visualize X, Y and Z
Got it?

How can I link to Google Sheet from Google Form? (Exploring Make a Copy feature, but I need it to be shared with the original owner)

I'm posting here because I'm hoping someone can help me edit the link to a google sheet. I haven't been able to find the answer online, but I'm hoping maybe someone understands how the link works better than I and can give me an answer.
I've been tasked with updating the application for funding (from a non-profit) to include a budget category. The application is in Google Forms, but there's no way to insert a table into the form for an applicant to fill out. I created the budget outline in a Google Sheet, but now I'm trying to find the best solution to create an individual link within the form that will lead them to the budget document. Essentially, I'm hoping the applicant can fill out the form, and when they reach the section about their budget, I want them to click the link to the google sheet, have it make a copy, but have the copy be shared with the organization's google account so we can see it when they submit their application.
I've experiment with the forced copy feature (editing the shared link by google), but when I test it from a different google account than the owner, it tells me I have to request permission. The share settings are set to allow anyone with the link to access, so I don't understand why it's asking me to request permission when I open the force copy link. This isn't going to work because the applicants need to access it when applying, and we can't have them waiting for us to accept the request every time.
I'm sure there could be a few solutions, so I'm open to any advice. The only other solution I can possibly think of is creating individual links for each applicant, if there's a way to automate that?
I recognize there could be a solution where I ask the applicant to download the file and re-upload, or share it themselves, but our applicants are not native english speakers and they are often non very comfortable with technology, so I want to automate the process as much as possible.
To summarize: The applicant should be able to
Fill out the google form
Receive an individual copy of the budget document (from google sheets) to fill out.
The budget document must be shared with the original owner so we can see it and see how it relates to the rest of their application.
Thank you for your consideration!
A solution for your use-case would be to make use of Apps Script.
Apps Script is a powerful development platform which can be used to build web apps and automate tasks. What makes it special is the fact that it is easy to use and to create applications that integrate with G Suite.
Taking this into account, you can create a script which will create a copy of the document whenever a new form submission is made and add the permissions needed for the user. Essentially, you will be the one owning the copy of the sheet as well and the candidates will have edit permissions.
Therefore, the script will end up looking something similar to this:
Code
function onFormSubmit() {
let sheetId = 'ORIGINAL_SPREADSHEET_ID';
let form = FormApp.getActiveForm();
let responses = form.getResponses();
let n = responses.length;
let currentUser = form.getResponse(responses[n-1].getId()).getRespondentEmail();
let newSpreadsheet = SpreadsheetApp.openById(sheetId).copy("Sheet copy for " + currentUser);
let newSpreadsheetId = newSpreadsheet.getId();
DriveApp.getFileById(newSpreadsheetId).addEditor(currentUser);
}
Explanation
The above snippet makes use of the Apps Script's onFormSubmit installable trigger. Basically, whenever a new form submission is sent, the code above will run. The code will retrieve the last response which was submitted and get the user's email address by making use of the getRespondentEmail method. Afterwards, a copy of the original spreadsheet will get created and shared with the editor permission with the user who just submitted the form. Adding the permission is done by making use of the addEditor method from the DriveApp parent class. As for the user accessing the copy of the spreadsheet, this is easily done as the user will end up receiving an email telling them that a spreadsheet has been shared with them.
Setup
You will have to have the Collect emails option checked for the form;
Open the three dots icon and click on Script Editor;
Once you open the script editor, input the code from above and do not forget to modify the sheetId such that it matches the id of your original spreadsheet that you want to share.
Install the onFormSubmit trigger by going to the Triggers page and create a new trigger with the following options:
Send the URL form to the candidates and wait for submission to be sent.
Reference
Google Apps Script;
Apps Script Installable Triggers;
Apps Script SpreadsheetApp Class;
Apps Script FormApp Class;
Apps Script DriveApp Class.

I want to check information contained in a Google sheet, as the respondent is completing a form

We are using forms to allow people (staff) to book equipment out of a store, self service. We record who took what, and when they book it back in. They are asked if the tool condition is good, and if not, are taken to another part of the form to select a fault category. I record this information in the linked sheet.
so my question is can I read the information in the "fault" column of the linked sheet for that item ID, and generate a message to the form user such as "This item has been reported as faulty - please do not use it!" etc etc
If I could script the form so that it scans the linked sheet in the relevant column / row for the item they are trying to scan out, and then warn them that is has an entry in the "Fault" column, that would be perfect. Ideally as they scan the barcode of the item they are taking, before submitting the form, but after submit would be fine too.
I have searched widely and not yet found a solution
Since the only triggers which are available for Forms are the onOpen, onInstall and onFormSubmit, this cannot be done directly.
Possible solutions
1. You can develop your own form
This can be done by using Apps Script & HTML & JavaScript and creating your own Sheets add-on which will interract with the sheet you have in order to check the status of the tool.
2. You can programmatically update either the question name or the form description in order to include the accepted values for the question regarding the tools.
This can be done by creating a script attached to the sheet and using the onEdit(). So whenever a change is made in the tools section for example, this new data can be gathered as a string and update the fields to contain the updated values for the tools.
Reference
Apps Script Simple Triggers;
Extending G Suite with Add-ons.

Caller not authenticated when attempting access sharepoint list using Microsoft graph

Trying to use Microsoft's Graph beta to access a Sharepoint list via a registered Azure app using a key. I'm able to successful see/access some lists(looks like only lists created when site was created), but any list I have manually created is missing.
I can do the following get to list most lists in my site:
https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,fc016e3c-d8ae-4ee0-a10c-de6d26788b6a,9a4ea7a5-c3c4-44ae-9f80-273bd67431b8\lists
but for some reason it's only displaying certain lists and none of the ones I created. However if enter the list's GUID like this
https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,fc016e3c-d8ae-4ee0-a10c-de6d26788b6a,9a4ea7a5-c3c4-44ae-9f80-273bd67431b8/lists/BEA4B4A9-323F-441A-BA19-806290B27EF6
I receive "the caller is not authenticated" message back. This is message has me thinking it's a permissions issue, however, my list permissions are the same on all lists. it's as if the graph api can only see lists created by the system and not by end users.
Anybody experiencing this issue?
I've seen this issue on my end. The "save item to list" function works for some accounts and not others... It's extremely weird! Typical SharePoint, I suppose.
What I've come to realize is that GRAPH will sometimes throw an error when trying to save data to a date field and works every time saving data to text fields. If I'm logged in as my main O365 account (with license) I can save to date fields. If I'm logged in with a basic user that I just created on the domain (no license) I can create items unless there's a date field.
If I come up with anything else I'll post it! Sorry, this is more of a work-around than an answer. Hopefully it will spark something else.
Thanks

Check Site URL which fills data in Report Suite in SiteCatalyst (Omniture)

This question may seems odd but we have a slight mixup within our Report Suites on Omniture (SiteCatalyst). Multiple Report Suites are generating analytics and it's hard for us to find which site URL is constituting the results.
Hence my question is, is there any way we can find which Site is filling data within a certain Report Suite.
Through this following JS, I am able to find which "report suite" is being used by a certain site though:-
javascript:void(window.open("","dp_debugger","width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1").document.write("<script language=\"JavaScript\" id=dbg src=\"https://www.adobetag.com/d1/digitalpulsedebugger/live/DPD.js\"></"+"script>"));
But I am hoping to find the other way around that where Report Suite gets its data from within the SiteCatalyst admin.
Any assistance?
Thanks
Adobe Analytics (formerly SiteCatalyst) does not have anything native or built in to globally look at all data coming to see which page/site is sending data to which report suite. However, you can contact Adobe ClientCare and request raw hit logs for a date range, and you can parse those logs yourself, if you really want.
Alternatively, if you have Data Warehouse access, you can export urls and domains from there for a given date range. You can only select one report suite at a time but that's also better than nothing, if you really need the historical data now.
Another alternative is if your sites are NOT currently setting s.pageName, then you may be in some measure of luck for your historical data. The pages report is popped from s.pageName value. If you do not set that variable, it will default to the URL of the web page that made the request. So, at a minimum you will be able to see your URLs in that report right now, so that should help you out. And if you define "site" as equivalent of "domain" (location.hostname) you can also setup a classification level for pages for domain and then use the Classification Rule Builder and a regular expression to pop the classification with the domain, which will give you some aggregated numbers.
Some suggestions moving forward...
I good strategy moving forward is to have all of your sites report to a global report suite. Then, you can have each site also send data to a site level report suite (warning: make sure you have enough server calls in your contract to cover this, since AA does not have unlimited server calls). Alternatively, you can stick with one global report suite and setup segments for each site. Another alternative is to create a rollup report suite to have all data from your other report suites to also go to. Rollup report suites do not have as many features as standard report suites, but for basic things such as pages, page views, it works.
The overall point though is that one way or the other, you should have all of your data go into one report suite as the first step.
Then, you should also assign a few custom variables to be output on the pages of all your sites. These are the 4 main things I always try to include in an implementation to make it easier to find out which sites/pages are reporting to what.
A custom variable to identify the site. Some people use s.server for this. However, you may also want to pop a prop or eVar with the value as well, depending on how you'd like to be able to break data down. The big question here is: How do you define "site" ? I have seen it defined many different ways.
If you do NOT define "site" as domain (e.g. location.hostname) then I suggest you pop a prop and eVar with the domain, because AA does not have a native report for this. But if you do, then you can skip this, since it's same thing as point #1
A custom prop and eVar with the report suites(s). Unless you have a super old version of legacy code, just set it with s.sa(). This will ensure you get the final report suite(s), in case you happen to use a version that uses Dynamic Account variables (e.g. s.dynamicAccountList).
If you set s.pageName with a custom value, then I suggest you pop a prop and eVar with the URL. Tip: to save on request url length to AA, you can use dynamic variable syntax to copy the g parameter already in a given AA request. For example (assuming you don't have code that changes the dynamic variable prefix): s.prop1='D=g'; Or, you can pop this with a processing rule if you have the access.
you can normally find this sort of information in the Site Content-> Servers report. There will be information in there the indicates what sites are sending in the hits. Your milage may vary based on the actual tagging implementation, it is not common for anyone to explicitly set the server, so the implicit value is the domain the hit is coming in from.
Thanks C.

Resources