πŸ“ Sync Android drawable assets from Figma to GitHub via PR (multi-density PNG)

⚑ 157 views Β· πŸ“ File Management

Description

Sync Android drawable assets from Figma to GitHub via PR (multi‑density PNG)

This n8n workflow automatically fetches design assets (icons, buttons) from Figma, exports them into Android drawable folder formats based on resolution (e.g., mdpi, hdpi, etc.) and commits them to a GitHub branch, creating a Pull Request with all updates.

Who’s it for

How it works

  1. Execute Flow manually or via trigger.
  2. Fetches all export URLs from a Figma file.
  3. Filters out only relevant components (Icon, Button).
  4. Prepares Android drawable folders for each density.
  5. Merges components with folder mapping.
  6. Calls Figma export API to get image URLs.
  7. Filters out empty/invalid URLs.
  8. Downloads all images as binary.
  9. Merges images with metadata.
  10. Renames and adjusts file names if needed.
  11. Prevents duplicate PRs using conditional checks.
  12. Commits files and opens a GitHub Pull Request.

How to set up

  1. Set up your Figma token (with file access)
  2. Get Figma File Key and desired parent node ID
  3. Connect your GitHub account in n8n
  4. Prepare a GitHub branch for uploading assets
  5. Add your drawable folders config
  6. Adjust file naming logic as per your code style
  7. Run the workflow

Requirements

ToolPurpose
Figma API TokenTo fetch assets and export URLs
GitHub TokenTo commit files and open PR
n8nWorkflow automation engine
Figma File KeyTarget design file
Node NamesNamed like Icon, Button

How to customize

Add‑ons

Use Case Examples

Common Troubleshooting

IssuePossible CauseSolution
Export URL is nullFigma node has no export settingsAdd export settings in Figma for all components
Images not appearing in PRMerge or file name logic is incorrectRecheck merge nodes, ensure file names include extensions
Duplicate PR createdCondition node not properly checking branchUpdate condition to check existing PR or use unique branch name
Figma API returns 403/401Invalid or expired Figma tokenRegenerate token and update n8n credentials
GitHub file upload failsWrong path or binary input mismatchEnsure correct folder structure (drawable-mdpi, etc.) and valid binary
Assets missing certain resolutionsNot all resolutions exported in FigmaExport all densities in Figma, or fallback to default

Need Help?

If you’d like help setting up, customizing or expanding this flow, feel free to reach out to our n8n automation team at WeblineIndia!

We can help you:

Happy automating!

πŸ”— Nodes Used

HTTP Request

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup