What is a file block?
The file block enables receiving responses in various file formats, such as videos, images, audios, and documents, allowing users to submit attachments in any required format. This block type ensures versatility in data collection and validation.
Why use the file block?
File blocks can be used to receive a file from the end-user. This block ensures that the user's input is validated as a file in an accepted format. By incorporating the file block, businesses enhance efficiency in handling diverse user needs, ensuring that all necessary information is processed according to specified requirements.
Steps to create a file block
1. Click the add block icon (+)
2. Choose File under the Question Cards section.
If you try to close the block listing without saving the audio block, unsaved changes will be lost permanently.
3. Add the Question in the question field.
4. Choose the Format options you want your user to send the file in and click Save.
GC approves the below audio formats. You can deselect the formats you don't need.
- Document: TXT, PDF, DOC, DOCX, ZIP, XLS, CSV, HTML, XML , PPT
- Image: JPEG, PNG, GIF, TIFF, BMP, HEIC
- Audio: MP3, WAV, AIFF, OGG
- Video: MP4, 3GP, AVI, MPG, MOV, MKV
WhatsApp approves files only in PDF
5. Add a unique name for your block in the Block name field.
6. Input variable will auto-populate according to the added block name. You can change it, if needed.
If you enter the name of an existing block for another block, the below error will be displayed.
7. Adjust the existing Validation Error Message to fit the context of your file block.
8. Click on the Preview block option to see how the block would be displayed to the user.
9. If you are satisfied with the output, click Save.
Files can be either dragged and dropped or attached. They cannot exceed 14 MB.
- If this block is not mandatory for your user to answer, toggle on the option to Skip Block. This option is not available for flows of WhatsApp, Telegram, and Facebook Messenger channels.
- If you want to keep this block as the end of your conversational flow, toggle on the End block option.
- For WhatsApp, Telegram, and Facebook Messenger, the limit should not exceed 10 MB.
Edit the file block
You can edit an audio block whenever required, even after the flow is published or in the drafts section, by following these steps:
1. Open the flow and click on Edit
2. Click the File Block, which you may have named differently.
3. Choose Edit Block from the displayed options.
4. Make the required changes to the block and click Save.
- If you edit a block while an end user is engaged in a live session with the bot, the previous version of the flow will be rendered until they restart the conversation.
- After making changes, it is necessary to republish the flow for those changes to be reflected in an end user's session.
- If a change is made to an input variable, it will be updated automatically across all flows where the variable is used.
Copy a file block
The Copy Block option can be used when you need to reuse a block that you previously created; you can copy that block and add it to your flow as it is or edit it according to the requirement.
1. Click on the File Block you wish to copy.
2. Choose the Copy Block option; the block will be pasted on the clipboard.
3. When you require to paste that block, click the Add block icon (+).
The pasted block would appear on the block listing section and be stated as From Clipboard.
4. Edit the block if required or simply click Paste.
- The copied file block can be pasted multiple times. If you no longer need to paste it, you can clear the clipboard by clicking the close icon corresponding to the clipboard option.
- When copying an existing file block, all of its content, including any variables, will be copied as is. You can edit it as needed before adding it to the flow. Since the names of each block must be unique, the word '_copy' will be added to the copied blocks automatically; this can be changed if required.
- If you have copied a block and it is in the clipboard, deleting the copied block later will also remove it from the clipboard.
Deleting the file block
1. Open the flow and click on Edit.
2. Click the File Block, which you may have named differently
3. Select Delete Block from the displayed options
4. Confirm deleting the selected block by clicking Yes, Delete it.
5. Click Save.
6. Publish the flow.
You can use the undo option to restore a deleted block as your following action, but not otherwise.
- If you delete a file block while an end user is engaged in a live session with the bot, the previous version of the flow will be rendered until they restart the conversation.
- After making changes, you will need to publish the flow for those changes to be reflected in an end user's session.
If the deleted block has dependencies, such as those given below, errors will be displayed.
Path below the block:
If the block was used to jump to a different flow:
Use case:
A customer from the online store Zylker Electronics received their order but encountered an issue. They immediately visited the website and started a conversation with the bot.
During the interaction, the customer reported that the gadget they received was physically damaged and making unusual sounds. Additionally, the package it came in was in poor condition. Among the available options, the customer chose to attach a video file to demonstrate all the issues at once.
Examples of the file blocks in a flow
Multiple issues
The package is damaged from all the sides. The gadget is physically damaged and is making unusual sounds.
Bot Prompt: Please upload a file addressing all the issues you are facing with the gadget.
Input given in the builder:
GC widget's output:
After the user adds the file and submits:
Best practices
- Clearly explain what type of files are needed and why. For instance, "Please upload your resume and cover letter in PDF."
- List all supported file types and any restrictions.
- Clearly specify maximum file size limits and offer tips for compressing files if needed.
- Inform users about how their files will be used, stored, and shared, ensuring compliance with data protection regulations.
Supported channels
The file block is supported in the following channels:
- WhatsApp
- Telegram
- Facebook Messenger
- LINE
- Instagram
- Business Messaging
A total of 500 blocks can be added in a flow. If you reach that count, you can use the jump block to create a new flow or delete unnecessary flows.