Orafila Documentation Book a demo

Document 10 of 13

Integrations

IMAP/SMTP mail, HTTP gateway, Fatture in Cloud, AI, CSV, PDF.

For whom: IT

Integration Direction What it is for Required
IMAP/SMTP mailboxes Inbound and outbound Customers' e-mails that become tickets; outgoing replies, confirmations, documents and alerts No, but it is the heart of the helpdesk
Forwarding gateway (HTTP) Inbound Alternative to IMAP mailboxes for receiving e-mails No
Fatture in Cloud Outbound E-invoice and sending to the SDI (Sistema di Interscambio, the Italian e-invoicing exchange) No
AI providers (Anthropic, OpenAI, Google) Outbound Triage, drafts, briefings, assistant No
CSV files Inbound and outbound Customer import; exports of income and expenses and of reports No
S3-compatible storage Outbound Copy of the encrypted backups Recommended
Couriers Link Shipment tracking from the link saved in the order No

1. Mailboxes (IMAP and SMTP)

Each support queue can have its own mailbox, set up by an administrator in Settings › Queues and mail.

  • Reading (IMAP): port 993 with TLS (or 143 with STARTTLS), folder of your choice (usually INBOX). The mail worker reads the mailboxes every minute (MAIL_POLL_SECONDS, 10 seconds or more), imports the new messages and marks them as read: it does not move or delete anything. The first time, it imports only the 50 most recent unread e-mails. Two queues cannot read the same mailbox and folder.
  • Sending (SMTP): port 465 with TLS or 587 with STARTTLS; if the server provider blocks the mail ports (DigitalOcean blocks 25, 465 and 587), use a sending service on port 2525 with STARTTLS (for example Mailgun EU, Mailjet, SMTP2GO EU) or on ports 2587/2465 (Amazon SES, Resend, Scaleway).
  • Authentication: user name and password, stored encrypted. A password is valid only for the server, port and user it was entered with: if you change them, it must be entered again.
  • Test the connection: checks reading and sending and warns if the server provider may block the SMTP ports.
  • Gmail and Google Workspace: with an app password. Microsoft 365: Microsoft does not accept reading with a password alone and OAuth access is not available yet (forward the mail to another mailbox); sending works if the tenant allows SMTP AUTH.
  • Security: encrypted connections only; no connections to private or internal network addresses; new sending attempts after 1, 5, 15 and 60 minutes; headers that prevent automatic replies; no reply loops between systems.
  • What is imported: sender, subject, text (also converted from HTML) and message identifiers. Attachments are not imported: the ticket shows their names. For very large messages, only the first part of the text is imported.

2. E-mail forwarding gateway (HTTP API)

An e-mail receiving service (for example an "inbound parsing" service) can deliver each e-mail to Orafila with an HTTP request, instead of IMAP reading.

Request

POST https://psa.yourcompany.com/api/inbound-email
Content-Type: application/json
x-nova-inbound-secret: <value of INBOUND_EMAIL_SECRET on the server>
{
  "to": "assistenza@cliente.it",
  "from": "mario.rossi@azienda-cliente.it",
  "subject": "Error printing invoices",
  "text": "Good morning, since this morning...",
  "messageId": "<CAF1234@mail.azienda-cliente.it>",
  "receivedAt": "2026-10-27T09:15:00Z",
  "headers": { "In-Reply-To": "<...>", "References": "<...>", "Auto-Submitted": "no" }
}
Field Required Notes
to yes The address of the receiving queue; it must be assigned by the operator with deploy/nova.sh queue-address
from yes The sender, without a display name
subject no 500 characters at most
text no Plain text, 200,000 characters at most
messageId yes Unique identifier of the message: e-mails received twice are recognised
receivedAt no Date and time in ISO 8601
headers no Only Auto-Submitted, X-Autoreply, Precedence, List-Id, List-Unsubscribe, In-Reply-To, References are used; the others are ignored

Responses

Status Body Meaning
200 {"outcome": "create", "ticketNumber": 1042} New ticket
200 {"outcome": "append", "ticketNumber": 1042} Added to an existing ticket
200 {"outcome": "triage"} Sender not recognised: in Inbox
200 {"outcome": "ignore"} Automatic reply or bulk e-mail (Precedence: bulk, list or junk), discarded
200 {"outcome": "duplicate"} or {"outcome": "stored"} Already received, or saved and waiting to be sorted
400 {"error": "...", "message": "..."} Invalid body or data (stable codes, for example invalid_json, invalid_body, invalid_from, invalid_message_id)
401 {"error": "unauthorized"} Secret missing or wrong
404 {"error": "unknown_address"} No queue receives at that address
413 {"error": "payload_too_large"} Request over 2 MB
500 {"error": "internal_error"} The e-mail was not saved: the gateway must try again later
503 {"error": "not_configured"} The server has no INBOUND_EMAIL_SECRET

The e-mail is saved before it is sorted; error messages are in Italian or English according to the Accept-Language header. The gateway only handles receiving: for replies the queue still needs an SMTP mailbox.

3. Fatture in Cloud (e-invoice and SDI)

  • Connection: manual token of an application created in the Fatture in Cloud developer area, with read and write permissions on invoices and read permission on settings. The token is stored encrypted and never goes back to the browser or into the activity log; calls go only to the official API (api-v2.fattureincloud.it).
  • Creation: each invoice issued in Orafila becomes an e-invoice in Fatture in Cloud with the same number, the same customer details (SDI recipient code and PEC (certified e-mail) included) and the same lines; optionally, automatically on issue. First Orafila checks that Fatture in Cloud works out the same totals; if they do not match, the invoice is not created. An invoice is "reserved" before it is created, so two clicks do not create two documents.
  • Sending to the SDI with the check of the XML file; status (delivered, in the cassetto fiscale (online tax area), discarded with the reason) refreshed on request; sending again a discarded invoice with the same number after it has been corrected in Fatture in Cloud.
  • Options: company in Fatture in Cloud, sezionale (numbering series), natura (VAT exemption code, e.g. N2.2) for lines with 0% VAT (required if there are any), payment code for the “Other” method.
  • Limits: credit notes are issued in Fatture in Cloud; Orafila does not edit or delete documents already created there. The same numbering must not be used for invoices created by hand in Fatture in Cloud.
  • Without Fatture in Cloud the e-invoice is sent through your own intermediary or management software, starting from the details of the invoice issued in Orafila (currently without export of the FatturaPA XML file).

4. Artificial intelligence providers

  • Anthropic (Claude) through the official SDK, OpenAI (GPT) through the Responses API, Google (Gemini) through the generateContent API.
  • One key per provider in the server configuration; each company chooses its agent and budget from the application. Details, costs and data sent in Artificial intelligence.

5. CSV files

File Where Format
Customer import Customers › “Import from CSV” Downloadable template; also the CSV exported from Excel (semicolon, comma or tab separator; UTF-8, UTF-16 or Windows-1252 encoding, recognised automatically); up to 2 MB and 5,000 rows; columns: Code, Company name (required), VAT number, Tax code, PEC, E-mail domains, Contact person, Contact e-mail, Phone, Job title, Address, City, Province, Postcode. The most common column names in Italian and English are also recognised
Income and expenses Income and expenses › “Export to CSV” Entries for the chosen period, ready for Excel and for your accountant
Reports Reports › “Download the data (CSV)” in each section Values by month and the year's rankings; comma as separator, full stop for decimals, amounts in euros without the symbol

6. PDF documents and printing

  • PDFs of invoices, receipts, customer orders (order confirmation) and supplier orders, generated by the application without external services, with the company's letterhead and in the document language.
  • Print pages for invoices and receipts.
  • The invoice PDF is the courtesy copy and says so at the bottom; with bank transfer it shows the IBAN and the payment reference.

7. Not yet available

  • OAuth access to Microsoft 365 and Google mailboxes.
  • Single sign-on (Microsoft 365 / Google) for users.
  • Public APIs and webhooks for other systems (apart from the e-mail receiving endpoint).
  • FatturaPA XML export for intermediaries other than Fatture in Cloud.
  • iCalendar export of the calendar for Outlook and Google Calendar.
  • Connectors with management software and ERP systems.