Create Invoice PDF failed

  1. My invoice copied from quote and invoice - create pdf copied from send custom email

Could not execute automation: workflow 392545978102185985 step 22 execution failed: invalid module field

referenced this but cant work.

possible to provide a detailed example of how to create pdf for quotes?

  1. i have a difficult time getting to send, always with timeout. how to remedy too?

@tjerman any help pls?
@Lenny pls help

your field name is document, not Document.
The type for your content parameter should be Reader.
Does this resolve it?

Never used that one before so can’t help. As long as you give Corteza a valid SMTP it shouldn’t care what provider it is.

“Reader” still having issue.

basically how do i download pdf from the quote / invoice (which i hv created?)
i created the “PDF module” because i saw somewhere u cant download directly.

so still stuck. any help?
which workflow has a way to upload attachment as example? i cant find anything about “Note”

That’s not what I meant…
I meant you changing the parameter type, not the variable name.

If not, do note down what the issue is.

That’s true; we don’t have a function to download directly.


still having issues with the error.

Module Name of PDF with 1 Document field remains same. can you check what’s wrong?

p.s. : if NOTE is a workflow, that’ll be great as reference on how to get file uploaded etc.

export the workflow and send it through


Create invoice workflow i copied from create quote from opportunity


I’ve skimmed through it and it seems to me like you’re referencing the record of the wrong module when attaching the attachment.

          "stepID": "22",
          "kind": "function",
          "ref": "attachmentCreate",
          "arguments": [
              "target": "name",
              "value": "invoice.pdf",
              "type": "String"
              "target": "resource",
              "expr": "record",
              "type": "ComposeRecord"
              "target": "fieldName",
              "value": "Document",
              "type": "String"
              "target": "content",
              "value": "pdf.Document",
              "type": "Reader"
          "results": [
              "target": "attachment",
              "expr": "attachment",
              "type": "Attachment"

since your trigger runs for invoices

          "constraints": [
              "name": "namespace.handle",
              "op": "=",
              "values": [
              "name": "module.handle",
              "op": "=",
              "values": [

The workflow would always receive invoice records.
Since you’re trying to attach the file to a PDF module, this needs to be explicitly specified.

  1. make a fresh PDF record Function Reference :: Corteza Docs
  2. upload the attachment so it can be available to the record Function Reference :: Corteza Docs
  3. use an expression to set pdfRecord.values.Document (assuming pdfRecord would be the result of step 1)
  4. create the newly made PDF record Function Reference :: Corteza Docs

This should resolve the concrete issue; I didn’t check for any other

@tjerman how about u export your version that will work for us to try and see?

i actually dont understand anything u just mentioned.
it’s very confusing.

can u export something working with “quote” generate pdf quote is fine as well. will use your workflow and modules.

pls export both for “quote” will do fine. i will figure out how to do for invoice.


p.s. : if only there’s a default demo example already given in the installation, this will really help ease things as we have references to work with. all the given parameters are too many. really need a way to have examples to follow. i’m totally newbie and needed too much work on figuring out myself on too many things.

I don’t have a me version so I’d need to build it… I can when I get some spare time but it won’t be timely.

As a side note; if these things are too confusing, if you’re trying to build something specific, it might be worth teaming up with someone who has more experience with Corteza. We offer a support contract if you want dedicated support

will wait for urs. thx in advance. can u pls specify an eta for this? thx