Roboteka
Roboteka · Robots · Download file from URL and attach to CRM card

Download file from URL and attach to CRM card

The Download file from URL and attach to CRM card robot downloads a file from a link and attaches it to a file field of a CRM entity (deal, contact, company, lead) in Bitrix24 (Alaio) business processes and robots. It takes the URL, entity type, ID, file field code and file name. It returns a success flag (Y/N) and the name of the attached file. Does not run in demo mode.

The robot downloads a file from a given link and immediately attaches it to a file field of a deal, contact, company or lead — without uploading to the card by hand. Provide the file URL, the entity type (deal / contact / company / lead), its ID, the file field code (e.g. UF_CRM_DOCS) and, optionally, the file name (if left empty it is taken from the URL). Only http and https links are supported; redirects are checked on every hop, the download size is capped, and on an HTTP error or an empty response no file is attached. Typical use cases: pull an invoice or a contract into a deal from a link in an external system, attach to a contact a document generated by a third-party service. The robot returns a Y/N flag and the file name — check them in the condition of the next step. Does not run while Bitrix24 (Alaio) is in demo mode.

What input parameters does the robot accept?

Parameter Type Required? Default
File URL string yes
Entity type: deal / contact / company / lead string yes
Entity ID int yes
File field code (e.g. UF_CRM_DOCS) string yes
File name (leave empty to extract from URL) string —

What does the robot return?

Parameter Type
Success (Y/N) string
Name of the attached file string

What errors can the robot return?

The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.

  • Error: invalid parameters
  • Error: HTTP {code}
  • Error: too many redirects
  • Error: empty response body
  • Error: file exceeds {max} bytes
  • cURL error: {error}
  • This robot does not run while Bitrix24 is in demo mode or if the plan could not be determined.

Scenario: attaching a contract to a deal

  1. A deal enters the Signing stage
  2. The robot downloads the PDF contract from a URL in an external service
  3. The file is attached to the UF_CRM_DOCS field, the process continues on a Y flag

Related robots

Related articles