how can confiforms change submit url like webhooks
Asked by ???:

how can confiforms change submit url like webhooks, i will post the form data to some custom url, i known easy form is ok, but the easy form is not support file field, thanks a lot!


Answers:
author: Alex Medved _ConfiForms_
body: Hi

ConfiForms has REST APIs for integrations <https://wiki.vertuna.com/display/CONFIFORMS/REST+API>

Also, any time you can set up a form that will do additional requests to your services as you like - by setting up the ConfiForms IFTTT rules <https://wiki.vertuna.com/display/CONFIFORMS/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-WebServiceRequest>

Alex

comments: author: ???
body: thanks [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) ?i already read the docs?have the questions?

1.when do additional requests(to my custom url), how choose action to perform??i see two, i used the post method

(1). make http request

(2).webservice request

2.when the form contain the file field, how the iftttt rules send the file to my custom url

i used ${sql filed} or confiform form field, but in my custom url. i just get the file name, not the file self, so how to get the file content in my custom view??i used the django, request.POST method is failed.

3.in the ifttt rules, *whether or not can contains muti fields?? ex: many text fields and one file filed, when submit that all data can send to my custom url???is that ok ???*

*i am sorry about the questions, i just the beginer used the confiforms, i really Thank you verry much!*


author: Alex Medved _ConfiForms_
body: 1. It is better to use "webservice request", as it allows you to hide auth details from end users and support any type of request type (POST,GET.PATCH, etc)

2. I think it could be done the same way as we do it with POSTing to Jira <https://wiki.vertuna.com/display/TEST/Create+Jira+issue+with+webservice+connection+with+files+and+remote+links> (see how file is transferred)

3. Not sure I understand this completely, but there are no limits on the number of fields you can send/use

Alex


author: ???
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) thanks for your reply?

i read the doc? and set my form like it, but my custom view can't get the file also!

my custom view get null object like this?\<MultiValueDict: {}\>

normally?it could get file object.

my form's setting like these snapshots:

![form_define.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/178422iD7AEA28CE6C21A15/image-size/large?v=v2&px=999 "form_define.jpg")

![ifttt1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/178423i1DDD5922743EF4DA/image-size/large?v=v2&px=999 "ifttt1.jpg")![ifttt2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/178424iA93BFAFF26F5B549/image-size/large?v=v2&px=999 "ifttt2.jpg")![ifttt3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/178425i8F832D6B7BE54DAF/image-size/large?v=v2&px=999 "ifttt3.jpg")

ws:

![ws.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/178426iD1DE0A329A8563C5/image-size/large?v=v2&px=999 "ws.jpg")


author: Alex Medved _ConfiForms_
body: Hi

What request headers do you send to your own service?

I have done a quick test and it works just fine

Here is my sample configuration

Confluence editor

![iffttt-send-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/178549i3EA38BC3CBAF0411/image-size/large?v=v2&px=999 "iffttt-send-1.png")

And configuration of an IFTTT

![iffttt-send-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/178550iB97E44624106D231/image-size/large?v=v2&px=999 "iffttt-send-2.png")![iffttt-send-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/178551iBEADE97918363B2B/image-size/large?v=v2&px=999 "iffttt-send-3.png")![iffttt-send-4.png](https://community.atlassian.com/t5/image/serverpage/image-id/178552i2DC928F06A6D7F22/image-size/large?v=v2&px=999 "iffttt-send-4.png")

Under "file" parameter name I will receive an actual file in my target service, see below

Storage format

```
<p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="b6ee582e-2b2a-46d9-b282-8c6896a214ed"><ac:parameter ac:name="formName">myform</ac:parameter><ac:rich-text-body><p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1" ac:macro-id="16c9d6f7-6aea-452f-b552-6e2b9ec0f85a"><ac:rich-text-body><p><br /></p></ac:rich-text-body></ac:structured-macro><p class="auto-cursor-target"><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="8be21689-23a8-4cce-8256-9393e93a64a6"><ac:parameter ac:name="fieldName">myfile</ac:parameter><ac:parameter ac:name="fieldLabel">My file</ac:parameter><ac:parameter ac:name="type">file</ac:parameter></ac:structured-macro></p><ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1" ac:macro-id="82e51afd-a9b6-4b86-8211-7b88c6db9e28"><ac:parameter ac:name="action">WebService Request</ac:parameter><ac:parameter ac:name="extras">0aeeba4648780bd6714028c2d3190e83</ac:parameter><ac:parameter ac:name="event">onCreated</ac:parameter><ac:parameter ac:name="title">/quick-action</ac:parameter><ac:parameter ac:name="additionalContext">file</ac:parameter><ac:parameter ac:name="who">POST</ac:parameter><ac:rich-text-body><p><ac:structured-macro ac:name="confiform-field" ac:schema-version="1" ac:macro-id="1dc3363e-5cdc-471f-b2e9-aac968f4a05e"><ac:parameter ac:name="fieldName">myfile</ac:parameter></ac:structured-macro></p></ac:rich-text-body></ac:structured-macro><p class="auto-cursor-target"><br /></p></ac:rich-text-body></ac:structured-macro><p class="auto-cursor-target"><br /></p>
```

Receiving on the target service (request object)

![iffttt-send-result.png](https://community.atlassian.com/t5/image/serverpage/image-id/178553iA60A9746A15E6931/image-size/large?v=v2&px=999 "iffttt-send-result.png")

Alex


author: ???
body: thanks! [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)   
i look the examples like yours and i removed my request headers, i can get the file object now, but i couldn't get other fileds? like text field?

and your examples is just one file filed, so how one http request to get file and the text filed????


author: Alex Medved _ConfiForms_
body: As easy as adding them into the query string...

![iffttt-send-params.png](https://community.atlassian.com/t5/image/serverpage/image-id/178717iB57AABD2E791E875/image-size/large?v=v2&px=999 "iffttt-send-params.png")

Please note that it would be safer (and making it more robust) to urlencode values you set - <https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions>

```
[entry.mytextfield.urlencode]
```

Alex


Tags: confiforms

confluence-server

server