Question

Python

  • 17 December 2023
  • 5 replies
  • 384 views

Userlevel 1

Hello,

I am trying to make a zap with some Python code.

when I run : import pandas as pd I get this: ModuleNotFoundError: No module named 'pandas'

Is the panda module not supported by Zapier Python code ?

If yes how can I get it working ? If not can you add it ?

thanks !

Thierry


5 replies

Userlevel 7
Badge +14

Hi @Thierry_30160 

Good question.

Help: https://zapier.com/apps/code/help

Limitations with Code steps

  • You cannot require external libraries or install libraries commonly referred to as "pip modules". Only the standard Python library and requests are available in the Code app and requests is already included in the namespace.
  • There are different Code rate limits and throttling, depending on what Zapier plan you’re on. Your Zap will error if it exceeds these limits.
Userlevel 1

I think the missing libraries here is a big deal and a blocker for me. 

Adding pandas would get me halfway and probably be useful for many others. But I need to add a couple of other libs too. 

It’s a great tool, but I’ve hit a bit of a brick wall here.

Userlevel 1

hanks for your quick answer.

It really is a shame not to be able to access this libraries :-(

I might have to use another tool than zapier then ...

 

Userlevel 1
Badge

Dear @Thierry_30160 ,

 

Regarding your issue, there are a few different ways to go about it:

 

    Direct Approach:

        Switch to `urllib` in Python: While it's true that `urllib` isn't as straightforward as requests, it's still a solid option within Zapier. It does need more intricate

    coding, but it's quite capable of handling basic HTTP requests.

 

    Alternative Solutions:

        Try Out Zapier's "Webhooks": Zapier's "Webhooks by Zapier" could be a simpler solution. This feature allows you to perform HTTP requests like GET, POST, and PUT directly

    This means you can avoid using Python for these specific tasks. Plus, for more complex data processing, you can combine these webhooks with Python scripts, offering you more versatility in managing intricate workflows.

 

    Useful Tool:

        I have found that when debugging and testing functionalities involving API requests; Using PostMan simplifies the process, it also provides automated scripts ina a variety of languages and frameworks, so once you have accomplished a successful test, you can easily copy and paste working blocks of code straight into the Zapier Python block.


 

Consider External Services for More Complex Needs: In cases where you need more than what Zapier offers, external platforms like AWS Lambda or Google Cloud Functions could be the other way to go, but that would depend on the scale and volume of your project requirements. They support comprehensive Python scripting along with a wider range of libraries. You can then integrate these services back into your Zapier workflows, giving you additional functionality.

 

Did these solutions fix your problem? If you need more help, feel free to contact us directly for support.

 

Best Regards,

Dillon Breytenbach

DashSquared Team

LinkedIn DashSquared

 

Userlevel 1
Badge

Hi @Thierry_30160 and @olly_shaw,

For your specific use-case I would suggest to give quik.run a try. Its a tool where you can create code snippets, import python libraries and it also provides direct integration with Zapier through which you can integrate that snippet directly in your Zap. 

 

Please refer to this blog to know more about QuikRun. If you'd like to learn more about the tool, feel free to connect with me at nparashar150@gmail.com or naman@quik.run, will be more than happy to resolve your issue. 

Reply