Setup Instructions
Step 1: Add the Plugin ElementAdd the plugin element 'JsonConversor' to your Bubble app page where you want to use the conversion functionality.
Step 2: Convert File to JSON (Optional)Fill in the 'File' field if you want to extract the JSON text from an Excel, CSV, or PDF file. When this field is filled in, the JSON text will be automatically stored in the "JSON Content TXT" state.
Step 3: Convert JSON to File (Optional)Trigger the 'Convert JSON Text to Any File' action to convert JSON text content into a .json, .txt, Excel, CSV, or PDF file. After the conversion is complete, the file will be stored in the element's 'File' state.
Use CasesFile to JSON Conversion1. User uploads a CSV, Excel, or PDF file
2. Plugin automatically detects the file type
3. File data is converted to JSON format
4. JSON text is available in the "JSON Content TXT" state
JSON to File Export1. Provide JSON text content (either from previous conversion or custom JSON)
2. Trigger the "Convert JSON Text to Any File" action
3. Select desired output format (.json, .txt, .csv, .pdf, .xls, .xlsx)
4. Specify file name
5. Generated file is stored in the "File" state
Error HandlingThe plugin includes robust error handling mechanisms:
- Unsupported file types are detected and reported through the "Error" state
- Processing errors trigger appropriate events for workflow handling
- States are automatically cleared when errors occur to maintain data integrity
Best Practices
- Always check the "Error" state after file upload to handle any issues gracefully
- Use the provided events to create responsive workflows that react to successful conversions or errors
- Test with various file formats to ensure compatibility with your use case
- When exporting to PDF or Excel, ensure your JSON structure is compatible with tabular format