Telegram accept only text messges
Hello I want to prevent image or documents going through the flow because it jams it
I guess I can use somehow the request body, just don't know how
3 Replies
AI Support Bot Information
<@806245769626517566> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human!
Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers.
Please note: Team members will review and answer the questions on best efforts basis.
AI Response
To prevent images or documents from going through your workflow, you can set up a condition in your BuildShip workflow that checks the request body for specific content types or file extensions. Here are the general steps you can follow:
1. Add a Conditional Node: Add a conditional node to your workflow that will evaluate the request body.
2. Check Content Type: In this conditional node, you can check the
Content-Type
of the incoming request. If it indicates an image or document, you can branch the flow accordingly. Typical content types for these might be image/jpeg
, image/png
, application/pdf
, etc.
3. Check File Extensions: Alternatively, if the request body contains file information, you might check for file extensions (e.g., .jpg
, .png
, .pdf
) within the data payload.
4. Branch the Flow: If an image or document is detected, you can branch the flow to either discard the data, return an error response, or perform any other handling you'd prefer for such cases.
5. Test Your Workflow: Once set up, test the workflow with sample data that contains both allowed and disallowed content types to ensure it behaves as expected.
If you need more specific guidance on how to configure these steps within your existing setup, I can help further if you provide additional context or details about your current workflow.
BuildShip AI Support
Solution
Hey, happy to dicuss with that. Please send me a private message.