Submitting Typeform with a file to create a profile with files in Affinity, not uploading files when testing.
Hello,
I am trying to create a Zap where people make a submition in Typeform with a file and it will create a person and a file in Affinity.
We have another Zap that is similar to this one, but the one we are creating now is not uploading files in the test.
Is it related to the Typeform, if is not online yet, will it be able to test?
Page 1 / 1
Hi @Michael_CalmStorm
Good question.
Please post screenshots with how your Zap steps are configured in order for us to have more context, thanks.
@Michael_CalmStorm
Try updating to the newer version of the Typeform Zap app.
Can you post screenshots with how this Zap step is configured?
@Michael_CalmStorm
Try changing this to auto as per the Field description.
Thank you for the response.
I have some doubts: Which version of typeform? Should we create the form in a newer version of Typeform or just select the app in Zapier?
We selected the 1.0.14. Which is the newest?
I alter the Mimetype to auto, as requested, and it still didn’t work.
Best,
Mary
@Michael_CalmStorm
The newest versions of Zap apps don’t show the version number.
@Michael_CalmStorm
Check your AWS S3 settings to make sure they are configured the same as the other S3 bucket that is working successfully in the other Zap you mentioned is working.
The AWS S3 settings are exactly like in the Zap that works.
This last step is suppose to insert a file in the person’s page in Affinity.
The test is running now, but the file is not being uploaded in Affinity.
Can you confirm this is working as intended? To be clear, I'm not super familiar with Amazon S3/Affinity as a platform so I'll have to rely a bit on your expertise here. Can you tell me a bit more about how the file is to be attached to the person in Affinity? Is there a specific Zap step this is happening (or supposed to happen) in?
Following up on your ticket with them is going to be the best way to get this one resolved. Keep us posted with how things go!
To upload a file to Affinity, you would need to use “Code by Zapier” and pick the Python option.
There are 3 things need, you API key, organization id, and the file URL. Since you are using Typeform, you would also need to make sure your settings for file download it set to, anyone with the link to download the file.
For the code section, use the code attached below. If you are uploading the file to a person profile then the code will need to be uploaded.
Reach out to me if you have any additional questions at support@affinity.co, cheers!
# Download the file / hydrate the file f_downloaded = requests.get(input_datap'file_url'])
# Get the full url of the file url = input_datap'file_url']
# Get the file name filename = urlmurl.rfind("/")+1:] filename_small = filename.replace(".", "_small.")
# Post request to upload the file response = requests.post('https://api.affinity.co/entity-files', auth=('',input_datap'api_key']), params=({'organization_id': input_datap'org_id']}), files={'file': (filename_small, f_downloaded.content, f_downloaded.headers.'content-type'])}) print(response.json())