Skip to content

Instantly share code, notes, and snippets.

@tankxu
Last active July 14, 2022 02:56
Show Gist options
  • Save tankxu/2459212893b0c9b0daeb2e14f78d4e40 to your computer and use it in GitHub Desktop.
Save tankxu/2459212893b0c9b0daeb2e14f78d4e40 to your computer and use it in GitHub Desktop.
Bulk create projects in Figma
// Create a node project and install node-fetch
// Add `"type": "module",` to package.json
import fetch from "node-fetch";
let folders = [
"folder1",
"folder2",
];
folders.forEach((folder) => {
fetch("https://www.figma.com/api/folders", {
// Open chrome inspect network, create a folder in web and find the POST request
// Right click and choose "Copy as Node.js fetch".
// Replace the headers and team_id
headers: {},
body: `{"team_id":"11122233344455566","path":"${folder}","is_invite_only":false,"is_view_only":false}`,
method: "POST",
}).then((res) => res.json())
.then((data) => console.log(data));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment