Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket or notification endpoint to update content in AMP Email that a user currently has open #39784

Open
hach-que opened this issue Jan 30, 2024 · 3 comments

Comments

@hach-que
Copy link

Description

Apologies if there's a way to do this, but it didn't look like it from the documentation.

What I would like to do is have a QR code in an email (probably an amp-img) where the src is loaded from a remote server. Then, when our system detects that the QR code has been scanned, it can send a notification or WebSocket push so that the amp-img source is replaced with a green check or other kind of indicator. This would help users have immediate feedback as to when their QR code has been scanned successfully.

Alternatives Considered

Without being able to live update content in response to a notification, we'd probably just have to link out to a website from the email content (where we could then use React to replace the content in response to the WebSocket notification).

Additional Context

No response

@erwinmombay
Copy link
Member

@hach-que have you tried using amp-list?

@hach-que
Copy link
Author

@erwinmombay I haven't tried using an amp-list, but I couldn't see anywhere that an amp-list could be signaled to be updated once the email is open. i.e. I know I can get an amp-list to fetch the content when the email is first opened, but I couldn't see a way of telling the email client to reload the list based on an event that happens on an external server.

I thought about doing long polling, but I suspect that probably won't work the way I want due to email clients proxying requests.

@Vue-Pu
Copy link

Vue-Pu commented Feb 6, 2024

Might be able to using Gitbook

https://docs.gitbook.com/integrations/overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants