What are the Custom files and Push notifications settings?
Push notifications and Custom files are two TeleportHQ Project settings entries that most projects never show. Push notifications, under Integrations, holds the keys that sign the browser notifications your web app sends; it appears once push notifications are set up from a workflow step. Custom files, under Data & code, holds extra files shipped with your site as they are; it appears only in projects that already have such files.
Push notifications
The Push notifications entry in TeleportHQ Project settings shows your project's Push notification keys. Notifications your published site sends with the Send Push Notification step are signed with these keys, and visitors subscribe with the Subscribe to Push step.
When it appears
The Push notifications entry appears after push notifications are set up for the project. To set them up:
- In the TeleportHQ editor, open a workflow that has a Subscribe to Push or Send Push Notification step. See What are workflows?.
- Click the step.
- In its settings, click Set up push notifications. This creates the keys, and a table in your TeleportHQ database for the browsers that subscribe.
For the steps themselves, see Workflow triggers and steps reference.
How to open it
- In the TeleportHQ editor, at the bottom of the left sidebar, click the Project settings cog.
- In the Project settings panel, under Integrations, click Push notifications.
What's in it
- Public key: "Browsers subscribe with this key. It is not a secret." Click the copy icon next to it to copy it.
- Private key: hidden by default. Click Show to see it and Hide to hide it again. TeleportHQ keeps it with your project secrets as
WEB_PUSH_VAPID_PRIVATE_KEYand adds it to your site when you publish. - The date the keys were created, after Created.
- Create new keys: replaces both keys. Use it only if the private key was shared by mistake.
Create new keys
- In the Push notifications settings, click Create new keys.
- The Create new push keys? window explains what happens: "Your next publish signs notifications with the new keys. Browsers subscribed with the old ones stop receiving notifications until their visitor opens your site again, when they subscribe again by themselves."
- Click Create new keys to confirm.
- Publish your site.
Messages you may see
"Push notifications stay off until your TeleportHQ database has the table for subscribed browsers again." The table for subscribed browsers is missing. In a workflow, open a push notification step and click Set up push notifications.
"These keys come from before push notifications worked…" The project has old keys. Click Update keys, or open the project in the editor: TeleportHQ replaces them the next time it opens.
"This project has no private key for push notifications: a copied project does not bring its keys along." A duplicated or cloned project doesn't copy its push keys. Click Create new keys to send notifications again.
Custom files
The Custom files entry in TeleportHQ Project settings holds files shipped with your site as they are, such as configuration files in the exported code. Most projects don't have any, so the entry doesn't show.
When it appears
Custom files appears under Data & code only when the project already has custom files.
How to edit a custom file
- In the TeleportHQ editor, click the Project settings cog at the bottom of the left sidebar.
- Under Data & code, click Custom files.
- Under File Explorer, click the file.
- Edit the code.
- Click Save Changes.
- Publish your site so the change goes live.
To add a file, fill in File Name and File Path under Create new file, then click Create File. To delete a file, right-click it in File Explorer and click Delete.
To store API keys and passwords, use Secrets instead. See How to keep passwords and API keys safe (Secrets).