I created a invitation on Figma, I want to create N copies of the frame but with N different Names (so change 1 text block in the frame for each copy). @Gavin I noticed you have a API to get the JS of the selected frame. How can I use this code to change the name in the text block and create copies. Any help is appreciated.
There are existing plugins that can help with that, here is one example: https://figma.fun/iiOwKv, you can find other plugins like this too.
Gleb’s right, there are specific plugins that can probably do this for you more easily. My suggestion would be to create a component and then create an instance from that component. You can then use plugins such as the one Gleb mentioned to replace the text. This is another one I use regularly for replacing with random data.
Thanks @Gavin , the Data Lab plugin worked like a charm. Since I am doing this to loads of frames, I am copying my original frame using this plugin. Do you know anyway to name each frame differently or export each frame with a certain file_name (eg. Invitation-Jon_Doe, Invitation-Alice). This would be super helpful in automating the process.
I feel like there must be a plugin to help you automate this.
I found this plugin called Frame Renamer. It says it takes the a name based on a specified text layer within the frame. Not sure if that could help you?
You might need to use a combination of plugins.
How many frames/invitations do you need to rename? Do you have the list in a spreadsheet? Let me know.
Also @Pavan_AAKASH , does the plugin that Gleb suggested offer any of the functionality you’re after?
I will be creating about 1000 invitations, probably will have to do them in batches due to memory constraints. The list of names is on a .txt file. I will look into Frame Renamer, it seems like it has the renaming feature I am looking after. Hopefully the frames are also exported with the same names. The plugin @Gleb suggested did not work. It did not recognize the JSON file.
When you export frames in Figma it will export with the same name as the frame. And if you use forward slashes in will put them into folders. For example a frame called
images/gavin will export into a folder called
My suggestion would be to add the list of names to a spreadsheet, import them using Google Sheets Sync, and then use Frame Renamer to copy the name from a text layer inside the frame.
With the Google Sheets Sync plugin you can build a component, then label any text layer with the name of the column from the spreadsheet. Then when you import the data it will map it to the corresponding layer. Creating an instance of this component and syncing the spreadsheet will populate the data for you, for each invitation.