Skip to content

Sellsy ​

Finds or creates a company, creates a contact or an opportunity, finds an invoice and its PDF, attaches an email’s files to a Sellsy record.

The Sellsy node connects the mailbox to Sellsy’s CRM and invoicing: it finds or creates a company (prospect, customer or supplier), creates a contact or an opportunity, finds an invoice by its number with its PDF, and attaches an email’s files to a record.

See Sellsy to create the connection.

At a glance ​

  • Type: sellsy.api · version 1
  • Category: Data
  • Kind: Step — one stage of a run
  • Effect: Writes outside (external_write) — writes outside Loop & Roll; described instead of performed during a test run
  • Needs a carrier email: No
  • Connection: Sellsy
  • Inputs: main
  • Outputs: main
The ports of “Sellsy”: what comes in on the left, what goes out on the rightInput: main. Outputs: main. An error output appears when its failure setting is “Follow the Error output”. It needs a Sellsy connection.Sellsysellsy.apimainmainerror · only with “Follow the Error output”Connection: Sellsy
The ports of “Sellsy”: what comes in on the left, what goes out on the right

Connection ​

This node needs a Sellsy connection.

Parameters ​

connection ​

Sellsy connection — The Sellsy connection to use. Create it once in Connections; its key never appears in the workflow.

  • Type: Connection (credential)
  • Required: Yes
  • Default: "" (empty)

action ​

Action

  • Type: One choice (options)
  • Required: Yes
  • Default: company.find
  • Options:
    • company.find — Find a company
    • company.create — Create a company
    • contact.create — Create a contact
    • opportunity.create — Create an opportunity
    • invoice.find — Find an invoice by number
    • file.attach — Attach files to a record

name ​

Name — The company name (exact search) or the opportunity name.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 250 characters at most
  • Shown when: action is one of company.find, company.create, opportunity.create
  • Expressions: {{ }} accepted

email ​

Email address

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 320 characters at most
  • Example: {{ email.from.email }}
  • Shown when: action is one of company.find, company.create, contact.create
  • Expressions: {{ }} accepted

companyType ​

Kind

  • Type: One choice (options)
  • Required: No
  • Default: prospect
  • Options:
    • prospect — Prospect
    • client — Customer
    • supplier — Supplier
  • Shown when: action is company.create

firstName ​

First name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 100 characters at most
  • Shown when: action is contact.create
  • Expressions: {{ }} accepted

lastName ​

Last name

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 100 characters at most
  • Shown when: action is contact.create
  • Expressions: {{ }} accepted

phone ​

Phone

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of company.create, contact.create
  • Expressions: {{ }} accepted

note ​

Note

  • Type: Long text (text)
  • Required: No
  • Default: "" (empty)
  • 10000 characters at most
  • Shown when: action is one of company.create, contact.create, opportunity.create
  • Expressions: {{ }} accepted

pipeline ​

Pipeline

  • Type: Remote resource (resourceLocator)
  • Required: Yes
  • Ways to choose: pick from a list, type an ID (sellsy.pipeline)
  • Listed with the connection in: connection
  • Shown when: action is opportunity.create

step ​

Step

  • Type: Remote resource (resourceLocator)
  • Required: Yes
  • Ways to choose: pick from a list, type an ID (sellsy.step)
  • Listed inside: pipeline
  • Listed with the connection in: connection
  • Shown when: action is opportunity.create

relatedType ​

Linked to

  • Type: One choice (options)
  • Required: No
  • Default: company
  • Options:
    • company — A company
    • individual — An individual
  • Shown when: action is opportunity.create

relatedId ​

Company or individual ID

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 20 characters at most
  • Example: {{ data.<step>.companyId }}
  • Shown when: action is opportunity.create
  • Expressions: {{ }} accepted

amount ​

Potential amount

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 30 characters at most
  • Shown when: action is opportunity.create
  • Expressions: {{ }} accepted

invoiceNumber ​

Invoice number

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 60 characters at most
  • Shown when: action is invoice.find
  • Expressions: {{ }} accepted

attachPdf ​

Fetch the PDF — Adds the invoice PDF to the run, so an email can attach it.

  • Type: Yes / no (boolean)
  • Required: No
  • Default: false
  • Shown when: action is invoice.find

target ​

Record type

  • Type: One choice (options)
  • Required: No
  • Default: companies
  • Options:
    • companies — Company
    • contacts — Contact
    • opportunities — Opportunity
    • invoices — Invoice
    • estimates — Quote
  • Shown when: action is file.attach

recordId ​

Record ID

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 20 characters at most
  • Shown when: action is file.attach
  • Expressions: {{ }} accepted

attachmentPosition ​

Attachment — The position of one attachment of the run. Empty: all the email’s attachments (ten at most).

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 10 characters at most
  • Shown when: action is file.attach
  • Expressions: {{ }} accepted

Outputs ​

  • main — Taken once the call to Sellsy succeeds, whatever the action. An error response from Sellsy fails the step instead.

Data produced ​

What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).

  • {{ data.<step>.found }} — boolean. Find a company, Find an invoice: true when an item matches.
  • {{ data.<step>.company }} — { id, name, type, email, phone, createdAt }. Find a company: the first one found (null otherwise). Create a company: the company created.
  • {{ data.<step>.companyId }} — string. Find or create a company: its Sellsy ID, to pass to Create an opportunity. Empty when nothing is found.
  • {{ data.<step>.companies }} — array of { id, name, type, email, phone, createdAt }. Find a company: the companies found, ten at most.
  • {{ data.<step>.contactId }} — string. Create a contact: its ID.
  • {{ data.<step>.opportunity }} — { id, number, name, status, amount, createdAt }. Create an opportunity: the opportunity created.
  • {{ data.<step>.opportunityId }} — string. Create an opportunity: its ID.
  • {{ data.<step>.invoice }} — { id, number, status, date, dueDate, subject, companyName, totalExclTax, totalInclTax, pdfLink, publicLink, createdAt }. Find an invoice: the invoice, null when none has that number.
  • {{ data.<step>.invoiceId }} — string. Find an invoice: its ID, empty when nothing is found.
  • {{ data.<step>.attachmentPosition }} — number. Find an invoice with Fetch the PDF: the PDF position in the run, to cite in Compose. null otherwise.
  • {{ data.<step>.fileIds }} — array of string. Attach files: the Sellsy IDs of the files uploaded.
  • {{ data.<step>.count }} — number. Attach files: the number of files sent.
  • {{ data.<step>.simulated }} — boolean. Creations and Attach: true when the write was described instead of done (test run).
  • {{ data.<step>.summary }} — string. The one-line summary in the member’s language (with summaryKey and summaryParams).

Operations ​

The node has a single Action parameter (action). Each action calls the Sellsy API v2 with the connection’s token.

  • Find a company (company.find, the default) by Name or Email address (exact search), ten results at most.
  • Create a company (company.create): Name required, Kind prospect (default), customer or supplier, email, phone, note.
  • Create a contact (contact.create): Last name required, first name, email, phone, note.
  • Create an opportunity (opportunity.create): Name, Pipeline and Step picked from lists, Linked to a company or an individual by its ID, optional Potential amount and note.
  • Find an invoice by number (invoice.find); Fetch the PDF adds its PDF to the run.
  • Attach files to a record (file.attach): company, contact, opportunity, invoice or quote, by its ID. Attachment empty: all the email’s attachments, ten at most; otherwise the attachment at that position.

Example ​

A prospect writes for the first time. A company node creates the company (company.create, name {{ email.from.name }}, email {{ email.from.email }}), then a second one opens the opportunity:

text
action       opportunity.create
name         Request from {{ email.from.name }}
relatedType  company
relatedId    {{ data.company.companyId }}

Tips ​

  • Testing. Searches go out for real in a test run; creations and file uploads are only described (simulated is true).
  • Amounts. The potential amount accepts 1234.50 as well as 1 234,50; an unreadable value is not sent.
  • Files. 15 MB at most per file. No matching attachment fails the step with node_invalid_param.
  • Search before creating. Retrying the step after a successful creation can create a duplicate.
  • Errors. integration.unauthorized: the client ID or secret was refused, check the connection. integration.rejected: Sellsy refused the request (missing field, invalid value), fix the settings. integration.rate_limited and integration.unavailable are retried automatically. An empty required parameter or an ID that is not a whole number fails the step with node_invalid_param, before any call. See Error handling.

Loop & Roll — the workflow builder for email.