LogoLogo
  • Introduction to the Ebbot Platform
  • Ebbot Platform
  • Bot basics
    • Scenarios
    • Entities
    • Triggers
    • Training center
  • Scenarios
    • Cards and syntax
      • File Input
      • Text card
      • Input
      • Buttons
      • Image
      • File
      • Carousel
      • Location
      • List
      • Contact Agent
      • Rating request
      • Custom component
      • CoBrowsing
    • Transition
    • Card properties
  • AI Insights
    • Setup and Configuration
    • Using the Insights Dashboard
  • EbbotGPT
    • Knowledge
      • Data source transformer
      • Source types
        • File
        • Website scrape
        • Docx file
        • TOPdesk API
        • Sitevision API
        • SharePoint API
          • Create app with Sites.FullControl.All permission in Azure
          • Ebbot SharePoint Postman Guide
        • Confluence API
    • Configurations
    • Persona
    • GPT Evaluation
    • Embedder models
    • EGPT models
  • Custom vocabulary
  • Tutorials
    • Create your first scenario
      • Select a trigger
      • Add bot responses
  • Data Object
  • Release notes
  • For developers
    • Ebbot SDK
    • Safe Exchange API / Vault
    • Subdomain manager
  • EbbotGPT API
  • Chatbot & Live chat
    • Install chat widget
    • Chats API
    • Chat widget API
    • Datasource API
    • Sales tracking for live chat
    • Webhook
      • Incoming webhooks
      • Outgoing webhooks
    • SMS API
      • Authentication
      • Send SMS
      • Errors
      • Encoding
    • Python components
    • Intent detection (NLP)
  • Product guides
    • Product data feeds
    • Install guide
    • Product guide events
      • Product guide user events
      • Received events
      • Send events
    • API & webhooks
    • GA4 integration
    • Klaviyo integration
  • Messenger marketing
    • Install popup
    • API & webhooks
  • For chat agents
    • Ebbot Chat
      • Settings modal
      • Queue
      • Topbar Stats
      • Menu
        • Power-Ups!
        • Quick Replies
  • INTEGRATIONS
    • Ebbot Live Chat in Zendesk
      • Setup guide
    • Active Directory - SAML
    • Configure SAML in Azure
Powered by GitBook
On this page
  • Multi File Input
  • Data object

Was this helpful?

  1. Scenarios
  2. Cards and syntax

File Input

PreviousCards and syntaxNextText card

Last updated 4 years ago

Was this helpful?

Multi File Input

Prompt the user to upload a number of files (1-10) of one or more specific mime (file) types.

Syntax

[
    {
        "id": "b3792de1-f8bd-4752-a531-b918fb2ks2jz",
        "name": "state_1616140357083",
        "component": "ebbot_multi_file",
        "properties": {
            "mimeType": "application/pdf,image/png",
            "ask_again": false,
            "minFiles": 1,
            "maxFiles": 3,
            "text": "Upload your files please",
            "disclaimer": "You're allowed to upload 1-3 files. Only PDF and PNG file types are allowed in this example.",
            "output": "uploaded_files",
            "uploadText": "Choose files",
            "submitText": "Submit files"
        }
    }
]

What the chat user will see:

  • Headline text (description)

  • Disclaimer text (disclaimer)

  • Browse file button text (upload button text)

  • Submit file button text (submit button text)

In the scenario editor you will be able to set the settings above, as well as:

  • A range of files to allow the user to upload (with a maximum of 10).

  • Which mime (file) types that the users are allowed to upload using that multi file input card.

    • If the mime type you would like to allow for upload is not present in the dropdown menu, you can add it manually in the code editor.

  • Name of the variable (in the data object) where the file information is saved.

Data object

The file objects stored in the data object will in this example look like the example below.

The individual file objects contain:

  • 'label' (file name)

  • 'mimetype'

  • 'size' (in Bytes)

  • 'url' (to the file)

The files are stored in an array in uploaded_files (the variable name you set in the card settings) -> files -> array.

...
'db': {
    'uploaded_files': {
        'files': [{
            'label': '1615980339237_1615890209161_name_of_first_file_1615980339237_1615890209161.pdf',
            'mimetype': 'application/pdf',
            'size': 13831,
            'url': 'https: //url_to_the_file.com/'
        }, {
            'label': '1615980339237_1615890209161_name_of_second_file_1615890209232_1615980339327.png',
            'mimetype': 'image/png',
            'size': 9473,
            'url': 'https: //url_to_the_file.com/'
        }]
    }
...

In order to use the files you need to create a custom component and parse the data above from the data object.