I am trying to get the modified content after the given time from google sheets. Nowhere I can found the api to get the data. What i can see is getting modified date alone from the drive Api. How can I get the data using Drive or Sheets Api? Give me the suggestions if Possible
Google Drive keeps a track of revision history of files that are contained on it. There is however, no way to obtain the revisions from a request alone.
Google allows for you to receive email notifications whenever a user makes an edit to your sheet, which you can set up by completing the following steps:
In the Spreadsheet's web view, click Tools -> Notification rules...
Under Notify me at myemail#address.ext when... select Any changes are made
Under Notify me with... select Email - right away
Click Save.
You should also be aware that you will not get a notification for edits made to the sheet by you - notifications are only received when another user edits the sheet. Whenever you get an email notification, you will receive a link to view the changes to the spreadsheet in the form of a read-only web view link.
You can work around this programatically, though there isn't one right way and it can be quite complicated. You can use the Revisions: list method of the Drive REST API to get the information about the user that made an edit, as well as a list of links which you can use to export that revision of the sheet to another MIME Type, as shown below in the request response.
Requesting:
GET https://www.googleapis.com/drive/v3/files/SPREADSHEET_ID/revisions
with revisions/exportLinks,revisions/lastModifyingUser/emailAddress as the fields field and replacing SPREADSHEET_ID with the ID of the spreadsheet will give you a 200 response:
{
"revisions": [
{
"lastModifyingUser": {
"emailAddress": "username#domain.ext"
},
"exportLinks": {
"application/x-vnd.oasis.opendocument.spreadsheet": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=revisionNumber&exportFormat=ods",
"text/tab-separated-values": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=revisionNumber&exportFormat=tsv",
"application/pdf": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=revisionNumber&exportFormat=pdf",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=revisionNumber&exportFormat=xlsx",
"text/csv": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=revisionNumber&exportFormat=csv",
"application/zip": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=revisionNumber&exportFormat=zip",
"application/vnd.oasis.opendocument.spreadsheet": "https://docs.google.com/spreadsheets/export?id=SPREADSHEET_ID&revision=1&exportFormat=ods"
}
}
]
}
With the links to individual changes, you can fetch and compare the different versions of the Sheet using Apps Script, and output A1 notation of the cells that have different values between versions. This, with the email address from the original Revisions: list request, is enough to compile a file or a log containing.
You can put this into a simple onEdit() trigger bound to the sheet will allow you to automatically get the changes each time a user edits the sheet.
Related
I'm trying to build a simple ToDo App with Angular using two approaches:
At first I tried to develop on each file (asking code with short comments in .html, .css, .ts) and receiving as output small code snippets. Everything works as expected until now.
Second approach is trying to put a single long detailed comment in a unique file where I explain all I need in terms of component and interactions as shown in the example below*. Is there a way to obtain this code in a single session.ts file with the path attached before each code snippet so that I can move the code into the related file?
*Insufficient Comment Example to provide a clearer idea of the expected output:
I need two Angular Components: Login and Todo.
The Login Component has a form with two input fields: Username and Password.
The Login Form is implemented using ReactiveForms.
The submit button directly redirects to TodoComponent.
The TodoComponent shows a table with the ToDo List.
The List is empty at first.
The table has the following columns: Id(number), Title(string), Completed(boolean) and Actions.
The TodoComponent has a button to Add a Todo.
Etc.
Thanks in advance!
I tried to put the comment in a session.ts file but it's not working as it previously did with Java, I expected to receive a path /todo.component.ts and the related code, /todo.component.html and the related code and so on with the rest of the generated project.
I am working on an android app with java and i use firestore database i have a collections called user location who is structured like in photo :
db->RootCollection->document->subCollection->document->subColections->object
my problem is that when a user change his location or a new user come in a location who is alredy exist (other user have same location) it create a new document (like in "oran, algerie"). I wanted to use option.merge when I add a new user and update the documents but the problem is that I cant retrieve all documents of the root collection I used the normal way:
db.("Users Locations").get()...
It return null. I tried to use the collectionGroup method:
mDb.collectionGroup("User Locations").get()...
It returns already null
If I correctly understand your problem, you need to use a CollectionGroup query on the User List collections:
mDb.collectionGroup("User List").get()...
As a matter of fact, there is no documents in the Users Locations collection: As we can see in your screenshot, these "documents" are displayed with an italic font in the Firebase console: this is because these documents are only present (in the console) as "container" of one or more sub-collection but they are not "genuine" documents.
I'm using the Java botbuilder to build a microsoft teams bot. I want to add Cards to my bot (e.g. to embed links, quick replies, and images).
In the above link it says: suggested actions are not supported in Microsoft Teams: if you want buttons to appear on a Teams bot message, use a card.
However, I can find no documentation on how to add a 'card' to the Activity schema.
I tried:
1. Using suggested actions
I tried adding my List<CardAction> to the SuggestedActions
field in Activity but they were not rendered by microsoft teams
(as expected, the documentation says this is not supported).
2. Using Attachments
I suspect it could be done using attachments, but can only find
documentation for the C#/JS versions (e.g.
https://learn.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-rich-cards?view=azure-bot-service-3.0).
So I want to know how to add 'a card' to Activity schema so it can be rendered by my bot.
The BotFramework Java SDK is still in preview, so there isn't a lot of documentation I can point you towards. However, here is an example of adding a HeroCard to a reply.
Activity reply = new Activity()
.withType(ActivityTypes.MESSAGE)
.withRecipient(activity.from())
.withFrom(activity.recipient())
.withAttachments(Arrays.asList(
new Attachment()
.withContentType("application/vnd.microsoft.card.hero")
.withContent(new HeroCard()
.withTitle("Hero Card")
.withSubtitle("BotFramework")
.withButtons(Arrays.asList(new CardAction()
.withValue("https://learn.microsoft.com/en-us/azure/bot-service/")
.withTitle("Get started")
.withType(ActionTypes.OPEN_URL)
))
.withImages(Collections.singletonList(new CardImage()
.withUrl("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg"))))
));
You can also take a look at the SDK Attachment Tests for more examples.
Hope this helps!
url <- read_html('https://ngodarpan.gov.in/index.php/home/statewise_ngo_sof/27/35/1?')
valuation <- html_nodes(url,xpath='//*[(#id = "ngo_state_p")]')
valuation
class(valuation)
valuation1 <- html_text(valuation)
valuation1
the result of above code is empty string?is there any way out to get the exact value.
ngodarpan.gov.in/index.php/home/statewise_ngo/62/35/1 click on the name of first NGO AdityaNatyaAcademy,under that pop check the value for state for registration i.e ANDAMAN & NICOBAR ISLANDS
Your individual NGO data is coming in ajax requests in the background. Below is the javascript code that's fetching your data.
Function: function show_ngo_info(ngo_id) (in the same page...)
$.post("https://ngodarpan.gov.in/index.php/ajaxcontroller/show_ngo_info", {
id: ngo_id,
csrf_test_name:get_csrf_token()
}
It's using csrf token, which may complicate your automation a little bit. But, you should still be able to retrieve data with this. Let me know how it goes.
The data is being fetched on NGO link click in the background, and hence you are getting empty string when trying to read the data before that.
My client uses Lotus Notes for calendering. We have a need to serve event information on SharePoint. I'm trying to create an HTML link or button I can use in a custom display form on SharePoint (HTML) that users can click to add the event to their Notes calendars. So far, I've found no way to do this.
An app exists on my client's Domino deployment(?) that creates buttons for use in Notes email messages that also can collect response information. The action of this button is handled by what looks like Java to me. I've included a sample in case it's relevant, and I can include all of it if it looks like it would be helpful, but it's quite long:
Set CurDb=Session.CurrentDatabase
'Get mail file information from Location document using Notes.ini
MailServer$ = session.GetEnvironmentString( "MailServer",True)
MailFile$ = session.GetEnvironmentString( "MailFile",True)
'Set MailDB = session.CurrentDatabase
If CurDb.Server = "" Then
'Attempt to open local mail file
Set MailDB = session.GetDatabase("", MailFile$)
If Not MailDB.IsOpen Then
Set MailDB = New NotesDatabase(MailServer$, MailFile$)
If Not MailDB.IsOpen Then
Msgbox "Unable to add event to your calendar because your local and server mail file cannot be located.",16, "Notice"
Exit Sub
End If
End If
Else
'Attempt to open server replica of mail file
Set MailDB = New NotesDatabase(MailServer$, MailFile$)
If Not MailDB.IsOpen Then
Msgbox "Unable to add event to your calendar because your server mail file cannot be located.",16, "Notice"
Exit Sub
End If
End If
The same app can create a "web" version that can be added to our current intranet platform, but it uses what looks to me like a custom "hook" to interact with the button application and the user's calendar, and it has no function if not placed within an object on that platform. I include the snippet here in case it offers a clue:
<input type="button" onclick="SendEmailNotification('PTHN-132512')"
value="Send me a Notes Calendar Invitation" id="HTMLWebBtn">
I'm wondering if using the snippet elsewhere is as easy as linking to a .js file in my source, and am waiting to hear back from people managing the platform internally, but experience says this is a dead end.
Searching on the Googlybox has so far been basically fruitless. I know you can have a link open Lotus Notes by replacing the http:// with Notes:// followed by the server's name and the application/database/document address (usually a sometimes-really-long string of alphanumeric characters). And I found an article containing strings you can place after the Notes:// to open a new document in a given application, i.e., the email editor. But that's as close as I've come.
Any help, folks?
You can leverage the fact that Notes supports the .ics file format. When a ICS file is opened, Notes can respond by creating a new calendar entry. The best thing is that this works in other mail platforms too, in case your environment is mixed.
Here is some info on setting up Notes: http://www.ibm.com/developerworks/lotus/library/notes85-icalendar/
You can programmatically generate that ICS file, or if you're looking to just play around there are sites online that will generate one for you:
http://www.pratie.com/lab/icalendar/