Skip to main content

Introduction

The Email app does two things:
  • Sending emails from your workflows: invoices to customers, notifications, and error reports.
  • Receiving invoices by email for your parties: each registered party gets an address, and the invoices sent there are imported into your workspace.
To use either, connect the app. Head over to Configuration → Apps, find Email in the list of apps to discover, and tap Connect.
Email app connected

Sending emails

The Send via Email step sends an email. When the job has a silo entry, the entry’s files are attached and its customer or supplier can be a recipient; this is how invoices are sent. Without one, nothing is attached, for notifications or failures.
Notify via Email is now part of Send via Email. Existing steps that use it keep working as sends without attachments.

Prerequisites

You can send emails from Company name <email@invopop.com> by simply connecting the Email app. If you wish to send emails from your own domain such as Company Name <name@yourdomain.com>, you will need one of the following:
In the case of SMTP delivery we strongly recommend using an app password or token if your service provider allows it. This is the best security practice because it allows you to revoke authorization at any time, even if you lose access to Invopop.

Setup

1

Add Senders

After connecting the Email app, click on Configure. You will find a pre-defined email address Invopop Email <email@invopop.com>. Editing this email address will allow you to customize the Sender name, allowing you to send emails with your company name Company Name <email@invopop.com>.You can add as many senders as you need by tapping on the Add button under Outgoing. Email providers other than Invopop will allow you to use your own domain name (after it’s configured with the email provider).
Configure Email panel with an Incoming connection, @invopop.email to the Receive supplier invoices workflow, and the Outgoing sender Invopop Email <email@invopop.com>

The Email app's providers: an incoming address domain and the default sender

2

Set up your workflow

Whether you start from an existing or new workflow, make sure that you add the Send via Email step after you have issued an invoice via the corresponding tax authority and generated a PDF (if required). This will ensure the necessary files are attached, and that the invoice complies with local regulatory requirements.
Workflow editor: Set state to Processing, Sign envelope, Generate PDF, Send via Email (selected, with its settings open) and Set state to Sent, with Send via Email and Set state to Error under Handle Exceptions

A workflow that signs the invoice, generates its PDF and emails it to the customer

If you simply want to send a notification, this suggestion does not apply: a Send via Email step in a job without a document attaches no files.

Step configuration

Send via Email settings: sender, recipients, BCC, reply-to, subject and body with variables, and attachments
Sender
Here you will find Senders which were added in the Email app configuration. A sender can be thought of as a person or company name and email address.
To
Check Automatically add invoice customers if you wish to send the invoice as an attachment to the customer. This is usually the case for B2C workflows. If you wish to send the email with attachments to a specific address, tap on the Add button and write an address in the email field.
You can combine both options: any addresses you add manually are merged with the automatically detected customer or party emails, so all recipients receive the message. BCC
BCC stands for Blind Carbon Copy, and is used when you do not want the recipients in this field to appear in the message header. Other recipients won’t know that a copy was sent to these addresses. This is useful to send a copy of the invoice to yourself, for example.
Reply To
The “Reply To” field requires a valid email address where recipients’ responses will be directed. This field determines where replies go, regardless of the sending address.
Subject
The email subject field is a brief heading that summarizes your message’s purpose. This field allows you to use template variables in order to customize the subject for the recipient.
For maximum effectiveness, keep it clear and specific (e.g., “Invoice #12345 from Acme Inc.”). Many email clients display only the first 60-70 characters of a subject, so prioritize key information at the beginning.
Body
The email body textarea is where you compose your message’s main content. This field allows template variables and will preserve whitespace.
Combine attachments into a single zip file
It’s possible that your workflow generates several files per invoice (sometimes an XML and a PDF file are required by legislation). This option allows you to combine and compress all files into a single .zip file.

Custom template variables with job args

In addition to the predefined variables available in the Insert variable menu, you can inject custom variables into your email templates using job args. This is particularly useful for dynamic content like payment links, conditional text, and other external data.

How it works

When using the API to run a workflow you pass an args data object with custom variables you want to inject into your email. You will then introduce the variable into the email’s subject or body with the following syntax: {{args.variable_name}}. If you need to provide a fallback in case the variable is not present, we recommend using the following syntax: {{ or args.value "Default value" }}. Let’s say you want to send an email with a custom payment link. Here’s how to set it up:
1

Configure your email template

In the email body field you can use both the document’s variables (in this case customer_name, full_code and supplier_name) and custom variables such as {{args.payment_link}}.
Email step configuration

Body field example with custom arguments

2

Execute the job with custom args

Arguments (args) are key-value pairs tailored to specific applications, in this case we are creating a payment_link which will be available to the Email App. Create the job via API with the proper payload:
3

Verify result

The email recipient should receive an email with the following content:
Key points
  • Use {{args.variable_name}} syntax in email templates for custom variables
  • Include the same variable names in the args object when executing the job via API
  • Custom variables work in both email body and subject fields
  • Variable names must match exactly between template and API payload

Receiving invoices by email

The Email app receives invoices for your parties. Each registered party gets an address of its own, such as clip.apple.leap@invopop.email, and every invoice sent there is imported into your workspace, with that party as the customer. It suits accounts payable: give a supplier the address, and their invoices arrive as silo entries. It uses three steps: Register incoming endpoint gives a party its address, Import incoming document imports each invoice that arrives, and Unregister incoming endpoint releases the address.

Setup

1

Create the import workflow

This workflow runs once for each invoice received. The Import incoming document step turns the document into GOBL, sets the receiving party as the customer, and attaches the files that came with it.

Email receive invoice workflow

Add to my workspace →
2

Configure receiving in the Email app

In Configuration → Apps, open the Email app’s Configure page. Under Providers, in the Incoming section, add an incoming email connection: choose Invopop as the provider, and the import workflow from the previous step. Only workflows with the Import incoming document step are offered.
Add incoming email form with the Invopop provider and the Receive supplier invoices workflow

An incoming connection

3

Register your parties

Run the registration workflow on each party (an org/party entry) that should receive invoices. The Register incoming endpoint step:
  • uses the party’s own address when it already has an email endpoint (mailto:) on the Invopop domain, unless another party holds it;
  • fails when the party’s email endpoints are all on other domains, as mail to those can’t reach Invopop: remove them, or add one on the Invopop domain;
  • otherwise creates a new address;
  • adds the address to the party’s meta, with a mailto: link. The party document isn’t changed.
Running it again on a registered party is skipped and not charged. A registered party is charged 20 pops a month. When the app has more than one incoming connection, choose the connection in the step’s settings.

Email register party workflow

Add to my workspace →
4

Share the address

Give the address to whoever sends the party’s invoices. Every registered address is listed in the Email app’s Endpoints tab, with its party.
Endpoints tab listing two addresses on invopop.email, each with its party and the Receive supplier invoices workflow

Two registered parties

Each email that reaches it is listed in the Email app’s Messages tab, with the jobs it started. An email with nothing to import is listed as skipped, with the reason.
Messages tab: three emails from suppliers with one job each and a done status, and a payment reminder skipped with No attachment to import

Three invoices imported, and a reminder with nothing to import

Click a message to see who sent it, whether the sender was verified, the jobs it started, and its files.
Message panel: from Northwind Trading Co., sender verified, subject Invoice NW-2041, one job, status Done, and the file NW-2041.json

A received email

What gets imported

Each invoice in an email becomes one job on the import workflow:
  • GOBL documents (JSON) are stored as they are.
  • XML invoices, such as UBL or CII, are converted to GOBL.
  • PDFs that carry their invoice as a file, such as Factur-X or ZUGFeRD, are converted from that file.
  • A PDF sent with its XML is attached to the XML’s entry rather than imported on its own. They are matched by file name, by invoice number, or as the only XML and PDF in the email.
An XML that can’t be converted fails its job with the reason, and the PDF sent with it isn’t read instead. Anything else, such as a scanned PDF or a photo, fails its job saying the file couldn’t be processed, and isn’t charged. Logos and images in the email’s body are left out, as are file types the app doesn’t take, and emails with no sender. An email with several invoices in one PDF is split into one job per invoice. Up to 20 files are read from each email, each up to 25 MB.

Unregistering a party

The Unregister incoming endpoint step releases the party’s address and removes it from the party’s meta. Email sent to the address afterwards is ignored.

Email unregister party workflow

Add to my workspace →

FAQ

Send via Email in the error handler: to finance@acme.example, subject Error on invoice full_code, body listing the faults, no attachments

Send via Email configuration in a workflow's error handler

Add a Send via Email step to the error handling area at the end of your workflow. The error handler only runs when something upstream fails, so the email is sent just for failed jobs. Alternatively, if you handle the exception, add it in the exception handling area nested in the step.Configure the step like this:
  • To — your own address (or a shared inbox / distribution list).
  • Subject — write a short label such as Error on invoice. You can use the Insert variable button to append the Full Code so you can identify which document failed.
  • Body — describe the problem, then use Insert variable to add the Full Code and the Faults variable. Faults expands into the list of errors that caused the job to fail, so you get the full reason without opening the console.
For example, a body of Invoice [Full Code] has the following errors: [Faults] produces a message naming the document and listing every error.Once saved, any job that fails will trigger this step and send you the error details automatically.
We strive to make our sandbox workspaces as similar to our live workspaces as possible. However, in order to prevent abuse and email mistakes, the following differences should be observed in Sandbox:
  • Emailing customers is disabled in sandbox workspaces.
  • Emailing suppliers is disabled in sandbox workspaces.
  • Invoice PDFs will have a “Sample” watermark.
  • [Invopop Test] will be prepended to the subject.
Follow the instructions in this support guide. Setting up an SMTP relay allows you more fine-grained control over your email needs and has the largest quota (up to 10,000 recipients per day); but can only be set up by an account administrator.Gmail’s SMTP server allows up to 2,000 emails per day. It can be set up by an end-user by creating an app password and using the set-up configuration listed in the Google support guide.
Follow the instructions found in Using the Amazon SES SMTP interface to send email
This means the job’s args key/value pair was not set. Ensure that you pass a value, even if it’s empty:
Alternatively, you can handle undefined args by using a fallback:

Participate in our community

Ask and answer questions about email integration →