Attempting to open a pod when an email is received.

I'm using Make.com to open a pod when emails are received by a certain account (open to solutions other than make.com but its the service I went with). I am unsure of how to set up the API. Currently I have a http widget set up to make a request to runpod but I think I'm simply sending the wrong request. The way I have it set now is: Method: POST URL: https://api.runpod.io/graphql Headers: Name: Authorization Value: Bearer YOUR_API_KEY Name: Content-Type Value: application/json Body Type: raw Body Content: { "query": "mutation { podFindAndDeployOnDemand(input: { gpuCount: 1, machineType: "NVIDIA-RTX3090", templateId: "first test" }) { id status } }" } Would love some help on this or alternative ways to achieve the same!
4 Replies
digigoblin
digigoblin5mo ago
What is the issue? Are you getting an error? There are some examples here: https://github.com/ashleykleynhans/runpod-api
GitHub
GitHub - ashleykleynhans/runpod-api: A collection of Python scripts...
A collection of Python scripts for calling the RunPod GraphQL API - ashleykleynhans/runpod-api
shortdwarf
shortdwarfOP5mo ago
I received: Status code 500 HeadersArray 1Collection Name date Value Wed, 26 Jun 2024 06:27:05 GMT 2Collection Name content-type Value text/html; charset=utf-8 3Collection Name content-length Value 21 4Collection Name connection Value close 5Collection Name x-frame-options Value SAMEORIGIN 6Collection Name content-security-policy Value frame-ancestors 'self' 7Collection Name etag Value W/"15-/6VXivhc2MKdLfIkLcUE47K6aH0" 8Collection Name x-powered-by Value Express 9Collection Name apigw-requestid Value Z9ks_gFaIAMEbIw= Cookie headersArray Empty Data Internal Server Error fileSize 21 I think this link you sent will be immensely helpful once I get a bit better of an understanding since I am trying to use it for dreambooth training
nerdylive
nerdylive5mo ago
Wow mails aren't safe to receive command without adding extra conditions like maybe it will only accept your email only
digigoblin
digigoblin5mo ago
Yeah and delivery is not gauranteed either. Better to use a webhook if you can, and if you're relying on RunPod low balance emails, then rather use GraphQL and a cron job to query your balance. I use GraphQL + cron jobs. No emails.
Want results from more Discord servers?
Add your server