Custom Code
Manage custom scripts and code for your Webflow site using the Scripts tools. Register scripts, apply them to sites or pages, and manage script configurations.
Currently, only site-level custom code is supported, and only JavaScript scripts can be applied. Page-level scripts aren’t yet supported.
List registered scripts
List all registered scripts for a site. To apply a script to a site or page, first register it via the Register Script endpoints, then apply it using the relevant Site or Page endpoints.
Tool: site_registered_scripts_list
Unique identifier for the site
Returns
List applied scripts
Get all scripts applied to a site by the App. To apply a script to a site or page, first register it via the Register Script endpoints, then apply it using the relevant Site or Page endpoints.
Tool: site_applied_scripts_list
Unique identifier for the site
Returns
Add inline site script
Register an inline script for a site and apply it to a site. Inline scripts are limited to 2000 characters.
Tool: add_inline_site_script
Unique identifier for the site
Script registration request
+ Show 5 properties
JavaScript code (max 2000 characters)
Script version identifier
Name for the script
Whether the script can be copied
Where to apply the script (header or footer)
Optional script attributes
Returns
Delete all site scripts
Delete all custom code scripts from a site.
Tool: delete_all_site_scripts
Unique identifier for the site
Returns
Example workflow
- List registered scripts to see what’s available
- List applied scripts to see what’s currently active
- Add inline scripts as needed for site functionality
- Remove scripts when no longer needed
Best practices
- Keep inline scripts under 2000 characters
- Use descriptive display names for easier management
- Place critical scripts in the header, non-critical in the footer
- Test scripts in a staging environment before applying to production