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

Outlook link not working #13

Closed
LucienPeng opened this issue Feb 20, 2024 · 7 comments
Closed

Outlook link not working #13

LucienPeng opened this issue Feb 20, 2024 · 7 comments

Comments

@LucienPeng
Copy link

Hello!

I was finding the solution for adding events to calendars and I think this pacakage is pretty cool!

However, I noticed that the outlook link seems to be not working, the link opened will be redirected to outlook homepage.

It would be nice if this could be fixed!

Thank you

@barinbritva
Copy link
Owner

Hi LucienPeng,

Thanks for your feedback!

Here is a link generated via the lib and it works fine for me. Could you please check if it works for you?
https://outlook.live.com/calendar/0/deeplink/compose?path=%2Fcalendar%2Faction%2Fcompose&rru=addevent&subject=Ali%20Ragimov%20and%20Ali%20Ragimov&startdt=2024-02-20T07%3A00%3A00Z&enddt=2024-02-20T07%3A15%3A00Z

Please attach your result link to me be able to check it.
As you mentioned you get redirected to the home page, the reason is you probably are not signed in to outlook.com at the moment.

@LucienPeng
Copy link
Author

Hello barinbritva,

Thanks for your quick response!
Here's the result link :
https://www.microsoft.com/zh-tw/microsoft-365/outlook/email-and-calendar-software-microsoft-outlook?deeplink=%2fowa%2f0%2f%3fpath%3d%252fcalendar%252faction%252fcompose%26rru%3daddevent%26state%3d1%26redirectTo%3daHR0cHM6Ly9vdXRsb29rLmxpdmUuY29tL2NhbGVuZGFyLzAvZGVlcGxpbmsvY29tcG9zZS8_cGF0aD0lMmZjYWxlbmRhciUyZmFjdGlvbiUyZmNvbXBvc2UmcnJ1PWFkZGV2ZW50JnN1YmplY3Q9QWxpK1JhZ2ltb3YrYW5kK0FsaStSYWdpbW92JnN0YXJ0ZHQ9MjAyNC0wMi0yMFQwNyUzYTAwJTNhMDBaJmVuZGR0PTIwMjQtMDItMjBUMDclM2ExNSUzYTAwWg&sdf=0

I was signned in by the time. But it was my work account which has some strict restrictions.
If you're able to see it, then I believe it's my own problem. 😅 I'll see with my team if that's the case.

Thanks again for your time and your reply!

@barinbritva
Copy link
Owner

I can see your link contains language code www.microsoft.com/zh-tw/microsoft-365... which looks like you copied it already from redirect. But I need a link you get from the lib. The correct link should start from https://outlook.office.com/calendar/0/deeplink/compose or https://outlook.live.com/calendar/0/deeplink/compose

And here is the catch, btw. Unfortunately, Outlook hosts work and personal accounts in different domains. So, to generate link for personal calendars you should use new Outlook(), but for work calendars new Office365().

Probably it's your case

const event = ....
const personalLink = new Outlook().createLink(event)
const workLink = new Outlook().createLink(event)

console.log(personalLink, personalLink);

Just generate both links and then put them to browser. One of them should works

Let me know

@LucienPeng
Copy link
Author

Hello brainbritva,

This is the llnk from lib :

https://outlook.live.com/calendar/0/deeplink/compose?path=%2Fcalendar%2Faction%2Fcompose&rru=addevent&subject=DS%202024-02-07%2013%3A08&startdt=2024-03-31T11%3A08%3A49Z&enddt=2024-03-31T11%3A09%3A49Z&body=%3Cb%3ETest%3C%2Fb%3E%3C%2Fbr%3E%3C%2Fbr%3E%3Ca%20href%3Dundefined%3Eundefined%3C%2Fa%3E&location=&to=

I tried with office365 but the page loads all the time, so I guess it's also not work. 😔
https://outlook.office.com/calendar/0/deeplink/compose?path=%2Fcalendar%2Faction%2Fcompose&rru=addevent&subject=DS%202024-02-07%2013%3A08&startdt=2024-03-31T11%3A08%3A49Z&enddt=2024-03-31T11%3A09%3A49Z&body=%3Cb%3ETest%3C%2Fb%3E%3C%2Fbr%3E%3C%2Fbr%3E%3Ca%20href%3Dundefined%3Eundefined%3C%2Fa%3E&location=&to=

in addition, is there anyway to add event to Apple calendar?

Thank you for your reply!

@barinbritva
Copy link
Owner

Hi LucienPeng,

Thanks for your feedback. It seems that the redirect for Office 365 doesn't work because there /0/ part. I removed it. Now it should work.

Please try:
npm install --save @barinbritva/add-to-calendar@next
If it works I will release the main branch

Speaking of Apple, there is no web interface to pass params to. For Apple mail app you can generate an ics file and attach it. The mail app recognze such kind of attachments and shows the UI to add an event to calendar. It work for all popular mail clients

Looking forward to hear from you

Repository owner deleted a comment Mar 4, 2024
@barinbritva
Copy link
Owner

@LucienPeng hi,

Is the issue still relevant for you? Let me know if you resolved your issue or found another library.

Just in case I released version 1.3.2 with the fix.

@barinbritva
Copy link
Owner

Fixed.

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

No branches or pull requests

2 participants