figma-to-google-slides | Convert Figma frames into a Google Slides presentation 🍭 | User Interface library
kandi X-RAY | figma-to-google-slides Summary
kandi X-RAY | figma-to-google-slides Summary
Convert Figma frames into a Google Slides presentation, as showcased here ️. The order of the slides is determined by the frame hierarchy in Figma, from top to bottom in the Chrome Extension, but reversed in the Minified Version. Made by Alyssa X.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- run button
- Google api call
- Check if profile is stored in response
- get number of images
- activate button code
- get state information
- Gets the logged - in config .
- get urls
- if node is true
- bar is loading
figma-to-google-slides Key Features
figma-to-google-slides Examples and Code Snippets
Community Discussions
Trending Discussions on figma-to-google-slides
QUESTION
I am thinking of creating a google slides to Figma exporter using Google App Script. Starting out I would first like to route the shapes created in from google Slides to figma. How would I go about setting up my file? And I don't know how to set up the Oauth api communication between Google and Figma or if it's even possible.
I believe that I can start with:
References Figma referencehttps://github.com/figma/plugin-samples/blob/master/react/src/code.ts
google app script referencehttps://github.com/gsuitedevs/apps-script-samples/blob/master/slides/style/style.gs#L30
Get Figma Shape ...ANSWER
Answered 2019-Nov-11 at 05:13How about this answer?
Issue and workaround:Unfortunately, it seems that the shapes of Google Slides cannot be put to the page of Figma file. Because it seems that there are no methods of API for putting the shapes. But it was found that that the pages of Figma file can be retrieved as the image using Figma API.
In this answer, I would like to propose the sample script that the pages of Figma file can be put to the Google Slides as the image using Figma API with the access token. So you can directly use Figma API with Google Apps Script.
Usage: 1. Retrieve access tokenYou can see the method for retrieving the access token at here. Although there is also OAuth2 for retrieving the access token, in your situation, I thought that the method for directly generating the access token on the site might be suitable. So in this answer, the generated access token on the site is used. Please retrieve the access token as follows.
Generate a personal access token
- Login to your Figma account.
- Head to the Account Settings from the top-left menu inside Figma.
- Find the Personal Access Tokens section.
- Click Create new token.
- A token will be generated. This will be your only chance to copy the token, so make sure you keep a copy of this in a secure place.
The access token is like #####-########-####-####-####-############
. At Google Apps Script, the authorization is done by headers: {"X-Figma-Token": accessToken}
.
In order to retrieve the Figma file using Figma API, the file key is required. You can retrieve the file key from the URL of the file.
The URL of the file is like https://www.figma.com/file/###/sampleFilename
. In this case, ###
is the file key.
The sample script is as follows. Before you run the script, please set the variables of accessToken
and fileKey
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install figma-to-google-slides
Create a service API key in the Google API Console. You can follow the same steps described in the second section of my guide on using the Google Sheets API 📖 . Import it to your server and replace the path in the code.
Go to your Google Slides presentation, click on "Share" and enter the previously generated email address (your service API email address) into the "People" field with edit permissions 🔑
Replace the Google Slides presentation ID and Figma file ID from the code 🔗
Find your personal Figma access token by going to the API documentation 🤖, scrolling down to the "Access Tokens" section, and clicking on "Get personal access token" on the right. Replace it in the code.
Run the script & enjoy! Every time you run the script you will update the slides with the different frames from Figma 🍭
Feel free to reach out to me through email at hi@alyssax.com or on Twitter if you have any questions or feedback! Hope you find this useful 💜.
Create a Chrome extension with the files in the Chrome Extension folder (you can follow this guide) 📖
Generate a OAuth 2.0 client ID in the Google API Console. Select "Chrome App", and insert your App ID (which is generated when you create the extension).
In the manifest.json, replace "google_client_id" with your previously generated OAuth 2.0 client ID.
Generate an API key, leave it as unrestricted, and replace "google_api_key" in the background.js with the generated API key 🔑
Install the extension in your browser and enjoy!
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page