Giter Site home page Giter Site logo

ntawileh / obsidian-google-lookup Goto Github PK

View Code? Open in Web Editor NEW
71.0 71.0 10.0 4 MB

Obsidian plugin that pulls contact and calendar event information from your Google account

Home Page: https://ntawileh.github.io/obsidian-google-lookup

License: MIT License

JavaScript 4.52% TypeScript 94.84% CSS 0.09% Shell 0.55%
google-calendar google-contacts obsidian-md obsidian-plugin

obsidian-google-lookup's People

Contributors

kainissen avatar mkrinke24 avatar ntawileh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obsidian-google-lookup's Issues

Adding Birthdays

It would be nice to add birthdays to the contact. This is available in the Google Peoples API (under "birthdays" field name). I have tried to modify the main.js but can't seem to get it to work (probably missing something in your code)

I have added birthday: birthdays && birthdays[0].date ? birthdays[0].date : "unknown"

after phones in line 30418 and 30450.

I have used the Google People API to validated the year, month and day exist.

Format Date

Hi, is it possible to format the {{Date}} {{Time}} to a specific format like days, dd-mmm-yyyy HH:mm. I tried the templater format but it didn't work. In fact, it does not recognise templater. For example, date: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>, it will just display the the same string not converting to the date format.

Create a contact? Update a contact?

As titled. I would say for the calendar too, but most things for calendar sync through other apps.
You might have a fictional continuous loop if you use the todoist plugin to create tasks as events which syncs to your Google calendar, which you then write notes about.

Format for the name of the contact

Hello @ntawileh , thanks for the amazing work. Another idea: to enable users to define the format of the name of the contact (when we choose the option "Rename and move person file", which is great, BTW). Since the name is very important in Obsidian (I know I can use aliases but name is easier), it would help us to organize our 1,000 contacts in Contacts folder.

Thanks again!

Unable to add account

Hello,

I am unable to add my account to the plugin. I created credentials for a desktop app, added my email as a test user, and I get all the way through the sign in process without any apparent error.

The pop up in obsidian goes away and a quick bubble in the top right says "Updated authentication token for account NEW_ACCOUNT..."

Is there something I'm missing?

Templater example not working

I'm just starting with obisidan, so it's perfectly possible that I'm missing something obvious.

When using the example provided at https://ntawileh.github.io/obsidian-google-lookup/person/#using-templater templater doesn't seem to run.

With this template:

<%*
  let json = {{json}}
  let firstName = json.firstName
  let emails = json.emails.join("\n")
  let relations = json.relations.map(({person, type}) => `${firstName} is a ${type || ''} relation to ${person}`).join("\n")
-%>

my contact's first name is <% firstName %>
emails:
<% emails %>

relations:
<% relations %>

date: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>

<% tp.file.cursor() %>

I get the following output (some data redacted):

<%*
  let json = {
  "accountSource": "**@**.com",
  "resourceName": "people/**",
  "displayNameLastFirst": "**, **",
  "firstName": "**",
  "lastName": "**",
  "middleName": "",
  "type": "CONTACTS",
  "emails": [
    "**@**.com",
    "**@gmail.com",
    "**@**.dev",
    "**@**.com",
    "**@gmail.com",
    "**@**.dev"
  ],
  "phones": [],
  "birthdays": [],
  "relations": [],
  "userDefinedData": [],
  "clientData": [],
  "urls": [],
  "bio": "",
  "addresses": [],
  "nicknames": [],
  "contactGroupMembership": [
    "contactGroups/myContacts"
  ],
  "domainMembership": true
}
  let firstName = json.firstName
  let emails = json.emails.join("\n")
  let relations = json.relations.map(({person, type}) => `${firstName} is a ${type || ''} relation to ${person}`).join("\n")
-%>

my contact's first name is <% firstName %>
emails:
<% emails %>

relations:
<% relations %>

date: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>

<% tp.file.cursor() %>

I tried removing the {{json}} and just setting it to a json object with some dummy data and the same happens. If I render the mocked version with templater directly it works as expected

Creating account when the target Google Account has email aliases yields wrong account name

I have an account like

[email protected]

which has send as for [email protected], [email protected] in addition to [email protected]

While logged in as [email protected] and in the plugin creating an account, it properly shows [email protected] on the OAUTH page presented by Google. I check allowing access for the list of items.

I get a message saying 'OK - You can close this tab and go back to Obsidian!'

There I see the account added as [email protected] rather than [email protected]

It does appear to access events that are later in the day.

News fields: middle name, contact URL

Hello @ntawileh , first of all, thank you so much for this plugin! Amazing job. The possibilities are endless: imagine creating a contact note for every Google Contact and referring to these notes in other notes? And then using Dataview or Backlinks to list all interactions? Really great!!!

In order to support this vision even better, I'd like to suggest that other fields from contacts become available. I know the list of fields is huge, but at least "middle name" and "contact URL" would make a lot of difference. Middle name is common in many latin countries, where we don't use only first and last. And the contact URL (https://contacts.google.com/person/c15, for example) would enable us to open the contact and see the rest of information (so it's not necessary to import everything).

Thanks in advance and congratulations again!

Can I add code to my daily note to automatically pull in any events for today?

I really love that this is a "read only" connection to Google, and the ability to set templates for how the info is presented is great. Love the ability to convert a contact mention into a contact page. This really is a GREAT plugin, but of course I can always find more to wish for.

I'd love to be able to just put a little bit of code in my daily note template to pull and show today's appointments. Like

date: {{today}}

or some such.

FR: Add new fields

Hi!
First of all thank you for this plugin, I've been using Obsidian for a while and it's going to help me a lot to link contacts in my notes.

Would it be possible to add some extra fields to import with the plugin? The three fields that I'd really aprecciated to have are:

  • Adress information: It'd be great to have, like a previous request asked for, the following adress information: Type, Street, City, Postal Code, Country.
  • Nickname: So we can add it to aliases.
  • Group Membership: In my case, I use the same tags for groups in Obsidian and in Google Contacts, so it'd be perfect to add them directly.

(I added de names of the fields as they appear in the exported contact Google CSV, in case it's easier for you to find the fields)

Thank you in advance!

Struggling with moving Contact note to folder

Hi folks,

Thanks for the great plugin, which is working amazingly but for one part!

I want to move the people note into a folder called 'People' - top level folder in my vault.

I've got it set as follows in the plugin settings:

screenshot-nimbusweb me-2023 04 29-13_24_54

It's picking up the template location fine.

The information is included when I call the contact details command, but it fails to move the note into the People folder, saying it doesn't exist.

I've tried various formats but I'm not getting anywhere fast. Is there something I am missing here? It's not obvious from the docs if there needs to be anything other than the path relative to the root, so maybe it's a bug somewhere?

Google Account setting problem.

I had set up the Google Cloud project. But when I add google account, my account is not added. I don't know the problem by looking at the log in console. I need help.

image

image

image

image

image

image

Cannot See the commands in the Command Expolorer

I installed the plugin and configured it according to the docs,

  1. Created a project
  2. Created an external app
  3. Added the information to the plugin
  4. Authenticated to a google account.

But when I try to see the commands in the expolorer, I don't see them and the hotkeys also don't work.
I am on Obsidian 1.03.

No Company name

I couldn't find company name here. Could you help me navigate to get the company name as well as other fields within the google contacts

Seeing Unknown for Contacts

I have an issues where the first and the last name does not appear in the search and there by not creating the file with the desired name.
CleanShot 2022-11-12 at 16 20 26
It does not happen for my user id though, I configured the right API access as well. Iam using this for our work domain
Any idea why that would be the case.

Birthdays

Thank you for adding the birthdays. Looks great, except the month and day are missing the initial 0 (i.e., July 8, 2000 is shown as 2000-7-8 and not 2000-07-08). This would help for extracting date parts for queries - strings trim that looks for specific locations.

As a second unrelated issue that is easy is adding a space after the comma when pushing multiple responses (i.e., emails and phone numbers). This would hopefully make them clickable in the future as links to directly send an email or call a number).

Event Attendees - List by name?

Hi,

Super plugin, thank you! Is it possible to create a template field that gives a comma seperated list of attendees by name, rather than by email address where that info is available?

I tend to have notes about people, and populate attendee information in a Dataview field like: [[Joe Bloggs]] - it would be great if this could support that workflow.

Many thanks!

Access blocked: authorisation error

I can't login since when I try I see the following error in the Google OAuth flow:

Access blocked: authorisation error. Missing required parameter: client_id Learn more about this error If you are a developer of this app, see error details. Error 400: invalid_request

Error Details just tells me "Error 400: invalid_request" again.

Asks to reconnect to accounts every day or every other day

Hello and thank you for this plugin!

I must be doing something wrong. The plugin asks to reauthenticate with my google account almost every day if not every other day. Is it not storing a refresh token of some sort? Did I configure it incorrectly?

Thank you!

Custom Fields, Relationships ...

Hi, first: this plugin is amazing ... besides the very complicated google setup :-)

is there a way to access more than the few fields you provide at the moment? i have an extensive list of Projects and related names connected to my contacts, notes etc and i would love to import this as well when creating a new contact .... maybe just a "dump" of all the info that is attached to a contact?

thanks - arne

Account will not connect on Desktop

Hello, I have tried creating a Google API (OAuth) -> adding my client ID and Key to the plugin. I click ad account and follow through googles permission screen. I get the message: "OK - You can close this tab and go back to Obsidian!"
However, the account does not add to the plugin.

Am I missing a step?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.