Skip to main content
Question

Form post in Code by Zapier action

  • February 10, 2023
  • 3 replies
  • 90 views

MarkK

Hi!

I am looking to retrieve a file from a New Form Submission in HubSpot trigger. I then want to chain a Code by Zapier action to submit a file from above Trigger as a form post (not json in other words).

Can I achieve that as a Code step without any external node modules.

Thanks in advance.,

Mark

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30916 replies
  • February 10, 2023

Hi @MarkK 

Good question.

We’ll need more context about the app API endpoint for where you are trying to send the file.


MarkK
  • Author
  • Beginner
  • 2 replies
  • February 16, 2023

HI Troy

Sorry for late reply.

You may find it here: https://api.cinode.com/docs/index.html in the POST CompanyCandidateFileAttachment endpoint. In Postman I only need to select a file for the “files” property and a “title” string value for the file to be uploaded successfully.

We have a working Zapier CLI (converted today from UI version) test pulling a file from a CDN (see below).

But when deploying and trying to upload a file from a New file on a Google drive folder we do not get the filename readable by the endpoint.


describe('Create - candidateattachmentpost', () => {
  zapier.tools.env.inject();

  const FILE_URL =
  'https://cdn.zapier.com/storage/files/f6679cf77afeaf6b8426de8d7b9642fc.pdf';

  it('should create an object', async () => {
    const bundle = {
      authData: {
        access_token: process.env.ACCESSTOKEN,
      },

      inputData: {
        Files: FILE_URL,
        Title: "CV-test",
        companyId: process.env.COMPANYID,
        id: 91989
      },
    };

    const result = await appTester(App.creates['candidateattachmentpost'].operation.perform, bundle);
    result.should.not.be.an.Array();
  });
});

 


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30916 replies
  • February 16, 2023

@MarkK 

Seems like this topic should be under the Developer Discussion section: https://community.zapier.com/developer-discussion-13