Skip to content

Deliver Documents sends the documents named in a table: by email as an attachment, or as a copy into a folder of a document account. Each document goes to each target once. Run the step as often as you like: a document already delivered to a target is not sent there again, and one that failed is tried again on the next run.

The General tab has four sections.

  • What to do — the Action: Deliver documents or Settle documents left in doubt.
  • Documents — the Table that names the documents, one row per delivery. ▸ Column names (only if different) opens a field for each column, for a table whose columns have other names.
  • Email — the Subject (PlaidCloud document when left blank) and Message (the subject when left blank) of each email. Both can use variables.
  • Output — the Result table, with one row per row of the table: key, document_account, document_path, channel, target, status, attempts, last_error and delivered_at.
Column Holds
document_account The document account the document is in.
document_path The document’s path in that account.
channel email or account. Blank is email.
target For email, the address to send to. For account, the document account to copy into.
target_path For account, the folder in the target account.
Key Optional: the delivery’s own key, from the column you name in Key column under ▸ Column names (only if different). When delivering, no column is read as the key unless you name it there.

To deliver to a document account, you need write access to it.

Every delivery has a key. Unless you name a Key column, or for a row with no value in it, the key comes from the project, the document, its content, the channel and the target, so a changed document is a new delivery and an unchanged one is never sent to the same target again. When you name a Key column and a row has a value in it, the key is that value with the project, the channel and the target, so the content doesn’t matter: a row whose key and target were already delivered is not sent again, even for another document, and a warning names the document that was delivered.

Each row gets a status in the result table:

  • delivered — sent in this run.
  • kept — already delivered by an earlier run, so not sent again.
  • failed — the send failed. last_error says why, and the next run tries it again. When any delivery fails, the step ends with an error that counts them, so the step’s retry policy runs it again; running it again never sends a delivered document a second time.
  • not_found — there’s no file at the document path, with a warning naming it.
  • sending — in doubt (see below).

A row with no document account, path or target, a channel other than email or account, a key that is too long, or, for account, a folder column you named that the table lacks is marked failed, and the step names the first few such rows and counts the rest: in its warning, or in its error when a delivery also failed. Running the step again doesn’t change them; fix the table.

A delivery is recorded as sending before it is sent. A run that stops between sending a document and recording the result leaves it sending, because PlaidCloud can’t tell whether it went. A delivery in doubt is never sent again on its own: the step warns at each run until you settle it, naming the first few keys held and counting the rest.

To settle, check whether the document arrived, then run the step with Settle documents left in doubt on a table with two columns:

  • key — the delivery’s key, from the result table or the warning.
  • status — delivered if it arrived, or failed to send it again on the next delivery run.

Only a delivery that is still sending, in this project, is changed. A key that isn’t found, or a delivery in another state, is left as it is with a warning, and a row with no key, or a status other than delivered or failed, is marked failed with a warning.

The step follows the run’s posting mode:

  • Live delivers or settles.
  • Simulate sends nothing and records nothing. A delivery that would be made shows as would_deliver, and the step finishes with the warning Simulate: nothing was sent. (or Simulate: nothing was settled.).
  • Off skips the step.

A Table that isn’t there, or that has no columns or no rows, isn’t an error: the step finishes with a warning and delivers nothing. A table that lacks a column the action needs ends the step with an error that names the column. A key or channel column you named that the table lacks finishes the step with a warning, and nothing is delivered.