Integrating file uploads from Zapier to Chatfuel via JSON webhook

I’m working on connecting Zapier with Chatfuel to handle file transfers and running into some issues with the final step.

My current workflow:

  1. Set up Zapier webhook to receive JSON POST data from Chatfuel
  2. Use JavaScript code to format file URL as JSON object
  3. Configure POST webhook in Zapier to send data back to Chatfuel

The problem is happening at step 3. From what I understand, Chatfuel doesn’t accept plain JSON responses and requires the returned values to be mapped to specific attributes or fields.

Has anyone successfully implemented this type of integration? What’s the proper way to structure the response so Chatfuel can process it correctly? I’ve been trying different approaches but keep hitting the same wall.

Any guidance on the correct JSON structure or alternative methods would be really helpful. Thanks in advance!

I ran into this exact same issue about six months ago when building a document processing bot. The key insight that solved it for me was understanding that Chatfuel expects the JSON response to match the attribute names you’ve defined in your bot’s flow. Instead of sending generic JSON, you need to create custom attributes in Chatfuel first, then reference those in your webhook response. For example, if you create a custom attribute called ‘file_url’ in your Chatfuel bot, your Zapier response should return something like {“file_url”: “https://your-file-link.com”}. The webhook URL in Chatfuel should then be configured to capture this specific attribute. Make sure you’re using the correct webhook format in your Chatfuel block settings - it should be set to ‘JSON API’ not ‘User Input’. This approach worked reliably for me with various file types including PDFs and images.

yea, chatfuel’s super picky about its json. u gotta return keys that align with what ur bot has. try structuring it like {"messages": [{"text": "your file url here"}]} or whatever ur block needs. it all comes down to exact names in chatfuel.

Another approach that worked for me is using Chatfuel’s built-in variables system instead of custom attributes. When your Zapier webhook sends the response back, structure it as {“redirect_to_blocks”: [“block_name”], “set_attributes”: {“your_variable”: “file_url_here”}}. This method lets you control both the flow and data assignment in one response. I found this more reliable than relying solely on attribute mapping because it gives you better error handling. The redirect_to_blocks parameter ensures the conversation continues smoothly even if there are issues with the file processing. One thing to watch out for is webhook timeout - Zapier sometimes takes longer than Chatfuel expects, so consider adding a delay step in your Zap before the final POST request.