# Custom action - curl -F

**URL:** <https://forum.adalo.com/t/custom-action-curl-f/34348>\
**Category:** External Collections, Custom Actions & Collections\
**Created:** [December 7, 2022, 11:34pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348 "2022-12-07T23:34:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 7, 2022, 11:34pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/1 "2022-12-07T23:34:35Z")

</div>

Hello need help to make a custom action with this curl:

```auto
curl https://api.openai.com/v1/images/edits \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F image='@otter.png' \
  -F mask='@mask.png' \
  -F prompt="A cute baby sea otter wearing a beret" \
  -F n=2 \
  -F size="1024x1024"

```

where to insert the F curl?

---

<div class="post-metadata">

**Author:** ![Flawless](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/flawless/32/20131_2.png) [@Flawless](https://forum.adalo.com/u/Flawless)\
**Post date:** [December 8, 2022, 1:45pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/2 "2022-12-08T13:45:40Z")

</div>

Welcome to the community @dksstudios

Follow this documentation:

> **[Custom Actions](https://help.adalo.com/integrations/custom-actions-1)**
>
> Build custom actions that let you do things you can't do in Adalo - like use external services (APIs) to send emails, crop photos, generate IDs, or shorten URLs like in this walkthrough.

Also, @theadaloguy created a tutorial for this API: [How to use AI in your Adalo App](https://forum.adalo.com/t/how-to-use-ai-in-your-adalo-app/32934)

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 8, 2022, 2:35pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/3 "2022-12-08T14:35:53Z")

</div>

> [@dksstudios](#):
>
> `-F`

Thanks @Flawless , but in that adalo tuturial, nothing about the Curl - F , is a Filter ? ( where to insert that to get returne? @theadaloguy you can help? This is for image edit AI in Open ai.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Flawless](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/flawless/32/20131_2.png) [@Flawless](https://forum.adalo.com/u/Flawless)\
**Post date:** [December 8, 2022, 2:54pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/4 "2022-12-08T14:54:04Z")

</div>

You don’t use the curl, you use the custom action. Follow the video [Using the OpenAI API in Adalo is easy! Learn how to use artificial intelligence with no code. - YouTube](https://www.youtube.com/watch?v=gV1wxI4IWYU&t=305s)

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 8, 2022, 3:38pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/5 "2022-12-08T15:38:38Z")

</div>

yes @Flawless , I know about the custom action, and the tutorial you send is about text in open ai, thats ok, we can do that, and is easy.

But in this case, is for generate image in Open AI,  
first: we had made a custom action easy for generate images from prompt, ok, we get a image.  
second: After that we need to edit a image, bur we dont know where insert the -F and whats is the -F to get the image edited.

See: [OpenAI API](https://beta.openai.com/docs/guides/images/)

---

<div class="post-metadata">

**Author:** ![Flawless](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/flawless/32/20131_2.png) [@Flawless](https://forum.adalo.com/u/Flawless)\
**Post date:** [December 8, 2022, 4:49pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/6 "2022-12-08T16:49:01Z")

</div>

Based on his video, you should try to create the body json using the values.

```auto
{
"image":"🪄",
"mask":"🪄",
"prompt":"🪄",
"n":🪄,
"size":"🪄"
}

```

Replace all wands (🪄) with the magic text from the prompts you create.

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 8, 2022, 11:25pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/7 "2022-12-08T23:25:47Z")

</div>

thats in not a valid Json @Flawless

 ![Captura de ecrã 2022-12-08, às 23.24.50](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/6/4/6469a7bea5de65cd463a45fe8d381f076c27b1de.png)  
 ![Captura de ecrã 2022-12-08, às 23.24.40](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/a/f/afa5280f90ef5676ea0a91d995b5da5bf8d59eea.png)

---

<div class="post-metadata">

**Author:** ![Flawless](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/flawless/32/20131_2.png) [@Flawless](https://forum.adalo.com/u/Flawless)\
**Post date:** [December 9, 2022, 12:35am UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/8 "2022-12-09T00:35:46Z")

</div>

Switch the = for :

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 9, 2022, 12:52am UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/9 "2022-12-09T00:52:28Z")

</div>

yes I already make this before insert the topic in the forum.  
But the problem is the same this in not a json “body” custom action.

Need to understand where to insert the -F in the adalo custom action.

-F image=‘@otter.png’   
-F mask=‘@mask.png’   
-F prompt=“A cute baby sea otter wearing a beret”   
-F n=2   
-F size=“1024x1024”

because -d is json body

```auto
 -d '{
    "prompt": "a white siamese cat",
    "n": 1,
    "size": "1024x1024"
  }'

```

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 9, 2022, 1:01am UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/10 "2022-12-09T01:01:23Z")

</div>

-F, --form \<name=content\> (HTTP) **This lets curl emulate a filled-in form in which a user has pressed the submit button**. This causes curl to POST data using the Content-Type multipart/form-data according to RFC 2388. This enables uploading of binary files etc.

---

<div class="post-metadata">

**Author:** ![gambo123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/gambo123/32/25103_2.png) [@gambo123](https://forum.adalo.com/u/gambo123)\
**Post date:** [December 13, 2022, 2:48pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/11 "2022-12-13T14:48:53Z")

</div>

@dksstudios did you solve this? I’m facing the same issue 😏

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 13, 2022, 10:39pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/12 "2022-12-13T22:39:39Z")

</div>

No, I think maybe we have to insert the F ( paramet…) in Query Param.  
In Json, Ive try a lot of options and nothing.

What you think about?

Best Regards  
Ricardo

A 2022-12-13 14:59, Gam via Adalo escreveu:

---

<div class="post-metadata">

**Author:** ![gambo123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/gambo123/32/25103_2.png) [@gambo123](https://forum.adalo.com/u/gambo123)\
**Post date:** [December 13, 2022, 10:53pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/13 "2022-12-13T22:53:47Z")

</div>

Currently, I’m looking at using Zapier, to connect adalo to Firebase, then use a cloud function to make the call, and return the response in a firebase collection - and then update Adalo record.

It seems very complicated though. I wish this was supported through custom actions

---

<div class="post-metadata">

**Author:** ![gambo123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/gambo123/32/25103_2.png) [@gambo123](https://forum.adalo.com/u/gambo123)\
**Post date:** [December 13, 2022, 10:58pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/14 "2022-12-13T22:58:39Z")

</div>

I also tried setting the content-type as multipart/form but that didn’t work

---

<div class="post-metadata">

**Author:** ![gambo123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/gambo123/32/25103_2.png) [@gambo123](https://forum.adalo.com/u/gambo123)\
**Post date:** [December 15, 2022, 12:16pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/15 "2022-12-15T12:16:33Z")

</div>

@theadaloguy @Flawless do you have any tips on this? Still struggling with it

---

<div class="post-metadata">

**Author:** ![Flawless](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/flawless/32/20131_2.png) [@Flawless](https://forum.adalo.com/u/Flawless)\
**Post date:** [December 16, 2022, 2:14pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/16 "2022-12-16T14:14:57Z")

</div>

I can try playing with the API a little bit later and I’ll get back to you.

---

<div class="post-metadata">

**Author:** ![pford](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/pford/32/4648_2.png) [@pford](https://forum.adalo.com/u/pford)\
**Post date:** [December 16, 2022, 3:23pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/17 "2022-12-16T15:23:45Z")

</div>

You are correct here. Adalo custom actions do not currently support uploading multi-part form data like this and so they cannot be placed into a typical JSON object, header, or as query parameters. The best option for making this happen is to setup a Make, n8n, or Zapier webhook to receive this for you from a custom action, then setup a multipart form upload in a subsequent module/step.

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 17, 2022, 1:48am UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/18 "2022-12-17T01:48:31Z")

</div>

Thanks @pford , I was send a ticket to Adalo, to specify if that will be possible. Thanks for the sugestion, we go try by that way.

---

<div class="post-metadata">

**Author:** ![dksstudios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dksstudios/32/25127_2.png) [@dksstudios](https://forum.adalo.com/u/dksstudios)\
**Post date:** [December 17, 2022, 2:26pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/19 "2022-12-17T14:26:29Z")

</div>

> [@pford](#):
>
> n8n

@Flawless and @gambo123 the solution will be like @pford says.

---

<div class="post-metadata">

**Author:** ![gambo123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/gambo123/32/25103_2.png) [@gambo123](https://forum.adalo.com/u/gambo123)\
**Post date:** [December 17, 2022, 2:42pm UTC](https://forum.adalo.com/t/custom-action-curl-f/34348/20 "2022-12-17T14:42:17Z")

</div>

Got it, cheers @pford and @dksstudios

[Next page](https://forum.adalo.com/t/custom-action-curl-f/34348.md?page=2)
