Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: google sheet extractor #298

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kasperstorgaard
Copy link

Introducing the @flatfile/plugin-gsheet-extractor

Prerequisites

  1. Create a google service account, and save the json file with private keys locally.

  2. Create the following flatfile secrets below using the google service account json:

    • google-cloud-project-id
    • google-cloud-private-key-id
    • google-cloud-private-key-1 (too long for one secret, split it in half)
    • google-cloud-private-key-2
    • google-cloud-client-email
    • google-cloud-client-id
    • google-cloud-client-cert-url
  3. Share one or more folders with your google service account, to enable access (can be root).

Basic usage

export default function setup(listener: Client) {
  listener.use(
    GSheetExtractor({
      sheetRange: "C4:AE", // optional
    }),
  );
}

Advanced usage

export default function setup(listener: Client) {
  // you can use different ranges for different namespaces
  const spaceListener = listener.namespace(["space:some-namespace"]);

  spaceListener.use(
    GSheetExtractor({
      sheetRange: "C4:AE",
    }),
  );
}

Copy link

New and updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
googleapis 128.0.0 filesystem, shell, environment +17 104 MB google-wombot
@flatfile/plugin-record-hook 1.1.8...1.1.9 None +0/-0 61.1 kB flatfileinfra
@types/node 20.5.9...20.8.10 None +2/-0 4.07 MB types

@kasperstorgaard
Copy link
Author

FYI: One of our users just reported an issue using this on Windows. Don't have much on specifics, so could be a google drive folder integration acting up, OR that it doesn't work on Windows at all. (Have only tested this on my mac)

@carlbrugger
Copy link
Contributor

@kasperstorgaard thanks for writing this plugin! I'll take a look at the code next week.

@ashleygmulligan2
Copy link
Contributor

@kasperstorgaard thanks for your contribution! Are you in our Slack community? I wanna chat ya there, if so. https://join.slack.com/t/flatfile-developers/shared_invite/zt-1zlexssv9-z5XT3MIPh09uuJBz5nBblQ

@ashleygmulligan2
Copy link
Contributor

This is still on our radar! @carlbrugger and @madaley1 will review this next week.

@madaley1 madaley1 self-requested a review November 27, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants