User guide
Quick Start Guide
Dashboard
Overviews
Case detail (Caseoverview)
Case - event
Tasks
Case notes
Documents
User settings
Favorites
Table component
FAQ
Administrator Guide
Platform guide
Administration
Crons
Authentication and Synchronization
Mobile App Setup for Your Environment
Scheme
Dynamic tables
Archiving
Scripts
Service console
Scheduled Tasks
HR Agenda
Sequences
CSP Headers
Logs
Access Token Settings & Session Expiration
Template
Roles
Planning
Users
Organizational structure
Events
Translations
AXIOS API
Calculations & Functions
Integrations
TAS Forms
TAS Forms
Activating the module on the environment
TAS Forms - secret creation guide for Docker Swarm
Advanced Features & Tips
Partners
Product
Business Changelog
Technical Changelog
Version Upgrade Guide
Upgrading to 5.9
Upgrading to 5.3
Dynamic conditions migration
PDF printing adjustment
Editing Task Description vs Task Instructions
Transpiling forEach to a for loop
Rendering HTML on Caseoverview
Upgrading to 5.7
Lodash upgrade v4.17.x (>v5.5)
Main changes and deprecated features (v5.3 > v5.7)
Using validation functions
Differences between TAS4 and TAS5 - a complete overview
Best Practices for Upgrading from v4 to v5
Technical details
News / Important information
- All Categories /
- Administrator Guide
- Integrations
- MS Graph /
- MS Graph - cron configuration
MS Graph - cron configuration
The basic steps for setting up a mailbox can be found here .
MS Graph cron configuration MsGraphCreateProcessesFromMailCron.js :
"items" .{
"amountOfEmailByRun": 10, /// Maximální počet stažených emailů na jeden běh cronu
"items": [
{
"auth": {
"emailAddress": "your_mailbox@mail.com",
"tenantId": "xxx",
"clientId": "xxx",
"clientSecret": "xxx",
"type": "secret"
},
"folders": {
"in": { /// Vstupní složka, odkud cron čte maily
"id": "AQMkADg0MjYzNGRjLTRlNWEtNDM1Zi05ZTNiLWIyMGM0MDk4M2MzMgAuAAAEUtvwUxN2T57o_amJWiFMAQBlyfKJ66aURpYiUSTGCCnfAAR7Pb2oXXXX"
},
"out": { /// Výstupní složka, odkud cron čte maily
"id": "AQMkADg0MjYzNGRjLTRlNWEtNDM1Zi05ZTNiLWIyMGM0MDk4M2MzMgAuAAAEUtvwUxN2T57o_amJWiFMAQBlyfKJ66aURpYiUSTGCCnfAAR7Pb2pXXXY"
}
},
"process": {
"user_id": 1, /// User pod, kterým jsou případy v TASu zakládány
"tproc_id": 132, /// ID šablony, ze které jsou případy zakládány
"header_id": 199, /// Hlavička případu
"tproc_version": 1 /// Verze šablony, vždy 1 zatím
},
"config": {
"setEmailProcessedOnError": true, /// Odesílat email v případě chybného zpracování
"errorEmailAddress": "your_admin@mail.group" /// Adresa, kam je případně odeslán email s chybou ve zpracování
},
"ignoreAttachmentErrors": true, /// Pokud je true, ignoruje případné chyby u příloh (encrypted zip file, nefunkčni dms...) pouze zaloguje error, ale zpracování proběhne.
"ignoreVariablesUpdateAndUseDataHolder": false,
"useEmailObjectInDataHolder": false,
"mapping": {
"emailBody": "body.content",
"dmAnnotation": {
"value": "subject",
"option": "optional"
},
"sender": {
"value": "from.emailAddress.address",
"option": "optional"
},
"emailRecipients": {
"value": "toRecipients[0].emailAddress.address",
"option": "optional"
},
"emailRecipientsCopy": {
"value": "ccRecipients[0].emailAddress.address",
"option": "optional"
},
"emailDeliveryDate": "receivedDateTime",
"_distributionRequired": {
"value": "yes",
"isConstant": true
},
"mailSource": {
"value": "Email",
"isConstant": true
}
}
}
]
}
Within the service console in TAS ( https://your_tas.app/administration/service-console ), you can use folder listings and work with emails, similar to EWS:
- sys.msGraphGetMailDetails(itemIndex, mailId);
itemIndex | Number | item (mailbox) index from cron parameter
mailId | String | Id of the email you want to retrieve
- sys.msGraphListMailsFromFolder(itemIndex, folderId)
itemIndex | Number | item (mailbox) index from cron parameter
folderId | String | Id of the folder from which you want to list emails
selectedFields | String | Which elements should be listed from the email?
pageSize | Number | The number of items to return. The default value is 20.
offset | Number | A number that specifies where to start loading data in a numbered set. Basically, it shows a list of the first 10 items. The default value is 0. To display the next 10, I can use offset.
- sys.msGraphMoveMail(itemIndex, mailId, toFolderId);
itemIndex | Number | item (mailbox) index from cron parameter
mailId | String | Id of the email you want to move
toFolderId | String | Id of the folder you want to move to
- sys.msGraphSetEmailAsRead(itemIndex, mailId);
itemIndex | Number | item (mailbox) index from cron parameter
mailId | String | Id of the email you want to mark as read
- sys.msGraphSetEmailAsUnread(itemIndex, mailId);
itemIndex | Number | item (mailbox) index from cron parameter
mailId | String | Id of the email you want to mark as unread
- sys.msGraphListChildFoldersFromFolder(itemIndex, folderId, offset);
itemIndex | Number | item (mailbox) index from cron parameter (0 mostly)
folderId | String | Folder ID
offset | Number | A number that specifies where to start loading data in the listing. Basically, the listing shows the first 10 items. The default value is 0. To display the next 10, I can use offset.
- sys.msGraphListFolders(itemIndex,offset);
itemIndex | Number | item (mailbox) index from cron parameter (0 mostly)
offset | Number | A number that specifies where to start loading data in the listing. Basically, the listing shows the first 10 items. The default value is 0. To display the next 10, I can use offset.
Updated
by Frantisek Brych