The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Configuring IMAP to Retrieve Sent Emails ([Gmail]/Sent Mail) in ServiceNow

mdshahvez11
Tera Contributor

Hello Everyone,

I need to fetch all the sent emails (email IDs) from my Gmail account into a custom table in ServiceNow.
I have tried setting up the IMAP email account configuration, but I’m not sure how to target the [Gmail]/Sent Mail folder so that it only fetches emails from the Sent mailbox.

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @mdshahvez11 

Not sure how we can fetch emails from Gmail while working within ServiceNow.

 

https://superuser.com/questions/1884885/how-to-get-an-imap-sent-folder-into-a-new-pop3-sent-folder

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Dr Atul G- LNG
Tera Patron
Tera Patron

chatgpt suggested

 

Goal: Fetch emails from Gmail into ServiceNow

This is typically done to automatically create or update incidents, cases, or other records based on incoming emails.


🔧 Common Methods:

1. Gmail Forwarding to ServiceNow Inbound Email Address

  • Easiest method

  • In Gmail, set up automatic email forwarding to your ServiceNow instance's inbound email address (usually something like inbound@yourinstance.service-now.com).

  • In ServiceNow, create Inbound Email Actions to define how emails are processed (e.g., create an incident, update a case).

Steps:

  1. Go to Gmail settings → Forwarding and POP/IMAP → Add forwarding address.

  2. Add your ServiceNow inbound email address.

  3. In ServiceNow, go to System Mailboxes > Inbound > Inbound Email Actions.

  4. Configure rules based on subject, body, sender, etc.

Best for basic use cases like auto-creating records from email.


2. Using Gmail API + Integration (for advanced setups)

  • If you need to read emails directly from a Gmail account, not just forwarded ones, you can use the Gmail API.

  • You’ll need to:

    • Set up a Google Cloud project

    • Enable the Gmail API

    • Use OAuth 2.0 to authenticate

    • Use REST APIs in ServiceNow (via IntegrationHub, Scripted REST, or REST Message)

Best for advanced use cases like fetching specific emails, attachments, or scanning Gmail inbox folders.


3. Third-party Middleware (Optional)

  • Use tools like Zapier, Make (Integromat), or Workato to bridge Gmail and ServiceNow if you don’t want to code.

  • For example, "When an email is received in Gmail → Create a record in ServiceNow."

Good for non-technical teams or quick integrations.


⚠️ Things to Consider

  • Make sure ServiceNow can receive external emails (check firewall/inbound email settings).

  • Gmail accounts may have security restrictions – especially on business accounts (you may need admin approval for API access).

  • Respect data privacy & security when integrating email systems.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************