如何将Gmail API和MSGraph电子邮件API限制为特定的电子邮件主题

发布于 2025-02-03 01:42:10 字数 567 浏览 2 评论 0原文

我已经为Django建立了CRM WebApp,为特定的铅重工业。它适用于Gmail和Outlook用户。通过MSGraph和Google API,用户能够通过OATH2向应用程序授权以访问其收件箱。然后,该应用程序从各种来源获取并解析了电子邮件。 每个铅源始终以同一主题发送铅电子邮件。这使得引用电子邮件易于从用户收件箱中识别。不幸的是,必须搜索每个电子邮件的主题才能找到所需的潜在客户电子邮件。不幸的是,通过发件人识别不是一个选项,也不会改变问题。仍然必须搜索每个电子邮件。

我现在有几个同事测试。

当我考虑使用可能与同事之外的新用户一样,我开始认为WebApps通过可用范围对用户收件箱的无限制访问并不是试图吸引新用户的最佳方法。我会怀疑任何第三方计划都希望访问我的所有电子邮件,即使只是搜索特定的电子邮件。

在用户离线时,我使用Google的Watch()和Msgraphs订阅来执行此操作。 Google或Microsoft似乎不允许根据主题行中的任何形式的消息更改过滤器。

我是否可以在Google API或MSGRAPH文档中找到任何方法可以限制仅访问符合主题搜索标准的电子邮件?

这甚至可以通过他们的任何安全检查以获得“已发布状态”。

I've built a CRM webapp with Django for a specific lead heavy industry. It's working for both gmail and outlook users. Through MsGraph and Google API, the user is able to give authorization via Oath2 to the app to access their inboxes. The app then grabs and parses emails from various sources.
Each lead source always sends the lead emails with same subject. This makes the lead emails easy to identify from the users inbox. Unfortunately, the subject of EVERY email that comes in has to be searched to find the desired lead emails. Unfortunately, Identifying by sender isn't an option, and wouldn't change the issue. Each email would still have to be searched.

I have a couple of colleagues beta testing right now.

As I think about taking on new users that may be outside of my colleagues, I am starting to think the webapps unrestricted access to a user's inbox via the available scopes isn't the best approach for trying to attract new users. I would be suspicious of any 3rd party program wanting to access all of my emails, even if just searching for specific emails.

I use Google's watch() and MsGraphs subscriptions to do this while the user is offline. It doesn't appear that Google or Microsoft allow for any kind of message change filter based on what's in the subject line.

Are there any methods that I have not been able to find in either Google API or MsGraph documentation that would limit access to only the emails that meet the subject search criteria?

Would this even pass either of their security checks to get 'Published Status.'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧情勿念 2025-02-10 01:42:10

通过Google文档阅读,您可以设置授权范围,以限制访问仅标签和基本设置的访问。这应该使您可以通过主题过滤消息并将标签应用于这些过滤器。

当然,主题过滤与授权无关。但是微调授权比允许对整个邮箱的写入访问更好。

我通常会说,权限越开放,您获得批准的可能性就越小。 Google希望您只能访问实现产品目的所需的目标,仅此而已。

https://develovelers.google.com/gmail.com/gmail/api/api/api/auth/auth/auth/auth/auth/auth/scopes

绝对没有一种方法来设置基于主题的自定义权限。实际上,我一般不知道很多API可以使您定义详细的自定义权限。

也就是说,似乎您甚至不需要阅读访问消息标题,更不用说消息主体内容了,以实现您在Gmail中要做的事情。

我认为Microsoft的范围类似,但我不确定。

Reading through the Google docs, it looks like you can set authorization scopes that limit access to just labels and basic settings. This should allow you to filter messages by subject and apply labels to those filters.

Of course, the subject filtering doesn't have anything to do with authorization. But fine tuning the authorization is better than allowing write access to an entire mailbox.

I would say in general, the more open the permissions are, the less likely you are to get approved. Google wants you to only have access to what you need to achieve the product's purpose, nothing more.

https://developers.google.com/gmail/api/auth/scopes

There definitely isn't a way to set custom permissions based on subject. In fact, I don't know many APIs in general that allow you to define custom permissions that granularly.

That said, it doesn't seem like you even need read access to message headers, let alone message body content, to achieve what you want to do in Gmail.

I assume Microsoft has similar scoping, but I'm not sure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文